Skip to content
Nazmul Nikhil
Menu

Sitemap.xml Not Indicated in Robots.txt (Semrush): Add One Line

Semrush flags robots.txt files that don't list your sitemap. Adding a Sitemap line helps every crawler find it. Here's the exact line and where to add it.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Sitemap.xml Not Indicated in Robots.txt (Semrush): Add One Line
Photo: ron dyar on Unsplash

In short

Semrush flags "Sitemap.xml not indicated in robots.txt" when your robots.txt has no Sitemap: line. Crawlers that don't use Search Console (Bing, AI crawlers, SEO tools) check robots.txt to find the sitemap. Add one line with the full URL.

Search Console is one way to tell Google about your sitemap. Robots.txt is how you tell everyone else.

The fix

Sitemap: https://example.com/sitemap_index.xml
  • Use the full absolute URL.

  • It can go anywhere in the file; the end is conventional.

  • List several lines if you have several sitemaps or an index.

Where to add it

WordPress: Yoast and Rank Math add it to the virtual robots.txt automatically; if you have a physical robots.txt file, it overrides theirs, so add the line yourself. Shopify: included by default. Webflow: add it in Site settings > SEO > robots.txt. Wix: included by default. Custom builds: add it to the static file.

This guide isn't affiliated with or endorsed by Semrush.

Sources and references

TAGSSemrush Site AuditSemrush sitemap.xml not indicated in robots.txtAdd sitemap to robots.txtSitemap directive
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com