⌕ Technical SEO

Changing domain without losing traffic: the migration plan

How to move a site to a new domain: URL inventory, redirect map, switchover day, notifying search engines and the checks to run in the weeks that follow.

Changing domain is one of the most delicate operations in a site's life. The reasons may be excellent, a new brand, a merger, a shorter name, but every URL the engine knew has to find its new home. If the move is well planned, the temporary dip is limited and traffic settles; if it is improvised, entire sections can disappear from the results for months.

Before: the inventory

You cannot migrate what you don't know about. The first step is to gather all the URLs that carry value:

  • indexed URLs, available from webmaster tools;
  • URLs in current and old sitemaps;
  • URLs that receive external links, from backlink analysis tools;
  • URLs that bring traffic, from the last twelve months of analytics;
  • URLs that appear in server logs, including PDFs, images and downloadable files;
  • a full crawl of the current site with a crawler.

The union of these sources, deduplicated, is the list to work from. Forgotten pages that still receive important links often turn up.

The redirect map

For each URL in the inventory, you decide its destination on the new domain. The rule is simple: each page should redirect to its closest equivalent, not to the home page.

Old URL New URL Type
old.com/services/consulting new.com/services/consulting 301
old.com/blog/article-x new.com/articles/article-x 301
old.com/promo-2019 new.com/offers 301
old.com/obsolete-page none 410

If the path structure doesn't change, a single general rule that replaces the host while keeping path and parameters is enough. If the structure changes too, you need an explicit table, at least for pages with traffic or links.

The practical advice is not to change too many things at once. Domain, URL structure, design and content on the same day make it impossible to tell which change caused any problem.

Preparing the new domain

Before the switch, on the new domain:

  1. configure DNS, the HTTPS certificate and any CDN;
  2. publish the site in an environment protected by a password, not just by noindex, to avoid early indexing;
  3. check that canonicals, hreflang, structured data and sitemaps already use the new domain;
  4. update internal links so they point directly to the new URLs;
  5. register the new domain in webmaster tools and verify ownership.

Also check the history of the new domain if it was bought second-hand: a past of spam or penalties is a problem to know about beforehand.

Switchover day

The typical sequence is:

  1. remove the protection on the new domain;
  2. activate 301 redirects from old to new, URL by URL;
  3. spot-check with curl or a crawler that each old URL reaches its destination in a single hop;
  4. submit the new sitemap in webmaster tools;
  5. use the change of address tool, where the engine provides one, to formally report the move;
  6. also keep a sitemap with the old URLs active for a few weeks: it helps the engine discover the redirects quickly.

Choose a low-traffic moment and a day when the people who know the site are available to step in.

After: monitoring

In the following weeks, check regularly:

  • 404 errors on the new domain, which point to forgotten internal links or missing redirects;
  • old-domain URLs that return 200 instead of redirecting;
  • indexed pages for both domains: the old one should fall while the new one grows;
  • traffic by section, to notice immediately if part of the site isn't being transferred;
  • server logs, to see how often crawlers visit the old URLs.

In my work, before the switch, I prepare a sheet with the most important URLs and recheck it every day during the first week: it is the fastest way to spot a problem.

How long to keep the redirects

As long as possible. A year is a reasonable minimum, but external links to the old domain remain on the web for much longer. Renewing the old domain and keeping the redirects costs little; letting it expire means losing those links and risking someone else registering it.

In short

  • Gather every valuable URL from several sources before you start.
  • Redirect each page to its equivalent, never everything to the home page.
  • Avoid changing domain, structure and design at the same time.
  • Report the move with sitemaps and webmaster tools, then monitor 404s and indexing.
  • Keep the old domain and its redirects for a long time.
MM
Marco Marzaduri

Marco Marzaduri works in cybersecurity, digital forensics and web development. A computer science graduate, he combines rigorous technical analysis with attention to the people who use technology.

Read also