Moving a website to an address with the www prefix and back

A website can have multiple addresses: with and without the www prefix, as well as with the HTTP or HTTPS protocol. Examples: http://www.example.com, https://www.example.com, http://example.com, https://example.com. This means a single domain can have multiple addresses.

The Yandex robot treats such addresses as different websites. That's why they can be included in search results as separate websites. As a result, such addresses can compete with each other in search results. This may cause one of the addresses to lose traffic and fail to reach desired positions. This situation may remain unchanged until the robot determines that the content on the websites is the same. After that, they will be merged into a group of sites.

When merging, the primary address that will continue to be included in the search will be selected automatically. You can speed up merging and specify the primary website address by following the instructions below.

Merging sites into a group also allows you to transfer some accumulated metrics from the old site to the new one. For example, external links from the old site will be treated as external links of the new one. At the same time, the External links page in Yandex Webmaster displays the URLs specified on a third-party site. However, merging doesn't guarantee that the number of website pages in search results, the page ranking, or traffic will remain the same.

For Yandex, it doesn't matter if the website address contains the www prefix or not. It's usually possible to set preferences for that in website settings. Here are the instructions for the most popular platforms.

Why do I need the www prefix?

The www prefix (World Wide Web) came into use in the 1990s and indicated that the site could be displayed on the World Wide Web.

Currently, the prefix doesn't affect the operation of websites, but is used in settings for many platforms.

Step 1. Add your old and new sites to Yandex Webmaster

Add your old and new sites to Yandex Webmaster and verify your rights to manage them. For more information, see Quick start.

Step 2. Check if the sites' content matches and they are available to the robot

Make sure that:

  • The sites' main content matches (text and graphics, contact information and so on).

  • The new address is not grouped with someone else’s site. If so, ungroup the sites. Ungrouping sites is not required if:

    • The URLs differ only in the protocol part (HTTP/HTTPS).
    • The new URL is recognized as an alternate address of the site you are moving from.
  • The old and new URLs are available to the robot:

    • The server response takes less than 10 seconds and contains an HTTP status with the 200 OK code for the new URL and 200 OK or a redirection code (permanent or temporary) for the old URL.

      Check the server response

    • In the robots.txt files, the old and new domain are allowed for indexing by the Yandex robot. The robots.txt files must have the same content so the robot can use the same URLs for checking sites.

      You can also configure a redirect from the old site's robots.txt to the robots.txt of the new one. Then Yandex will use the target file. In this case, make sure that the directives in this robots.txt are correct for both sites.

      Check the robots.txt files

Step 3. Set redirection from the old URL to the new one

On your server, set a permanent or temporary redirect (for example, with a 301 or 302 HTTP code) from the old website's pages to the corresponding pages on the new website, which should be included in the search.

Make sure the redirect is set:

  • From the home page of the old site to the home page of the new one. This is necessary for a proper site move.
  • From the internal pages of the old site to the corresponding pages of the new one. This will transfer metrics to the new pages and help site visitors find the information they need.

If possible, don't set a redirect from all pages of the old site to the main page of the new one. Such redirects are inconvenient for users and, consequently, slow down the new site indexing by the Yandex robot.

To do this, add a link to the pages on the new site with the rel="canonical" attribute in the HTML or in the HTTP header of every page on the old site.

In some cases, the robot treats this meta tag as a redirect with an HTTP 302 code. Use the meta tag for moving if other redirection methods don't suit you.

Step 4. Use the "Relocate site" tool»

The indexing bot will learn about the primary address the next time it crawls the site. To speed up detection of changes, use the “Relocate site” tool:

  1. Go to Yandex Webmaster and choose the website you want to move from.

  2. On the Indexing → Relocate site page, submit your request in one of the following ways, depending on the type of migration:

    • To the domain with the "www" prefix — turn on the Add WWW option.
    • To the domain without a prefix — disable the Add WWW option.
  3. Click Save.

The change in the primary site address takes several weeks. To receive notifications about the change in the primary site address, subscribe to notifications.

