My website relies heavily on ajax. I regularly update the hash values in the address bar to store browsing history, enabling the forward and back buttons to function properly. Here's an example scenario:
- site.com/directory#sports/1
- site.com/directory#sports/2
- site.com/directory#sports/3
- site.com/directory#movies/1
- site.com/directory#movies/2
I suspect that search engine crawlers may be ignoring these hash values. All links with the same path before the hash are treated as one, which could negatively impact SEO since specific pages may not get indexed. For instance, searching for "site.com sports" on Google might not yield a result for site.com/directory#sports/1. So how can I maintain ajax browsing history while ensuring good SEO? As far as I know, hashes are necessary to prevent page reloads during ajax requests. The URL cannot be updated like this when using ajax:
- site.com/directory/sports/1
- site.com/directory/sports/2