Skip to main content
added 44 characters in body
Source Link
user12370
user12370

Imagine a pagination script with 20 total pages:

articles.php?page=18

What should I do when some third party web site links to a non-existent page?

articles.php?page=21      (page 21 is out of bounds)
articles.php?page=-10     (as is this)
articles.php?page=blabla  (or this)

problem is... (I have 20 total pages)

  • some 3rd party site links articles.php?page=21 that doesn't exist (last page is the 20th)
  • and I send 404/301 as a response
  • Google crawls that link
  • some time after, the total number of articles increases and will make the 21st page appear
  • the 404/301 will be removed in favor of the status 200

Is that correct? Is 404 or 301 better? Do I need some more expedients?

(with a 301 redirect I mean redirecting to the closest valid page)


more answers are welcome!!

Imagine a pagination script with 20 total pages:

articles.php?page=18

What should I do when some third party web site links to a non-existent page?

articles.php?page=21      (page 21 is out of bounds)
articles.php?page=-10     (as is this)
articles.php?page=blabla  (or this)

problem is... (I have 20 total pages)

  • some 3rd party site links articles.php?page=21 that doesn't exist (last page is the 20th)
  • and I send 404/301 as a response
  • Google crawls that link
  • some time after, the total number of articles increases and will make the 21st page appear
  • the 404/301 will be removed in favor of the status 200

Is that correct? Is 404 or 301 better? Do I need some more expedients?

(with a 301 redirect I mean redirecting to the closest valid page)

Imagine a pagination script with 20 total pages:

articles.php?page=18

What should I do when some third party web site links to a non-existent page?

articles.php?page=21      (page 21 is out of bounds)
articles.php?page=-10     (as is this)
articles.php?page=blabla  (or this)

problem is... (I have 20 total pages)

  • some 3rd party site links articles.php?page=21 that doesn't exist (last page is the 20th)
  • and I send 404/301 as a response
  • Google crawls that link
  • some time after, the total number of articles increases and will make the 21st page appear
  • the 404/301 will be removed in favor of the status 200

Is that correct? Is 404 or 301 better? Do I need some more expedients?

(with a 301 redirect I mean redirecting to the closest valid page)


more answers are welcome!!

what What Google will do while switching from 301/404 to 200?

imagineImagine a pagination script with 20 total pages:

articles.php?page=18

what IWhat should I do when some third party web site links to a non existent-existent page?

articles.php?page=21      (the page 21 is out of bounds)
articles.php?page=-10     (as is obviously this)
articles.php?page=blabla  (or this)

problem is... (I have 20 total pages)

  • some 3rdparty3rd party site links articles.php?page=21 that doesn't exist (last page is the 20th)
  • and I send 404/301 as a response
  • googleGoogle crawls that link
  • some time after, the total number of articles increases and will make the 21th21st page appear
  • the 404/301 will be removed in favor of the status 200

isIs that correct? betterIs 404 or 301 better? do iDo I need some more expedients?

(with a 301 redirect I mean redirecting to the closest valid page)

what Google will do while switching from 301/404 to 200?

imagine a pagination script with 20 total pages

articles.php?page=18

what I should do when some third party web site links a non existent page?

articles.php?page=21      (the page 21 is out of bounds)
articles.php?page=-10     (as is obviously this)
articles.php?page=blabla  (or this)

problem is... (I have 20 total pages)

  • some 3rdparty site links articles.php?page=21 that doesn't exist (last page is the 20th)
  • and I send 404/301 as a response
  • google crawls that link
  • some time after total number of articles increases and will make the 21th page appear
  • the 404/301 will be removed in favor of the status 200

is that correct? better 404 or 301? do i need some more expedients?

(with a 301 redirect I mean redirecting to the closest valid page)

What Google will do while switching from 301/404 to 200?

Imagine a pagination script with 20 total pages:

articles.php?page=18

What should I do when some third party web site links to a non-existent page?

articles.php?page=21      (page 21 is out of bounds)
articles.php?page=-10     (as is this)
articles.php?page=blabla  (or this)

problem is... (I have 20 total pages)

  • some 3rd party site links articles.php?page=21 that doesn't exist (last page is the 20th)
  • and I send 404/301 as a response
  • Google crawls that link
  • some time after, the total number of articles increases and will make the 21st page appear
  • the 404/301 will be removed in favor of the status 200

Is that correct? Is 404 or 301 better? Do I need some more expedients?

(with a 301 redirect I mean redirecting to the closest valid page)

Source Link
user12370
user12370

what Google will do while switching from 301/404 to 200?

imagine a pagination script with 20 total pages

articles.php?page=18

what I should do when some third party web site links a non existent page?

articles.php?page=21      (the page 21 is out of bounds)
articles.php?page=-10     (as is obviously this)
articles.php?page=blabla  (or this)

problem is... (I have 20 total pages)

  • some 3rdparty site links articles.php?page=21 that doesn't exist (last page is the 20th)
  • and I send 404/301 as a response
  • google crawls that link
  • some time after total number of articles increases and will make the 21th page appear
  • the 404/301 will be removed in favor of the status 200

is that correct? better 404 or 301? do i need some more expedients?

(with a 301 redirect I mean redirecting to the closest valid page)