Sub topic 5
Finding broken links and redirect problems
This chapter assumes you can read HTTP status codes (200, 301, 404, 500) and have already run a first crawl and opened the Internal tab. Here you use the Response Codes tab to find broken links and redirect problems on a site you own.
What the Response Codes tab shows
The Response Codes tab lists every crawled URL with its status code. Filters split the list into groups:
| Filter | What it contains | Why it matters |
|---|---|---|
| Blocked by Robots.txt | URLs the crawler was not allowed to fetch | Confirms robots.txt blocks only what you intend |
| No Response | URLs that timed out or failed to connect | Often a server or DNS problem |
| Success (2xx) | Pages that loaded normally | Your baseline |
| Redirection (3xx) | URLs that forward to another URL | Check for chains and loops |
| Client Error (4xx) | Missing or forbidden pages | Broken links and lost pages |
| Server Error (5xx) | Server failures | Urgent, and can be intermittent |
Select a filter, then click a URL and open the Inlinks tab in the bottom panel. Inlinks lists the pages that link to the selected URL, so you know where to make the fix.
Finding broken links
- Open Response Codes and choose the Client Error (4xx) filter.
- Click a 404 URL.
- Open Inlinks at the bottom and note the Source page and the Anchor Text.
- Fix the link on the source page, or restore the missing page.
To get every broken link with its source page at once, use Bulk Export > Response Codes > Client Error (4xx) Inlinks. Each row gives one broken link and the page it sits on.
For 5xx errors, recrawl the URL before you act. A server that was overloaded during the crawl can return a 503 that disappears later. Lowering the crawl speed also reduces such errors.
Finding redirect problems
A redirect is not an error, but redirected internal links waste crawl effort and slow users. Look for these cases:
- Internal links pointing at a 301. Update the link to point at the final URL.
- Redirect chains. URL A redirects to B, which redirects to C. Browsers and search engines follow only a limited number of hops.
- Redirect loops. A redirects to B and B redirects back to A. The page never loads.
- Temporary redirects (302, 307). If the move is permanent, use a 301 or 308.
To find chains, use Reports > Redirects > Redirect Chains. The report lists each hop and flags loops. The fix is to redirect the first URL straight to the final one, and to update internal links to the final URL.
Processing the export
After you export Client Error (4xx) Inlinks, a short script can count broken links by source page. Check the exact column names in your own export, because they can vary by version. This script assumes "Source" and "Destination".
import csv
from collections import Counter
counts = Counter()
with open("client_error_4xx_inlinks.csv", newline="", encoding="utf-8-sig") as f:
for row in csv.DictReader(f):
counts[row["Source"]] += 1
for source, n in counts.most_common(10):
print(n, source)Pages at the top of this list give you the most fixes for the least editing.
Exercise
A crawl shows /a redirecting to /b, and /b redirecting to /c, which returns 200. Which redirect should you change, and which links should you update?
Show answer
Change /a so it redirects directly to /c, which removes the chain. Update internal links that point at /a or /b so they point at /c. Use the Inlinks tab to find those links.