---
title: "Redirects and canonicals · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/redirects-and-canonicals
updated: 2026-10-20
licence: "All rights reserved"
---

# Redirects and canonicals

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

> 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.

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.

**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`.

## Required

- [Keep every old address in one redirect map](https://agentwranglers.se/playbook/website/redirects-and-canonicals/redirect-map): Keep 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](https://agentwranglers.se/playbook/website/redirects-and-canonicals/closest-match): Redirect 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](https://agentwranglers.se/playbook/website/redirects-and-canonicals/final-addresses): Link 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](https://agentwranglers.se/playbook/website/redirects-and-canonicals/redirect-codes): Use 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](https://agentwranglers.se/playbook/website/redirects-and-canonicals/canonical-signals): Give 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](https://agentwranglers.se/playbook/website/redirects-and-canonicals/gone-pages): Answer 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](https://agentwranglers.se/playbook/website/redirects-and-canonicals/site-moves): When 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](https://agentwranglers.se/playbook/website/redirects-and-canonicals/watch-not-found): Check regularly which missing addresses people still request, and add a redirect for the ones with a replacement.

## Optional

- [Say who made each redirect](https://agentwranglers.se/playbook/website/redirects-and-canonicals/redirect-by): Name the system that made each redirect in a `Redirect-By` header, so you can trace redirects.

## Avoid

- [Avoid meta refresh and JavaScript redirects](https://agentwranglers.se/playbook/website/redirects-and-canonicals/client-side-redirects): Don't redirect with `<meta http-equiv="refresh">` or JavaScript. Do it on the server.

- Previous: [SEO](https://agentwranglers.se/playbook/website/seo)
- Next: [Accessibility](https://agentwranglers.se/playbook/website/accessibility)
- [All chapters](https://agentwranglers.se/playbook/website)
