Search code examples
javascriptphpajaxurlgoogle-ajax

Google's shebang #! syntax for ajax crawling not resulting in crawled pages


I have a site which has implemented Google's shebang '#!' syntax for ajax crawling.

Both sides of the system have been implemented as discussed at https://developers.google.com/webmasters/ajax-crawling/docs/specification

In other words, URLs for an Ajax-created page such as: http://avianguitars.ca/configurator/#!S is mapped to static HTML versions which is cached server side at http://avianguitars.ca/configurator/?_escaped_fragment_=S

Google should see the #! syntax, crawl the _escaped_fragment_ version, and display it on Google with the original http://avianguitars.ca/configurator/#!S URL.

I have also added URLs in the format http://avianguitars.ca/configurator/#!S to the site's sitemap, which is submitted through Google's developer tools, however the !# URLs all appear to be ignored and are still not indexed.

Another example of a 'shebanged' URL is http://avianguitars.ca/configurator/#!action=showline&lineid=46 which maps to http://avianguitars.ca/configurator/?_escaped_fragment_=action%3Dshowline%26lineid%3D46

All other (non-ajax) URLs submitted via the sitemap are accepted, and I assume that general crawling would have picked up the URLs by now too.

Is there anything obvious I am missing which is preventing the links from being indexed?


Solution

  • Yes, you have missed something. You need to add <meta name="fragment" content="!" /> to tell that your shebang URL uses an identifier fragment.

    This will tell you more on the side of Google: https://developers.google.com/webmasters/ajax-crawling/docs/specification