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.
- Recommended 9
- 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.
Recommended
Keep every old address in one redirect map
WEB-81Keep 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
WEB-82Redirect each old address to the new page that best replaces it. Never send many old pages to the home page.
Answer 404 or 410 when a page is gone for good
WEB-83Answer 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.
Link only to final addresses
WEB-84Link 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
WEB-85Use a server-side permanent redirect (301 or 308) for anything that moved for good. Use 302 or 307 only for short-term moves, and 303 only to show a result page after a form post.
Make every canonical signal agree
WEB-87Give each page one canonical address, and make the canonical tag, sitemap, Open Graph address, hreflang links and internal links all use exactly that address.
Move a site or domain without losing links
WEB-88When 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
WEB-89Every week, list the missing addresses people still request, and add a redirect for each one with a replacement.
Check the links you send people to
WEB-90Every week, fetch every link that points to another site, and alert when one fails twice in a row.
Optional
Say who made each redirect
WEB-91Name the system that made each redirect in a
Redirect-Byheader, so you can trace redirects.
Avoid
Meta refresh and JavaScript redirects
WEB-86Don't redirect with
<meta http-equiv="refresh">or JavaScript. Do it on the server.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/redirects-and-canonicals">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.