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

# Link only to final addresses

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

- Level: Required
- Chapter: [Redirects and canonicals](https://agentwranglers.se/playbook/website/redirects-and-canonicals)
- Rule: Link only to addresses that answer 200. Never link to a redirect from your own pages, sitemap, feeds or canonical tags.
- How: After a move, update internal links, the sitemap, feeds, canonicals, hreflang and Open Graph addresses to the new paths. Redirects are for links you cannot change. Make the build fail when a page links to an address that is in the redirect map.
- Check: The build rejects any page whose links point at a redirect. Fetching every sitemap address returns 200 with no redirect.

Example:

```js
// Build check: no internal link may point at an old address
for (const href of html.matchAll(/href="(\/[^"#?]*)/g)) {
  if (redirects.has(href[1])) fail(`${page}: links to ${href[1]}, which redirects. Link to ${redirects.get(href[1])}`);
}
```

```python
import re, sys
for href in re.findall(r'href="(/[^"#?]*)', html):
    if href in redirects:
        sys.exit(f"{page}: links to {href}, which redirects. Link to {redirects[href]}")
```

**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/final-addresses`.

- Previous: [Answer 404 or 410 when a page is gone for good](https://agentwranglers.se/playbook/website/redirects-and-canonicals/gone-pages)
- Next: [Use the right redirect code](https://agentwranglers.se/playbook/website/redirects-and-canonicals/redirect-codes)
- [Redirects and canonicals](https://agentwranglers.se/playbook/website/redirects-and-canonicals)
