Skip to content
DevMarDe
Crawl Audit check 34Crawl AuditTechnical SEO

Sitemap line in robots.txt: Crawl Audit check 34

Crawl Audit check 34 looks for a Sitemap: line in robots.txt. The exact rules for that line, and why it's the cheapest way to make a sitemap findable.

Zain Kazmi2 min read
On this page
Check
34 of 200
Module
Technical SEO & Indexability
Group
Crawlability & Indexing
Impact
Medium

Short answer: one line in your robots.txt, Sitemap: https://yourdomain.com/sitemap.xml, tells every crawler that reads robots.txt where your sitemap is. Check 34 warns when that line is missing, or points somewhere other than the sitemap Crawl Audit found. It takes a minute to fix.

What Crawl Audit checks

  • Pass: the sitemap Crawl Audit found is the one named in the first Sitemap: line of your robots.txt.
  • Warning: the sitemap exists but robots.txt doesn't name it.
  • Warning: there's no sitemap at all (fix check 32 first).

The rules for the Sitemap line

From Google's robots.txt specification and the sitemaps protocol:

  • "It must be a fully qualified URL, including the protocol and host". Sitemap: /sitemap.xml isn't valid.
  • "The URL doesn't have to be on the same host as the robots.txt file."
  • "You can specify multiple sitemap fields, with no limit to the number of sitemaps you can include."
  • "The sitemap field isn't tied to any specific user agent", or in the protocol's words, "it doesn't matter where you place it in your file."
User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml

Ours is the last line of our robots.txt: Sitemap: https://devmarde.com/sitemap.xml.

Why it's worth it when you've also submitted it

Submitting your sitemap in Google Search Console tells Google. The robots.txt line tells everyone else that reads robots.txt: Bing, other search engines, and the AI crawlers. It's the same sitemap, made findable in one more place.

On your platform

  • WordPress: core adds the line for its own sitemap automatically. If Yoast replaces the sitemap, check the line points to /sitemap_index.xml.
  • Shopify: the default robots.txt includes the sitemap line.
  • Wix: check in the Robots.txt Editor, and add the line if it's missing.
  • Next.js: set sitemap in app/robots.ts.

Sources

All 200 Crawl Audit checks

See how your site does on every check.

Crawl Audit runs this check and 199 others on your domain. The full report is $7.89, one time. The free check on this site covers 25.