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 the search 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 are merged into a group of mirrors.
When merging, the main mirror is selected automatically. This address is then included in search results. You can speed up merging and specify the main mirror by following the instructions below.
Merging website addresses into a group of mirrors also allows you to transfer some accumulated metrics from the old site to the new one. For example, external links of the old site are treated as external links of the new one. At the same time, on the External links page in Yandex.Webmaster, you can see 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 (World Wide Web) prefix was introduced in the 1990s and was meant to indicate that a website could be displayed on the World Wide Web. To learn more, see this Wikipedia article.
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
- Step 2. Check if the sites' content matches and they are available to the robot
- Step 3. Set redirection from the old URL to the new one
- Step 4. Use the “Relocate site” tool
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 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.
The robots.txt files on the old and new domains 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 mirrors.
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.
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.
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.
Step 4. Use the “Relocate site” tool
The robot learns about the main mirror the next time it crawls the site. To speed up detection of changes, use the “Relocate site” tool:
- Go to Yandex.Webmaster and choose the website you want to move from.
- On thepage, send a request using one of these methods, depending on the type of relocation:
- To a domain with the "www" prefix — turn on the Add WWW option.
- To a domain without a prefix — turn off the Add WWW option.
- Click Save.
The main mirror is changed within a few weeks. To get messages about changing the main mirror, subscribe to notifications.
After the main mirror is changed, the new site URL is included in the search.
- In the source code of the site that should become the main mirror 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 is moving to another domain zone without a redirect.
- Site indexing is prohibited in the robots.txt file.
- The request was sent from the site to move to.
- Internal service error. Try sending the request later.
- Both sites are available to the robot.
- The site's old URL redirects with a 301 or 302 HTTP code to the new one, which won't be considered the main mirror.
- The site relocation request in Yandex.Webmaster is processed.
You can relocate the site that is currently the main mirror. You can check the main mirror in the My sites list in Yandex.Webmaster. If the site is grouped with and is a secondary mirror of the other, separate them. Yandex.Webmaster will then display Separating mirrors instead of Relocate site. Then change the main mirror according to the instructions above.
It will be in the search until the corresponding pages of the primary mirror are indexed, even if you set a redirect. The pages will be excluded from search results after several updates of the search databases.
Secondary mirror pages may still be stored in the robot's database and displayed in Yandex.Webmaster, but not in search.
To keep track of search database updates, subscribe to notifications.
If a new domain is already recognized as the main mirror, there might be slight changes in the number of site pages in the search results, site ranking, or traffic. These changes might be noticeable over several search database updates.
See the recommendations in Site structure.
Select what the mistake in the request was:
If you selected the wrong site from the list on thepage in Yandex.Webmaster and sent the request, it will eventually be rejected, and the site won't be moved.
The site relocation request is fulfilled when the new site URL becomes the main mirror and is included in the search results. This can take from a few weeks to months, depending on the relocation type, the speed at which the robot crawls the sites and the mirror updates in the search results.
If all conditions are met, the data will be updated automatically over time.