Sub topic 12
Comparing Sitemaps with the Crawl and Finding Orphan Pages
Prerequisites
This chapter assumes you can run a crawl and read the Internal tab (see the earlier chapters on first crawls and reading results). You should also know what an XML sitemap is, what indexability means, and how inlinks work. You need permission to crawl the site, and ideally access to Google Search Console and Google Analytics for the same property.
Why the crawl and the sitemap disagree
A crawl and an XML sitemap are two independent lists of URLs.
- The crawl lists what the SEO Spider could reach by following links from the start URL.
- The sitemap lists what the site owner, or the CMS, says should be indexed.
Differences between the two lists point to real problems. A URL in the sitemap that the crawl never reached may be an orphan page: a page with no internal links pointing to it. A URL that the crawl found but the sitemap omits may be a page you intended to exclude, or one the sitemap generator missed.
The SEO Spider can only find orphans if you give it a second source of URLs. A pure link crawl cannot discover a page that nothing links to. The sitemap, Google Analytics and Search Console are those extra sources.
Step 1: Include the sitemap in the crawl
Open Configuration > Spider > Crawl and find the XML sitemap options. There are two relevant settings:
- Crawl Linked XML Sitemaps makes the Spider read sitemaps referenced in
robots.txt, or ones you list yourself. - Auto Discover XML Sitemaps via robots.txt finds the sitemap location from the
Sitemap:line.
You can also paste one or more sitemap URLs manually. If your site uses a sitemap index file, enter the index URL. The Spider follows the child sitemaps listed in it.
Then start the crawl as usual. The sitemap URLs are collected alongside the link-discovered URLs.
The setting names and locations differ slightly between versions. If you cannot find one, check the version's configuration menu rather than assuming the option is missing.
Step 2: Add other URL sources for orphan detection
Sitemaps only reveal orphans that happen to be listed in them. To find more, connect an API source:
- Open Configuration > API Access and connect Google Analytics or Search Console. The API chapter covers authentication.
- In each API's settings, find the option to crawl new URLs discovered. In current versions this is a checkbox, often labelled as crawling new URLs found in the API data.
- Run the crawl.
URLs that appear in Search Console or Analytics but are not found by following links are candidate orphans. They may have been visited by users, bookmarked, or indexed from old links.
Step 3: Run Crawl Analysis
Orphan and sitemap filters stay empty until you run Crawl Analysis. This is a separate step after the crawl finishes.
- Open Crawl Analysis > Configure.
- Tick the items you want, such as Sitemaps, Orphan Pages, Link Score, and others.
- Click Start (or choose Crawl Analysis > Start).
When the analysis finishes, the Sitemaps tab and the orphan filters populate. If you change the crawl or add data, run the analysis again.
Reading the Sitemaps tab
The Sitemaps tab has filters that compare the sitemap with the crawl. The names below are the common ones. Exact wording can vary by version.
| Filter | What it means | Typical action |
|---|---|---|
| URLs in Sitemap | Crawled URLs also listed in a sitemap | Baseline for comparison |
| URLs not in Sitemap | Indexable pages found by the crawl but absent from the sitemap | Add them if they should rank, or leave them out on purpose |
| Orphan URLs | In the sitemap, but with no internal links from the crawl | Link to them, or remove them from the sitemap |
| Non-Indexable URLs in Sitemap | Listed in the sitemap but blocked, noindexed, canonicalised, or redirecting | Remove from the sitemap or fix the directive |
| URLs in Multiple Sitemaps | Same URL listed more than once | Deduplicate |
| XML Sitemap with over 50k URLs | Sitemap exceeds the protocol limit | Split into several files |
| XML Sitemap over 50MB | File exceeds the size limit | Split or compress |
Sitemaps should list only canonical, indexable URLs that return 200. A sitemap full of redirects, 404s and noindex pages wastes crawl effort and signals poor maintenance.
Orphan pages in other filters
If you connected Analytics or Search Console, the Analytics and Search Console tabs have their own Orphan URLs filter. These show URLs that had traffic or impressions but were not linked internally. A page with real impressions and no internal links is often the most valuable orphan to fix, because search engines already see value in it.
Classifying orphans before you act
Not every orphan is a mistake. Decide what each one is before changing anything.
- Should rank and is valuable. Add internal links from relevant pages and, if needed, to navigation or hub pages.
- Outdated or low value. Remove it, redirect it with a 301 to the closest equivalent, or return a 410.
- Utility or campaign page. Landing pages for ads or email may be orphaned on purpose. Add
noindexif they should stay out of search. - Duplicate or parameter URL. Fix canonicals, or use an Exclude rule so it stops appearing.
Exporting the comparison
You can export any filter with the Export button. For a script-based check, export the Sitemaps tab and compare the lists yourself.
import csv
crawl_urls = set()
with open("internal_all.csv", newline="", encoding="utf-8-sig") as f:
for row in csv.DictReader(f):
if row["Status Code"] == "200":
crawl_urls.add(row["Address"])
sitemap_urls = set()
with open("sitemap_urls.txt", encoding="utf-8") as f:
for line in f:
line = line.strip()
if line:
sitemap_urls.add(line)
print("In sitemap, not found by crawl:")
for url in sorted(sitemap_urls - crawl_urls):
print(" ", url)
print("Crawled, not in sitemap:")
for url in sorted(crawl_urls - sitemap_urls):
print(" ", url)This script expects sitemap_urls.txt with one URL per line. Normalise trailing slashes, http versus https, and www before comparing. Otherwise the same page appears in both difference lists.
Common errors and gotchas
- Crawl Analysis never ran. The filters stay empty or show stale numbers.
- Sitemap on another host. Sitemap URLs on a different subdomain or protocol may be treated as external and not crawled. Check your scope settings.
- Exclude and include rules. URLs that you exclude cannot appear as orphans or in the comparison. A rule that is too broad hides real problems.
- robots.txt blocks. If robots.txt disallows a URL, the Spider cannot fetch it and cannot judge it. Such URLs appear as blocked rather than as normal orphans.
- Crawl depth and limits. A limit on total URLs or depth can make pages look unlinked when the crawl simply stopped early.
- JavaScript-only links. If navigation is injected by JavaScript and rendering is off, pages appear orphaned. Enable rendering and recrawl before concluding they are orphans.
- Pagination and faceted URLs. Large sites can show thousands of parameter URLs that are not real orphans.
- API data is dated. Search Console and Analytics show a past time window. A URL with old traffic may have been deleted deliberately.
A short workflow
- Enable sitemap crawling and, if available, Analytics and Search Console.
- Crawl the site and confirm it completed within your limits.
- Run Crawl Analysis.
- Review Non-Indexable URLs in Sitemap first, since these are quick wins.
- Review Orphan URLs and classify each one.
- Fix the sitemap or the internal links, then recrawl and compare against the saved crawl.
Exercise
You run a crawl with the sitemap enabled. The Sitemaps tab shows no Orphan URLs, yet you know a few old pages are not linked anywhere. Give two likely causes and one action for each.
Show answer
First, Crawl Analysis was not run after the crawl, so the filters were never populated. Run Crawl Analysis and check again. Second, the orphan pages are not listed in the sitemap and no Analytics or Search Console source was enabled, so the Spider has no way to learn their URLs. Connect Search Console or Analytics and enable crawling of the URLs they report, then crawl and run analysis again.
Exercise
A page in your sitemap carries a noindex directive and appears under Non-Indexable URLs in Sitemap. What are two valid fixes, and how do you choose?
Show answer
Remove the URL from the sitemap, or remove the noindex directive. If the page should stay out of search, take it out of the sitemap, because a sitemap should list only indexable URLs. If the page should be indexed, the noindex is the mistake, so remove it and keep the URL in the sitemap.