After the primary site address is changed, the new URL is included in the search.

Questions and answers

There is no “Relocate site” page in Yandex Webmaster

You can move a site that is currently specified as the primary site address. You can check the primary site address in the My Sites list in Yandex Webmaster. If a site is grouped with another one and is specified as its alternate address, ungroup them. In this case, you will see Ungrouping site addresses instead of Site move. Then change the primary site address according to the instructions above.

I followed the instructions and specified site's primary address in Yandex Webmaster, but an alternate address still appears in search results. Why?

The alternate address will appear in search results until the corresponding pages of the primary address are indexed (even if you've set up a redirect). Then, the pages will be excluded from search results after several updates of the search databases.

Alternate site address pages may still be stored in the indexing bot's database and displayed in Yandex Webmaster, but not in search results.

To keep track of search database updates, subscribe to notifications.

After changing the domain, the number of pages or their ranking decreased

If a new domain is already recognized as the site's primary address, the number of site pages in search results, their ranking, or traffic may change. These changes can be seen over several search database updates.

See the recommendations in Site structure.

  • The source code of the site that should become the primary site address contains the attribute rel="canonical". Delete it and submit the request for moving again.
  • The site is unavailable or responds with a long delay.
  • The sites' content doesn't match. Check if the internal page URLs and headers match.
  • The site moves to another domain zone without a redirect.
  • Site indexing is prohibited in the robots.txt file.
  • Violations of the Search rules are detected on the site. View the details on the Security and violations page in Yandex Webmaster and fix the errors. In two weeks, check that the message about the violation disappears from the service, and re-send the request.
  • The request was sent from the site to move to.
  • Internal service error. Try sending the request later.
Request was sent by mistake

Select what the mistake in the request was:

The wrong site was selected for moving

If you selected the wrong site from the list on the Indexing → Relocate site page in Yandex Webmaster and submitted the request, it will be rejected after some time, and the site won't be moved.

You changed your mind and don't want to move the site, but the request is already sent

In this case, the request can be processed and the site's domains will be grouped. You can't cancel the request. Wait for the changes to be applied in the search results and then move to the domain you need.

Why does the request take so long to process?

The site move request is fulfilled when the new site URL becomes the primary site address and is included in search results. This can take from a few weeks to months, depending on the move type, the robot's crawling speed, as well as the updates about site address data in search results.

Check whether the following conditions are met:

  • Both sites are available to the robot.
  • The old site address performs a redirect with a 301 or 302 HTTP code to the new one, which will be considered the primary address.
  • The site move request in Yandex Webmaster has been processed.

If all conditions are met, the data will be updated automatically over time.

Learn more

Contact support

When you change a site's primary or alternate addresses, it usually takes about a month for the changes to appear in search results. If you followed the instructions for moving or ungrouping site addresses but the search results haven't changed, contact support.

Tell us what your question is about so we can direct you to the right specialist:

The primary site address may change if the old site pages have a redirect or the rel="canonical" attribute referring the site that has become the primary address. To avoid automatic selection of the primary address, make sure that the pages on all alternate addresses redirect users to the corresponding pages on the desired primary address.

This means that the indexing bot has selected the primary site address automatically. Specify the correct site URL for the robot, following the recommendations in the Moving a site to a new domain name section.

Main reasons why sites aren't grouped:

  • On the site that you want to be the main address, the pages' source code contains the rel="canonical" attribute. Delete it and submit the request for moving again.
  • The site is unavailable or responds with a long delay.
  • The sites' content doesn't match. Check if the internal page URLs and headers match.
  • The site moves to another domain zone without a redirect.
  • Site indexing is prohibited in the robots.txt file.
  • Violations of the Search rules are detected on the site. View the details on the Security and violations page in Yandex Webmaster and fix the errors. In two weeks, check that the message about the violation disappears from Yandex Webmaster, and re-send the request.
  • The request was sent from the site to move to.
  • Internal service error. Try sending the request later.
Recommendations didn't help

A link located on another site.