Using HTML tags

Meta tags

Meta tags allow webmasters to specify metadata about a site page. A number of meta tags are also used by search engine robots. The Yandex robot looks at the content of the following tags:

  • <meta name="Keywords" content="..."/> — May be used when determining the page's relevance to search queries.
  • <meta name="Description" content="..."/> — The content of this tag can be used in snippets (site descriptions in search results).
  • <meta name="viewport" content="width=device-width, initial-scale=1"> — Used for adapting sites to mobile device displays. It allows controlling the zoom of the viewport in the browser. The value width=device-width adapts the width of the viewport to the device screen. The value initial-scale=1 provides a 1:1 ratio of CSS pixels to independent device pixels.

    If the meta tag is omitted, mobile browsers show the page for a computer screen by default. Since the screen width on a mobile device is significantly less than a computer screen, browsers try to optimize the content by increasing the font size, scaling the content to the screen size, or showing only the part of the content that fits on the screen.

  • <meta http-equiv="Content-Type" content="type; charset=..."/> — The robot can use this tag to determine the document type and encoding.
  • <meta http-equiv="refresh" content="N;url=_redirect destination address_"/> — Redirects the user to the specified URL after spending N seconds on this page. For small N values, it is considered a temporary redirect, similar to server redirects with the HTTP code 302/303/307.

The Yandex robot also looks at these meta tags:

  • <meta name="robots" content="all"/> — Allows indexing text and links on the page, the same as <meta name="robots" content="index, follow"/>.

  • <meta name="robots" content="noindex"/> — Don't index the text of the page.

  • <meta name="robots" content="nofollow"/> — Don't follow links on the page.

  • <meta name="robots" content="none"/> —Forbids indexing text and following links on the page, the same as <meta name="robots" content="noindex, nofollow"/>

  • <meta name="robots" content="noarchive"/> — Don't show a link to an archived copy on the search results page.

  • <meta name="robots" content="noyaca"/> — Don't use the description from Yandex.Catalog for the snippet in search results.

In the name attribute, you can use yandex in place of robots to specify directives only for the Yandex robot. For example:
<meta name="yandex" content="all"/>

The robot won't visit documents if they are linked to from pages containing a nofollow meta tag. However, they may be indexed if other sources link to them without nofollow.

If meta tags aren't specified, the robot assumes that they have positive values (index, follow, archive). If the robot discovers a tag conflict, it chooses the positive value.


<meta name="robots" content="all"/>
<meta name="robots" content="noindex, follow"/>
<!--The robot chooses "all" and the text and links will be indexed.-->

There is an exception — the all attribute doesn't affect noarchive:

<meta name="robots" content="all"/>
<meta name="robots" content="noarchive"/>
<!--Text and links will be indexed, but search results won't show a link to an archived copy of the page.-->

<noindex> tag

You can use the <noindex> tag to prevent indexing non-content parts of a page. This tag works the same way as the noindex meta tag, but it only applies to the text enclosed inside the tag in the format:

<noindex>text to exclude from indexing</noindex>

The noindex tag is not sensitive to nesting, meaning it can be placed anywhere in the HTML code of a page. You can use the tag in the following format if necessary for making the site code valid:

<!--noindex-->text to exclude from indexing<!--/noindex-->

rel="nofollow" attribute for the <a> tag

The rel="nofollow" attribute is used in the <a> tag in the format:

<a href="url" rel="nofollow">link text</a>  

The attribute works the same way as the meta tag with the nofollow value, but it only applies to the specified link.

rel="canonical" attribute for the <link> tag

If a site has groups of pages with similar content, the webmaster can specify the preferred (canonical) address to use in search results for each group. For example, a page can be accessed using two addresses:

If the preferred address is /blog, this should be reflected in the page code /pages?id=2:

<link rel="canonical" href=""/>

Likewise, if the page has the rel="canonical" attribute specifying the address of this page, the robot regards it as canonical. This page will be indexed and will appear in Yandex search results.

The robot doesn't treat a link with the rel="canonical" attribute as a strict directive, but as an option that is taken into account but may be ignored.

For example, the robot might not use the address you specified if:

  • The document is not accessible for indexing at the canonical address.

  • The canonical address specifies a URL in a different domain or subdomain.

  • You specified several canonical addresses.

You also shouldn't create chains of canonical addresses. For example, for the address, the canonical address is, but at the same time, the address has the canonical address