robots.txt references sitemap
mediumrobots_txt_sitemap
Checks that robots.txt references the sitemap.
What does this rule check?
The Sitemap directive in robots.txt tells search engines where to find your XML sitemap. This ensures crawlers discover your sitemap even without Google Search Console or other submission methods.
Why is this important?
Without a sitemap reference in robots.txt, search engines may not discover your sitemap automatically. This means pages might be discovered more slowly.
How to fix
Add a Sitemap line to your robots.txt with the full URL of your sitemap.
Examples
Incorrect
User-agent: *
Allow: /
<!-- No Sitemap directive -->
Correct
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml
Agent fix snippet
Copy this snippet and paste it into your AI coding agent to fix this issue automatically.
Add a Sitemap directive to robots.txt:
Sitemap: https://yourdomain.com/sitemap.xml