# Googlebot 404 errors due to page numbers

**URL:** <https://meta.discourse.org/t/googlebot-404-errors-due-to-page-numbers/96337>\
**Category:** Support\
**Created:** [September 4, 2018, 3:46pm UTC](https://meta.discourse.org/t/googlebot-404-errors-due-to-page-numbers/96337 "2018-09-04T15:46:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stas00](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@stas00](https://meta.discourse.org/u/stas00)\
**Post date:** [February 9, 2019, 10:27pm UTC](https://meta.discourse.org/t/googlebot-404-errors-due-to-page-numbers/96337/3 "2019-02-09T22:27:59Z")

</div>

Found this topic after encountering the same issue.

I fail to see how this is google’s problem, you can’t expect every page to be reindexed every hours.

Are you seriously saying that discourse can’t check that if a link includes `?page=2` which would translate to /21, but if the topic shrunk to 19 posts, it can’t handle that and redirect to the last post /19 in this case?

In fact, discourse already has everything ready to do it right, w/o needing to put the blame on external forces. Currently, If the topic has 19 posts and I type /99, it automatically redirects to /19 - so it knows how to handle shrinking topics just fine. So if you let ?page=2 to always redirect to /21, w/o checking whether there are 21+ posts or not, discourse will do the right thing after 2 redirects:

1. …?page=2 =\> Redirect …/21
2. …/21 =\> ../19

of course, I’m assuming the server is configured to handle multiple redirects.

Does this make sense?

p.s. I think the proposed solution reduces the edge case to general case and actually simplifies things, since you no longer need to check whether ?page=2 “exists” and let redirects do the right thing.

---

_[View the full topic](https://meta.discourse.org/t/googlebot-404-errors-due-to-page-numbers/96337)._
