---
title: "Watch for broken old links · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/redirects-and-canonicals/watch-not-found
updated: 2026-10-20
licence: "All rights reserved"
---

# Watch for broken old links

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

- Level: Recommended
- Chapter: [Redirects and canonicals](https://agentwranglers.se/playbook/website/redirects-and-canonicals)
- Rule: Every week, list the missing addresses people still request, and add a redirect for each one with a replacement.
- How: Count 404 answers by path in the server logs each week. Keep IP addresses out of those logs. Ignore obvious probes for software you don't run. Add the old links to the redirect map.
- Check: Run the report weekly. Each of the 20 most requested 404 paths has a redirect entry or is a known probe on an ignore list.

Example:

```sh
# Most requested missing paths this week. Log format without IP addresses:
# [$time_local] "$request" $status $body_bytes_sent $request_time
zcat -f /var/log/nginx/site.log* | awk '$(NF-2) == 404 { print $4 }' | sort | uniq -c | sort -rn | head -20
```

**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/watch-not-found`.

- Previous: [Move a site or domain without losing links](https://agentwranglers.se/playbook/website/redirects-and-canonicals/site-moves)
- Next: [Say who made each redirect](https://agentwranglers.se/playbook/website/redirects-and-canonicals/redirect-by)
- [Redirects and canonicals](https://agentwranglers.se/playbook/website/redirects-and-canonicals)
