Skip to content
Documentation
Rule catalogue

sitemap.entry.out-of-scope

A sitemap may only list URLs under its own directory

errorsite-widespec-required

Why it matters

A sitemap only speaks for the directory it is served from: one at /catalog/sitemap.xml may list URLs under /catalog/ and not under /images/. A root-level sitemap is exempt by construction, which is most of them — this catches the sites that split sitemaps per section and serve each from its own section, then let one drift outside its own patch.

What the finding looks like

The message goflag prints, with example values substituted.

error sitemap.entry.out-of-scope 3 entries are outside this sitemap's directory /catalog/: https://example.com/images/a, https://example.com/images/b, https://example.com/blog/c. A sitemap only speaks for the path it is served from, so a consumer may drop them — serve the document from the root, or move the entries into a sitemap that covers them.

How to fix it

The catalogue carries no snippet for a site rule: a cross-page rule builds its remedy from what the crawl found, so goflag attaches the fix to the finding itself rather than to the rule. Run it and read the finding.

Says who?

This rule is spec-required, and it cites the document below. Nothing here is goflag’s opinion of what a good page looks like — if you disagree with a finding, this is what you are disagreeing with.