Making a List of Old Addresses and Their New Ones
A redirect list is a two-column sheet. The left column holds every old address. The right holds the page that should replace it. Make it before you change anything, because once the old addresses are gone it's hard to remember what they were.
Step one: collect the old addresses
You won't find them all in one place, so pull from several. Google suggests these sources.1
- Your sitemaps, since your key pages are likely listed there.
- Your server logs or analytics software, to see which addresses get the most visitors.
- Your content management system, which can typically list every address that holds content.
Pictures, videos, scripts and style files have addresses too. Include them if they're moving.1
What you'll see is a longer list than you expected. Old campaign pages, forgotten uploads and half-finished drafts turn up. Don't throw any out yet.
Step two: pair each one
Once you have the list, decide where each old address should redirect to. Google says how you store the pairs depends on your servers and the move. You might use a database, or set up rewriting rules for common patterns.1
A tidy layout looks like this:
| Old address | New address | Code |
|---|---|---|
| /about-us | /who-we-are | permanent |
| /events/last-year | /events/archive | permanent |
| /summer-sale | (no match yet) | decide |
The code column reminds you which kind each one is. Google recommends permanent redirects for a site move.1 The codes page explains the choice.
Pair like with like
Send each old page to the page that most closely replaces it. Google warns against pointing many old addresses at one unrelated place, such as the home page of the new site. That can confuse visitors and may be treated as a soft 404, which is a page that looks missing even though the server says it's fine.1
If you've merged several old pages into one new page, sending them all to that page is fine.1
Rows that say "no match yet" need a decision. Maybe a close page exists. Maybe nothing does, and an honest error page is the better answer.
Step three: fix your own links
A redirect costs an extra request each time someone follows it. MDN says to avoid internal redirects where you can, and to correct the internal links instead.2 Google gives the same step: update the links on the new site, and use your list to find them.1
So the list does two jobs. It feeds your redirect rules, and it tells you which links in your own pages to rewrite.
Keep the list afterwards
Don't delete the sheet when the move is done. It's your record of what each rule is meant to do. When a link breaks months later, you can look up what the old address was supposed to reach. It also helps you catch chains and loops, where one rule points into another.
When the rules are live, test a sample from each group of pages. The checking page shows how to read what an address really returns. Where the rules go depends on your site, which the setup page covers.
Cited material
- Site move with URL changes, Google Search Central
- Redirections in HTTP, MDN Web Docs