squirrelscan
GitHub

Cross-domain sitemap URL: why search engines ignore it

A sitemap can only vouch for URLs on its own host. squirrel compares every sitemap entry's hostname against your base URL.

What cross-submission means

A sitemap normally speaks for the host that serves it, so a <loc> on another domain is usually a generator with the wrong base URL or a leftover from a migration.

Cross-submission is not forbidden. Google accepts URLs for another host when you have verified ownership of both, or when the other host’s robots.txt names the sitemap. This rule does not know about either arrangement: it compares hostnames only, treating the www and bare forms of one registrable name as the same site. A deliberate, authorised cross-submission will therefore be flagged.

What squirrel checks

The rule is site-wide. It takes the hostname of the site’s base URL, then compares it against the hostname of every <loc> in every discovered sitemap, lowercased.

  • Skipped when no sitemap was discovered. Message: No sitemap to validate.
  • Skipped when the base URL has no parseable hostname. Message: Could not determine expected domain.
  • Fail when any entry’s hostname differs. Message: N URL(s) point to different domain(s), where N is the exact count. It lists the first 50 URLs with the host each resolved to, and details.total holds the count. Past 50, additional and pagesTruncated record the rest, so the report still shows the full number of affected URLs. foundHosts lists up to 50 hosts, with hostCount when there are more. Severity error, weight 8.
  • Pass otherwise. Message: All sitemap URLs match site domain.

A hostname matches when it equals the expected host, equals www. plus the expected host, or when www. plus itself equals the expected host. Entries whose <loc> has no parseable hostname are skipped rather than flagged.

How to fix it

<url><loc>https://example.com/pricing</loc></url>

Set the generator’s base URL to the canonical host and regenerate. A site that has just moved domains will produce this finding until the sitemap is rebuilt; fix the sitemap, not the redirects.

If the cross-domain entries are intentional, verify both hosts in Search Console or reference the sitemap from the other host’s robots.txt, and disable this rule for that site.

Rule IDcrawl/sitemap-domain
CategoryCrawlability
ScopeSite-wide
Severityerror
Weight8/10

Enable / disable

Disable this rule

[rules]
disable = ["crawl/sitemap-domain"]

Disable all Crawlability rules

[rules]
disable = ["crawl/*"]

Enable only this rule

[rules]
enable = ["crawl/sitemap-domain"]

enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.

Crawlability findings ship in every audit next to the SEO, performance and agent experience rules. See The Screaming Frog alternative for agents for how an agent works through a report.

References

Check your site

Run squirrel audit https://example.com and open the Crawlability section of the report. Every cross-domain entry is listed with the host it points at. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.

Type to search…

↑↓ navigate↵ openesc close