BLOG
BlogGuides

Test redirects after a site redesign or migration

Old addresses from Google and other sites must land on the right new page. A plain-language test opens each old URL and checks where it ends up and what the page says.

The launch that loses the traffic#

A redesign changes URLs: /services/teeth-whitening.html becomes /treatments/whitening/. Every link from Google, every bookmark and every link on another site still points at the old address. Without a redirect, they land on a 404 and the client's search traffic drops.

Google's guidance on moving a site is short: prepare a URL mapping from the current URLs to their new form, configure the server to redirect from old to new, then monitor both. Its documentation also notes a common mistake, quoted in one migration guide: redirecting to URLs that do not exist on the new site. A map is only useful if its destinations were tested against the built site.

Test the map, not the theory#

Take the redirect map (old URL, new URL) and turn its most important rows into a test:

Open https://harbourdental.example/services/teeth-whitening.html.
Check the browser ends up on harbourdental.example/treatments/whitening/
and the page heading reads "Teeth whitening".
Open https://harbourdental.example/about-us.php.
Check it ends up on /about/ and the heading reads "About Harbour Dental".
Open https://harbourdental.example/blog/2019/05/flossing-tips.
Check it ends up on /blog/flossing-tips/ and does not show "Page not found".

Checking the heading as well as the address catches a redirect that goes to the wrong page, or to the home page for everything, which search engines can treat as a soft 404.

Which rows to test#

Not all of them by hand. Prioritise:

  1. The pages with the most search traffic (from the client's Search Console).
  2. Pages other sites link to.
  3. One of each URL pattern (one old blog post, one old service page, one old product).
  4. Old URLs with query strings, if the old site used them.

A test holds up to 30 steps, so split a long map into a few tests by section.

What a browser test cannot tell you#

It sees where the browser ends up and what the page shows. It does not report the HTTP status code of each hop (301 or 302) or the length of a redirect chain; use a crawler for those. Run both: the crawler for the full map, the test for the pages that matter, after every deploy and on a schedule for the first months after launch.

This post is part of Find the bug before your client does.

Filed underWebReleases and regressionsClient sites