Sitemap is not declared in robots.txt
This error appears when your website's robots.txt file doesn't include the line that indicates where the sitemap is. Here's what it means and how to add that line in a couple of minutes.
What this error means
Why declaring the sitemap in robots.txt matters
Impact on SEO rankings
The direct effect on your rankings is usually small. Where it shows most is on new websites, on sites with many pages and on those that use an unusual sitemap address, because there a clearly signposted sitemap helps content get discovered sooner.
Crawling and indexing obstacles
Without the Sitemap line, search engines where you haven't registered your website can only discover your pages by following links. The ones with few internal links are the ones that take longest to get crawled.
Negative signals for site quality
A missing line doesn't lower your website's quality, but for whoever audits it, it's a hint that the robots.txt isn't reviewed often. Take the chance to go over the whole file and check that it doesn't block sections you want to see in Google.
How to fix it step by step
If this error showed up in your audit, here are the steps to leave it behind.
Find the exact URL of your sitemap
Before touching the robots.txt, confirm what URL your sitemap has. It's usually at yourdomain.com/sitemap.xml, although in WordPress, plugins like Yoast or Rank Math generate a sitemap index at sitemap_index.xml, a file that groups all the others. If you have an index, declaring that one is enough.
Add the Sitemap line to the robots.txt
If you use WordPress, the robots.txt is usually generated by the SEO plugin and is changed from its dashboard. Otherwise, it's a file in the root of your website that you can edit from your hosting's file manager. Write the word Sitemap followed by the full URL, with protocol and domain. A relative path like /sitemap.xml won't work. Also make sure the address matches your website's, with https and with or without www depending on which one you use. For example, "Sitemap: https://www.yourdomain.com/sitemap_index.xml". The line can go anywhere in the file, although it's usually placed at the end. If you have several sitemaps without an index, add one line for each.
Check the published file
Go to yourdomain.com/robots.txt in your browser and confirm that the line appears exactly as you wrote it. Then copy the URL from that line and open it to check that the sitemap displays without errors. If it doesn't open, check that the address matches the sitemap your website or plugin generates.
Submit the sitemap to Google Search Console
If you hadn't done so yet, also submit it from the Sitemaps report in Google Search Console, because there you can see whether Google processes it and whether it finds errors. Finally, run the audit again in Ruk Audit to confirm that the error is gone.
Does your site have this problem?
Audit your website for free and discover if this and other SEO errors are affecting your ranking.