Does Google ignore everything after a hash fragment (#) when crawling on our site?

We use information that, after a hash fragment, displays different pages using JavaScript, so as not to force the browser to load the entire page again. For example, a direct link to a page might look like this (book_id / page_id):

www.example.com/book#1234/5678

Since we do not have direct links to every page except books, we are thinking of adding these direct links to the sitemap.xml file.

My question is whether Google treats this as a separate link or simply ignores everything after the hash fragment during a regular crawl or if we include it in the sitemap.xml file?

+5
source share
2 answers

as Lusero noted, the hash fragment ( #1234/5678) of the "AJAX URLs" is not sent to the server as part of the HTTP request (by specification) - so the server will return the same result for all of your different AJAX URLs.

Fortunately, there is a scheme that allows googlebot to crawl and index even AJAX pages :

Walkthrough

  • Tells the crawler that your site supports the AJAX crawl scheme
     (by marking the unique states of the pages that you want googlebot to crawl with special hash fragments that start with an exclamation mark, for example. #!1234/5678)
  • URL-, "_escaped_fragment_"
     (www.example.com/book?_escaped_fragment_=#1234/5678) html-
  • ...
+7

All Articles