Moving a site to a new domain

Migrating a site to a new domain may affect its position in search results and number of indexed pages. These changes can be minimized if the robot recognizes the new domain as the main mirror of the old domain. You can tell the robot about the address change using the Relocate site tool in Yandex.Webmaster.

Note.

Before beginning the migration, make sure that:

  • You have access to manage both domains and their configurations.

  • The new domain isn't a mirror of any other domain (you can check this in the following way).

  • Both domains are prohibited from indexing in the robots.txt files. The robots.txt files must have the same content so the robot can use the same addresses for checking mirrors. To analyze robots.txt files, use the robots.txt analyzerrobots.txt analyzer.

There are two ways to define the address of the main mirror:

  1. Set the Host directive in the robots.txt files for all the mirrors, if the content of the sites is identical. In particular, use the Host directive if you specified a new domain as an alias of an existing domain in your hosting control panel.

    Note that Cyrillic domain names in robots.txt files must use the punycodePunycode format

  2. Set a permanent server redirect with the HTTP code 301. When using the redirect, follow these recommendations:

    • When it gets a redirect, the robot indexes only the redirect target. So you should only use a redirect if you don't need the site on the old domain to participate in search.

    • If possible, configure a redirect for each page on the old site to the corresponding page on the new site.

      We don't recommend redirecting users from every page on the old site to the main page on the new one. This way of organizing redirects won't interfere with grouping mirrors, but it's inconvenient for users and slows down how the Yandex robot indexes the new site.

To group mirrors, the Yandex robot only needs the Host directive in the robots.txt files for all mirrors. You don't need to configure a redirect.

Make sure that all your methods of grouping mirrors (both redirects and Host directives for each mirror) are pointing to the same main mirror for the site. Otherwise, the robot might choose the wrong domain as the main mirror.

It usually takes about a month to group mirrors, regardless of which way you choose to set the main mirror.