Skip to content
Documentation
Rule catalogue

robotstxt.sitemap.relative

A Sitemap: declaration must be an absolute URL

errorsite-widespec-required

Why it matters

robots.txt is fetched on its own, so a consumer has no page to resolve a relative path against. The declaration reads as an instruction and resolves to nothing.

What the finding looks like

The message goflag prints, with example values substituted.

error robotstxt.sitemap.relative Sitemap: must be a full URL: line 3 declares /sitemap.xml. robots.txt is fetched on its own, so there is no page for a consumer to resolve a relative path against.

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 documents 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.