Redirects and canonicals
Keep every old link working. Send each old address to the right new page in one hop, and make every signal point at the one true address of each page.
- Required 5
- Recommended 3
- Optional 1
- Avoid 1
When a page moves, every old link to it still exists somewhere, such as in search results, other sites, bookmarks, emails and AI answers. A redirect map keeps those links working. Canonical signals tell search engines and agents which address is the one.
Required
Keep every old address in one redirect map
RequiredKeep every address you have ever published in one redirect map, and check it before any other route. Never delete an entry.
Send each old page to its closest new page
RequiredRedirect each old address to the new page that best replaces it. Never send many old pages to the home page.
Link only to final addresses
RequiredLink only to addresses that answer 200. Never link to a redirect from your own pages, sitemap, feeds or canonical tags.
Use the right redirect code
RequiredUse a server-side permanent redirect (301 or 308) for anything that moved for good. Use a temporary one (302, 303 or 307) only for short-term changes.
Make every canonical signal agree
RequiredGive each page one canonical address, and make the canonical tag, sitemap, Open Graph address, hreflang links and internal links all use exactly that address.
Recommended
Answer 404 or 410 when a page is gone for good
RecommendedAnswer unknown addresses and content removed with no replacement with 404 or 410 and a helpful page. Never show "not found" with a 200, and never send unknown pages to the home page.
Move a site or domain without losing links
RecommendedWhen a whole site or domain moves, redirect every old address one to one. Keep the redirects as long as possible, and at least a year.
Watch for broken old links
RecommendedCheck regularly which missing addresses people still request, and add a redirect for the ones with a replacement.
Optional
Say who made each redirect
OptionalName the system that made each redirect in a
Redirect-Byheader, so you can trace redirects.
Avoid
Avoid meta refresh and JavaScript redirects
AvoidDon't redirect with
<meta http-equiv="refresh">or JavaScript. Do it on the server.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/redirects-and-canonicals.