I have an ajax heavy website. I update the hash values in the address bar so that surfing history is stored – thus the forward and back buttons still function. For example, a typical use case would be:
- 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 believe these hash values are ignored by search engine crawlers. All links with the same path before the hash are assimilated. This would be bad for SEO, because a specific page can not be indexed. For example, I wouldn’t be able to search for “site.com sports” on Google and expect to find a link to site.com/directory#sports/1. So how do I both retain ajax history and have good SEO? As far as I know, hashes must be used to not reload the page during ajax. You cannot update the URL like so when doing ajax:
- site.com/directory/sports/1
- site.com/directory/sports/2
You need a hash bang: #!. Read Google’s Making AJAX Applications Crawlable.