⬆️ ⬇️

Indexing AJAX sites by the Yandex search robot

We are pleased to announce that improvements in the indexing of AJAX sites Yandex has supported changes in the search engine and the rules for processing the URL of such sites.



AJAX technology is very popular. However, the way the content of the page “sees” the browser and the user is different from how the page is “seen” by the search engine robot. For example, the user sees a user-friendly interface with dynamically loaded pages, while the contents of the same page for a search robot can be empty or represented as the rest of the static HTML content of the page, which is not generated by scripts.



When creating AJAX sites, URLs with # can be used, but this URL is not used by the search robot. As a rule, the part of the URL after the # is cut off. Therefore, instead of a URL like site.ru/#example, it refers to the main page of the site located at site.ru. This means that the page content may not be indexed and, as a result, not to get into the search results.

')

Now the webmaster of the AJAX site can indicate to the search engine Yandex about the need for indexing by supporting the relevant scheme in the site structure. For this you need:







1. Replace the # symbol in the URL of pages with #! .. So the robot will understand that he can apply for the HTML version of the content of this page.

2. The HTML version of the content of this page is placed on the URL, where #! replaced by? _escaped_fragment_ =.



Example:

URL: www.examplesite.ru/#blog

Replaced with: www.examplesite.ru/# ! Blog

Put HTML content on the URL: www.examplesite.ru/?_escaped_fragment_=blog



3. At the same time, the content of the main page should be available at www.examplesite.ru/?_escaped_fragment_=

4. In order for the robot to understand that the main page is also on AJAX, you need to place the meta tag <meta name = "fragment" content = "!">. Meta tag can be used on any page generated using AJAX.



In this case, the page will be indexed by the search robot, and in the search results, users will see the "correct" URL - without

? _escaped_fragment_ =.

Source: https://habr.com/ru/post/144197/



All Articles