Website migration redirects, explained#
A website migration redirect sends a request for an old URL to the page that replaced it. When a site moves to a new domain, the old addresses don’t disappear: links from other sites, bookmarks, emails, printed material and search results keep pointing at them.
Without redirects, those requests fail as soon as the old server is switched off. With them, each old URL answers with its new location, and visitors arrive on the right page.
301 redirects during a domain change#
For a permanent move, use a 301 redirect. It tells browsers and search engines that a page has moved for good, and where it lives now. Temporary redirects (302 or 307) are meant for moves you plan to reverse, so they send the wrong signal during a migration.
The redirects only work while something answers for the old domain. Pointing the old domain’s DNS at a redirect service, instead of keeping the old server online, lets you retire that server while the old URLs keep resolving over HTTPS.
Same-path and changed-URL migrations#
Migrations come in two shapes:
- Same paths. The new site keeps the URL structure and only the domain changes. One whole-domain redirect forwards each path and query string, so /blog/launch on the old domain lands on /blog/launch on the new one.
- Changed URLs. Pages were renamed, merged or reorganised. Each one needs its own row in a redirect map: the old URL, and the new URL that replaces it.
Knowing which case applies to each hostname tells you how large the redirect map needs to be.
Redirect mapping and migration planning#
A redirect map is a spreadsheet with one row per old URL and its destination. Building it is most of the work in a migration:
- List the old URLs that must keep working. Your sitemap, analytics and backlink reports are good sources, along with any URLs that were printed or sent in emails.
- For each one, pick the closest equivalent page on the new site.
- Save the map as a CSV file with a source column and a destination column.
- Review the import before anything is written, and fix the rows that have errors.
- Once DNS points to the redirect service, spot-check key URLs, then retire the old server.
Common migration redirect mistakes#
- Sending everything to the home page. Visitors lose the page they were looking for. Redirect each URL to its closest equivalent instead.
- Redirect chains. An old URL that passes through an interim URL before the final one adds a hop to every visit. Point each old URL straight at its final destination.
- Temporary redirects for a permanent move. Use 301, not 302, when the move is for good.
- Dropping query strings. Campaign and tracking parameters should carry through to the new URL.
- Forgotten hostnames. The www version, country domains and old subdomains each need a redirect too.
- Switching off the old server too early. Confirm the redirects answer for the old domain before you turn the old server off.
Frequently asked questions
