Sub topic 9
Tracing problems with inlinks, crawl depth and bulk exports
This chapter assumes you can run a crawl and read the Internal tab, and that you know the status codes covered in the earlier chapters. You will learn how to take a problem URL and trace it back to the pages that cause it. You will also learn how to use crawl depth to judge how reachable a page is, and how to export the data for other people.
Why a problem URL is not enough
A filter such as Response Codes > Client Error (4xx) tells you that /old-guide/ returns a 404. It does not tell you where the broken link lives. The fix is almost always on a different page: you edit the page that links to the broken URL, not the broken URL. Inlinks give you that missing information.
Inlinks and outlinks
An inlink is a link on one crawled page that points to another URL. An outlink is the same link seen from the page it sits on. The SEO Spider records both for every URL it finds.
Select any URL in the top window, then open the Inlinks tab in the lower window. Each row is one link pointing at that URL. Useful columns include:
| Column | What it tells you |
|---|---|
| From | The page that contains the link |
| To | The URL being linked to |
| Anchor Text | The visible link text, or the image alt text for image links |
| Follow | Whether the link is followed or has a nofollow-style attribute |
| Link Position | Where the link sits, for example Navigation, Content or Footer |
| Status Code | The response code of the target |
The Outlinks tab shows the same data from the other side. Use it when you are auditing one template page and want to see every link it sends out.
The Internal tab also has Inlinks and Unique Inlinks columns. Inlinks counts every link. Unique Inlinks counts each linking page once, even if it links to the target three times. For prioritising, Unique Inlinks is the better measure of how many pages are affected.
Link position matters
A broken link in the main navigation appears on every page, so it creates thousands of inlinks from one template edit. A broken link in body content is a single editorial fix. Check the Link Position column before deciding who needs to fix it. If your theme uses unusual element names, you can adjust the position rules in the configuration so that links are classified correctly.
Crawl depth
Crawl depth is the minimum number of link hops from the start URL to a page. The start URL is depth 0. A page linked from the homepage is depth 1. A page linked only from a depth-1 page is depth 2, and so on. The SEO Spider uses the shortest path it found.
Crawl depth is not the same as folder depth. /a/b/c/d/ has four folder levels, but if the homepage links to it directly, its crawl depth is 1.
Deep pages matter for two reasons:
- Search engines tend to crawl and revisit pages that are close to the homepage more often.
- Pages deep in the structure usually receive fewer internal links, so they carry less internal link equity.
Find depth in the Crawl Depth column of the Internal tab, or in the Site Structure view in the right-hand panel, which shows how many URLs sit at each depth. A site where thousands of URLs sit at depth 6 or more usually has weak category linking or pagination that hides content.
In the diagram, the product page can be reached by two routes. The route through the blog post is not shorter than the route through the category, so its depth is 3 either way. If the homepage linked straight to the product page, its depth would drop to 1.
A tracing workflow
Use this sequence whenever a filter shows a problem:
- Open the relevant filter, for example Response Codes > Client Error (4xx).
- Click a URL and open the Inlinks tab.
- Read the From, Link Position and Anchor Text columns to find where the link sits.
- Decide whether the fix is one template edit or many content edits.
- Check Crawl Depth for the affected pages. A broken link on a depth-1 page deserves attention sooner than one on a depth-7 page.
This works for one URL at a time. For a whole site you need the bulk export.
Bulk exports
The Bulk Export menu exports link data for many URLs at once. Each export has one row per link, not one row per URL, which is why the files can be large. Common choices:
- All Inlinks exports every link the crawl found.
- Response Codes > Client Error (4xx) Inlinks lists each broken link with the page it sits on.
- Response Codes > Redirection (3xx) Inlinks lists each link that points to a redirecting URL.
- Similar entries exist for canonicals, directives and other issue types.
The Export button above a tab exports the URL list for that tab. Bulk Export exports the links behind those URLs. Mixing them up is a common mistake. If you send a developer the 4xx URL list, they know what is broken but not where to fix it. Send the 4xx Inlinks export instead.
Processing an inlinks export
The following script reads a 4xx inlinks export and groups the linking pages by broken target. Set path to wherever you saved the file. It assumes the export has From and To columns.
import csv
from collections import defaultdict
path = "/tmp/sf-crawl/client_error_4xx_inlinks.csv"
sources = defaultdict(set)
with open(path, newline="", encoding="utf-8-sig") as f:
for row in csv.DictReader(f):
sources[row["To"]].add(row["From"])
# Broken targets with the most distinct linking pages first
for target, pages in sorted(sources.items(), key=lambda kv: len(kv[1]), reverse=True):
print(f"{len(pages):5d} {target}")
for page in sorted(pages)[:3]:
print(f" linked from {page}")Using a set counts each linking page once, which matches the idea of Unique Inlinks. The output shows which broken URLs affect the most pages, and gives three example pages to check by hand.
Common errors
- Reading the inlink count as importance. A URL with 4,000 inlinks from a footer link has one cause, not 4,000.
- Expecting inlinks for pages the crawl never reached. The SEO Spider only reports links from pages it crawled. If a page was excluded, blocked by robots.txt or beyond a depth limit, links on it are missing from the data.
- Forgetting configuration limits. If you set a maximum crawl depth under Configuration > Spider > Limits, pages beyond it are never found, and the depth report looks cleaner than the site really is.
- Trusting depth after a partial crawl. Depth is only valid for a completed crawl from the correct start URL. Starting from a subfolder changes every depth value.
Exercise
A crawl shows 1,200 inlinks to a 404 URL. The Unique Inlinks column shows 1,200 too, and every inlink has Link Position "Content". What does this tell you about the fix, and which export would you send the content team?
Show answer
Every inlink comes from a different page and sits in body content, so the fix is many separate content edits, not one template change. Send them the Bulk Export > Response Codes > Client Error (4xx) Inlinks file. It lists each linking page in the From column, so editors know which pages to open. Alternatively, a redirect from the 404 URL to a relevant live page would fix all links at once, but you should still update the links to avoid redirect hops.
Exercise
A product page is linked from a category page at depth 2 and, separately, from a blog post at depth 4. What is its crawl depth, and what would change it?
Show answer
Its crawl depth is 3, one more than the shallowest linking page. It would change only if a page at a lower depth, such as the homepage, linked to it directly, or if the category page's own depth changed.