Moving the site to a new domain without losing SEO: 301, canonical, GSC and Yandex. webmaster
Main chat
A chat for vibe coders: news, guides, live cases, marketplace, and finding executors.
Moving to a new domain is one of the most risky operations in the life of the site. If you do the right thing, you won’t notice anything: the traffic will move with the site in 2-4 weeks. You can lose 30-80% of organic traffic and recover in months.
The good news is that moving right is a clear algorithm, not magic. All steps are known, all tools are publicly available. This guide is a complete sequence of code examples for Apache, Nginx and scripts that can be given to Claude Code or Cursor.
Why moving is dangerous for SEO
When a site changes a domain, it looks like this: the old site has disappeared, a new unknown site has appeared. All the SEO you’ve accumulated—links, behavioral factors, domain trust—is tied to the old address.
Without proper migration:
- old pages will fall off the index
- new domain starts from scratch
- reference weight from the old domain is lost
- users arrive at non-existent pages
Your task is to give searchers an unambiguous signal: “the old site and the new one are the same, just at a different address.” There are three mechanisms for this: a 301 redirect, a canonical tag, and special webmaster tools.
Step 0. Preparation before relocation
The move starts long before you touch the DNS. The mistake of most is to start with a technical setup and only then think about the consequences.
Record the current indicators
Before any changes, remove the basic metrics – this is your reference point for post-relocation monitoring:
- number of indexed pages (Yandex.Webmaster → Indexing → Pages in search)
- organic traffic by URL (Yandex.Metrica, Google Analytics)
- positions on key queries (any rank tracker)
- number and list of external links (Yandex.Webmaster → External links, Google Search Console → Links)
Copy this data into a table. Once you move, you’ll compare it every week.
Choose the time to move
Minimum traffic: Minimum losses during the transition period. Avoid:
- fridays and weekends (if something goes wrong, hosting support is not available)
- periods of high season (for online stores - not before NG, March 8, etc.)
- launch time of advertising campaigns
The best time is Tuesday-Wednesday, the beginning of the working day.
Check the new domain for history
Before moving to a new domain, make sure it doesn’t have a toxic history. The former owner could use the domain for spam, get sanctions from search engines.
Check it out
- web.archive.org - what was on the domain before
- Yandex. Webmaster** - Add a domain and look at the warnings
- Ahrefs/Semrush – link and traffic history
Step 1. Deploy a new website on a new domain
The new site should be fully ready before switching redirects. Develop and test on a subdomain or closed server.
Before switching, check:
● All pages give 200 OK
Robots.txt is open for indexing (no Disallow: /)
● No noindex tags on pages
SSL certificate installed, HTTPS works
● All internal links are updated to the new domain
Canonical tags point to a new domain
Sitemap.xml contains a new domain URL
Meta tags title and description in place
Step 2. Set up 301 redirects - that's the main thing
301 is the HTTP status “Moved Constantly”. He tells the search robot: the page has moved forever, transfer all the link weight to the new address.
This is the most important technical step. Without the right 301 redirects, everything else makes no sense.
Basic rules
Page redirects, not to the main. Each page of the old domain must lead to the corresponding page of the new domain. Mass redirect of all URLs to the main one is a gross mistake: the search engine sees this as a doorway and does not transfer reference weight.
# Right:
old-domain.ru/about/> new-domain.ru/about/
old-domain.ru/blog/article/ → new-domain.ru/blog/article
# Wrong:
old-domain.ru/about/ → new-domain.ru
old-domain.ru/blog/article/ → new-domain.ru
Cover all options. The old domain could be accessed at four addresses: http with www, http without www, https with www, https without www. All of them must be redirected to a single canonical address of the new domain.
Do not create chains. old.ru → intermediate.ru → new.ru – each extra redirect loses some of the reference weight and slows down. Set up a direct redirect from the old to the new.
** Keep redirects for at least 12 months. ** Many people turn off redirects in a month or two. This is a mistake: external links to the old domain cease to transfer weight, and some robots bypass the site less often and do not have time to fix the move quickly.
Setting up on Apache (.htaccess)
The easiest option is to redirect the entire domain:
# В .htaccess на старом домене
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.ru$ [NC]
RewriteRule ^(.*)$ https://new-domain.ru/$1 [R=301,L]
If the structure of the URL has changed, add point rules to the general:
RewriteEngine On
# Конкретные страницы с изменившимися URL
RewriteRule ^old-page/$ https://new-domain.ru/new-page/ [R=301,L]
RewriteRule ^catalog/old-category/$ https://new-domain.ru/catalog/new-category/ [R=301,L]
# Всё остальное — постраничный редирект
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.ru$ [NC]
RewriteRule ^(.*)$ https://new-domain.ru/$1 [R=301,L]
Setting up on Nginx
server {
listen 80;
listen 443 ssl;
server_name old-domain.ru www.old-domain.ru;
# SSL настройки для старого домена
# ssl_certificate ...
return 301 https://new-domain.ru$request_uri;
}
Verification of redirects
After setting up, check several URLs manually:
# Through curl - see status and Location
curl -I https://old-domain.ru/about/
# Expected response:
HTTP/1.1 301 Moved Permanently
# Location: https://new-domain.ru/about/
Or use online tools: bertal.ru, redirect-checker.org. Check not only the main, but also 3-5 internal pages - sometimes the redirect works only for the main.
Step 3. Update Canonical Tags on a New Domain
The Canonical tag (<link rel="canonical">) tells the searcher: “Here is the reference address of this page, index it.”.
After moving, all pages of the new domain should have a canonical pointing to the new domain itself:
<!-- На странице new-domain.ru/about/ -->
<link rel="canonical" href="https://new-domain.ru/about/" />
Typical Moving Mistake – Canonical on new pages still points to the old domain. This is a signal to the search engine not to index new pages. Check each page or use Screaming Frog for a massive check.
If you have a CMS, update your canonical settings in the plugin (Yoast SEO, Rank Math) or in the framework configuration. If the site is static, generated via Wibcoding, ask Claude Code to check all HTML files:
Find all canonical tags in the project and replace old-domain.ru with new-domain.ru.
Also check the og:url and hreflang tags – they should update too.
Step 4. Update sitemap.xml
The sitemap on the new domain should only contain the URL of the new domain. This sounds obvious, but often forget to update when transferring files.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://new-domain.ru/</loc>
<lastmod>2026-06-07</lastmod>
</url>
<url>
<loc>https://new-domain.ru/about/</loc>
<lastmod>2026-06-07</lastmod>
</url>
</urlset>
Register the sitemap of the new domain in both webmasters. Leave the old sitemap on the old domain while the redirects are working – the robot is convenient when it sees the map of the old site and can go through it, receiving 301 redirects to the new URLs.
Step 5: GSC Change of Address – Notify Google
A 301 redirect is a signal at the level of individual URLs. Change of Address Tool in Google Search Console is a site-wide signal. He tells Google directly: “The whole site has moved from domain A to domain B, don’t treat them as different sites.”.
This is not an option, but a mandatory step when changing a domain. Without it, Google can figure out what’s going on for months.
Procedure
** Before sending the request:**
- New domain must be confirmed in Google Search Console
- 301 redirects must be configured on the old domain
- The new website should be open for indexing
Sending a request:
- Open GSC → select old domain (the one you are moving from)
- On the bottom left **Settings **
- Find the section ** Change of Address** (Change of Address)
- In the drop-down list, select a new domain
- GSC will automatically run pre-checks: availability of redirects, availability of a new site, correctness of canonical
- If the checks have passed, click ** "Send" **
Once submitted, you will see a notification in both Search Console resources that will be active 180 days. During this time, Google is speeding up the communication between domains.
Important limitations
- You cannot create a chain of moves: A→B, immediately B→C. Wait for traffic stabilization.
- The tool only works to move between domains. Moving from www to non-www within the same domain is done through canonical and redirects, without Change of Address.
- The new domain must be verified in the GSC, without which the form will not open.
Step 6. Webmaster - moving through the "mirror"
Yandex uses the concept of mirrors: if several addresses lead to the same content, one of them is declared the main mirror, the rest – non-main. When you move, you declare the new domain as the main mirror instead of the old one.
Yandex does not guarantee the preservation of positions when changing the mirror – this is important to understand. But a properly designed move significantly increases the chances of saving traffic.
Add a new domain to the Webmaster
If the new domain has not been added yet:
- webmaster.yandex.ru → “+” → insert the URL of the new domain
- Confirm possession (HTML file, meta tag or DNS TXT record)
- Add a new domain sitemap
Request a move
- Open an old domain in Yandex. webmaster
- Indexing → Moving the site
- Select a new domain from the list of confirmed sites
- Press "Move"
Yandex will start the process of gluing mirrors. It's not instantaneous - it usually takes 2 to 8 weeks. During the transition period, both versions can be displayed in the issuance at the same time, then Yandex will begin to give preference to the new domain.
Types of relocations in the Webmaster
The section “Moving the site” in Yandex handles several scenarios:
| Сценарий | Что делать в Вебмастере |
|---|---|
| Новый домен (например, old.ru → new.ru) | Переезд сайта → выбрать новый домен |
| HTTP → HTTPS (тот же домен) | Переезд сайта → «Добавить HTTPS» |
| Без www → с www (тот же домен) | Переезд сайта → «Добавить WWW» |
| Комбо: новый домен + HTTPS | Сначала HTTPS, потом новый домен |
**Important: If you change your domain and switch to HTTPS at the same time, do it in two steps. First move to HTTPS within the old domain, wait for stabilization, then move to the new domain.
Step 7. Update external links and mentions
Redirects convey reference weight, but a direct link to a new domain is always better than a redirect. Go through the main sources of external links and update them:
Required:
- Yandex Business and Google Business Profile
- Profiles in social networks (VK, Telegram channel, Instagram*, LinkedIn)
- Directories and directories where your site is located
** Where possible:**
- Affiliate sites with links to you – email them asking them to update the link
- Guest articles where you are the author
- Forums and comments with your links
Take a list of external links from Yandex. Webmaster → Links → External links.
Step 8. Post-relocation monitoring
The transfer does not end at the time of the switch. The next 4-8 weeks is a critical follow-up period.
What to check and how often
** Daily (first 2 weeks):**
- Whether redirects work (selectively check 5-10 URLs)
- Traffic to Yandex. Metrica didn't fall catastrophically
- Are there any 404 errors on the new domain
Weekly:
- Number of new domain pages indexed (should grow)
- Number of old domain pages indexed (should fall)
- Positions for key requests
- Mistakes in Yandex. Webmaster and GSC
In a month:
- Compare traffic to basics before moving
- Check that external links are correctly redirected (302 not appearing instead of 301)
Normal picture of moving
A small drop in traffic for 1-3 weeks is normal. Search engines bypass the site, update the index, redistribute the reference weight. After that, the traffic is restored.
The best documented results when moving properly are recovery in 19–33 days. This proves that planning is more important than luck.
If the traffic has not recovered after 6-8 weeks, check:
- Are there any duplicate pages between the old and new domains
- Canonical tags are working correctly
- Are there any errors in the Coverage tool in GSC and Excluded Pages in Webmaster
Frequent mistakes when moving
Redirect all pages to the main page. The most common and destructive error. The search engine does not understand the links between specific pages and loses link weight.
Forgot to update canonical tags. Pages of a new domain from canonical to an old domain signal the searcher not to index new pages.
**Redirects are off in a month. ** It's too early. Keep at least a year – many external links are rarely handled by robots.
Not added a new domain to GSC and Webmaster prior to switching. Change of Address to GSC only works if the new domain is already verified.
**We moved on Friday night. If something breaks, two days without a reaction.
Simultaneously changed the domain, design and structure of the URL. Three changes simultaneously are three sources of problems that cannot be diagnosed separately. Change one by one.
Automation through AI
If you make a move to a site built through Claude Code or Cursor, a number of tasks can be automated:
Canonical tags check after moving:
Write the script on Node. js which:
1. Read sitemap.xml at https://new-domain.ru/sitemap.xml
2. For each URL makes a request and parsite canonical tag
3. If canonical points to old-domain.ru - displays a warning
4. Generates a report in CSV format
** Checking the efficiency of redirects:**
Write a script that takes a list of URLs from the old domain,
For each, check the status of the response via fetch.
and informs if the status is not 301 or Location does not contain new-domain.com.
Input data – a list of URLs in the old-urls.txt file
Generation of the redirect card when you change the structure of the URL:
I changed my URL structure when I moved.
Here is a mapping table (CSV with old url, new url columns).
Generate rules for .htaccess and for Nginx config.
Relocation checklist
Before the move:
Basic metrics (traffic, position, index)
● The history of the new domain is checked
● New site ready and tested on staging
● New domain added and verified in GSC and Webmaster
SSL certificate installed on new domain
On moving day:
● 301 page redirects (not the main one!)
● All options covered: http/https, www/non-www
● Checked redirects for the main and 5+ internal pages
Canonical tags on a new domain point to a new domain
Sitemap.xml contains a new domain URL
Robots.txt of the new domain is open for indexing
Change of Address request sent to GSC
The move to Yandex has been completed. webmaster
Added a new sitemap to both webmasters
During the month:
● Updated profiles in social networks and catalogs
● Requests sent to partners to update links
● Weekly Index and Traffic Monitoring
● Check for 404 errors and broken redirects
Recovery Time: What to Expect
Search engines handle moving at different speeds.
Yandex is usually faster: with the right move + tool "Move the site" in the Webmaster, the first results are visible in 1-3 weeks. Complete stabilization - 4-8 weeks.
Google is slower on large sites: small sites are processed in 1-4 weeks, large (thousands of pages) – up to 3 months. Change of Address Tool speeds up the process, but does not make it instantaneous.
Don’t panic when traffic drops temporarily in the first few weeks – it’s normal. You should panic if after 6-8 weeks the traffic has not started to recover or new pages are not indexed.
* Meta Platforms Inc. (Facebook, Instagram) is recognized as an extremist organization and its activities are prohibited in the Russian Federation.