Indexing AJAX sites

The Yandex robot can index an AJAX site if the site structure conforms to certain rules.

Each indexed AJAX page should have an HTML version. To let the robot know that the HTML version is available, add an exclamation mark to the page URL:

http://www.example.com/#blog > http://www.example.com/#!blog

When the robot detects the “#!” combination in the page link, it will request an HTML version.

  1. The HTML version of each AJAX page should be available at the address where the “#!” combination is replaced with the parameter “?_escaped_fragment_=”. For the example above, the HTML version of the page is located at http://www.example.com/?_escaped_fragment_=blog.

    In all links found, the robot replaces the “#!” combination with the parameter “?_escaped_fragment_ =” and follows the modified URL. You can also use the links containing “#!” in the site map.

  2. The HTML version of the main page should be available at the URL with the added parameter “ ?_escaped_fragment_=”. For example: http://www.example.com/?_escaped_fragment_=. Note: the parameter value must be empty.

    To inform the robot of the HTML version of the main page, add the following meta tag to the page code< meta name = "fragment" content = "!">.

    You can use this meta tag on any AJAX page. For example, if the page located at http://www.example.com/blog contains the meta tag <meta name="fragment" content="!">, the robot will index the HTML version of the page at http://www.example.com/blog?_escaped_fragment _ = .

    Note.

    You shouldn't place the meta tag in the HTML version of the document. If you do so, the page won't be indexed.

The link in the search results will direct users to the AJAX version of the page.