How to use the Sitemap & Robots.txt Checker
- Enter your domain, like yoursite.com. To check one file, paste the sitemap URL instead.
- Fix the red items first: they stop pages from being crawled or indexed. Yellow items are improvements.
- Use the robots.txt tester below the results to try a fix before you deploy it, then check again.
What this checker tests
- robots.txt: that it loads as plain text, isn't an HTML page from a catch-all route, stays under Google's 500 KiB limit, doesn't block Googlebot from your site or your CSS and JavaScript, and declares your sitemap. Unknown and unsupported directives, like
noindexandcrawl-delay, are flagged with the reason. - Sitemap discovery: we read the
Sitemap:lines in robots.txt, like Google does. Only if there are none do we try/sitemap.xmland/sitemap_index.xml, and a miss there isn't counted as an error. - Sitemap files: HTTP status, content type, gzip, valid XML (the unescaped
&is the classic bug), the sitemaps.org namespace, the 50,000 URL and 50 MB limits, and sitemap indexes, including nested ones Google won't follow. - Listed URLs: duplicates, relative or off-site URLs, http vs https mismatches, URLs your own robots.txt blocks, and the format, spread and honesty of
lastmoddates. - Spot check: we fetch a spread of listed pages and flag any that are broken, redirect, are set to noindex, or point their canonical somewhere else.
Sitemap best practices
- List only canonical, indexable pages that return 200. No redirects, 404s, noindex pages, or parameter and UTM variants. Set canonicals and robots tags with the meta tag generator.
- Use accurate
lastmoddates. Google uses lastmod when it's consistently accurate and ignores it when every URL shows today's date. Set it when the content changes meaningfully, not on every build. - Skip
priorityandchangefreq. Google ignores both. They don't hurt, but they don't help either. - Split big sites. Each file can hold 50,000 URLs and 50 MB uncompressed. Past that, use several sitemaps and one sitemap index.
- Use your final URLs. Same protocol and host everywhere: if your site is https://www.example.com, don't list http:// or non-www URLs. Keep them short and readable with the URL slug generator.
- Declare it and submit it. Add a
Sitemap:line to robots.txt so every crawler finds it, then submit it in Google Search Console and Bing Webmaster Tools.
robots.txt mistakes that cost traffic
The expensive ones are rarely subtle. A Disallow: / left over from staging removes a whole site from search. A server error on /robots.txt makes Google pause crawling. A single-page app that answers /robots.txt with its HTML shell leaves crawlers with no rules at all.
Two rules prevent most of the rest. First, don't block a page in robots.txt to keep it out of Google: blocked pages can still be indexed from links, and Google can't see a noindex tag it isn't allowed to fetch. Second, never list a URL in your sitemap that robots.txt blocks. That's a contradiction Search Console reports as an error. Build a clean file with the robots.txt generator, including separate rules for AI training and AI search crawlers.
After the sitemap: check the pages themselves
A clean sitemap gets pages crawled. Whether they rank and get clicked depends on the page. Run your most important URLs through the marketing SEO checker, and see how each title and description looks in results with the SERP preview tool. Launching soon? The launch checklist covers the rest.
Frequently asked questions
Where should my sitemap be?
Anywhere on your site, but /sitemap.xml is the convention. What matters is that robots.txt lists it with a Sitemap: line and that you submit it in Google Search Console. A sitemap only covers URLs at or below its own folder, so keep it at the root.
Why does my sitemap checker show 404 errors for sitemap_index.xml?
Some checkers guess common paths and report every miss as an error. That's noise. If robots.txt points to a sitemap that loads, crawlers never look anywhere else. This checker only guesses when nothing is declared, and says so.
Do I need lastmod in my sitemap?
It's optional, but useful when it's accurate. Google uses it to decide what to recrawl. Leave it out rather than stamping every URL with the current time: Google learns to ignore dates that are always new.
Can I list URLs from another domain in my sitemap?
Only if you verify both sites in Google Search Console, or the sitemap is declared in the other site's robots.txt. Otherwise Google ignores those URLs. Watch for www vs non-www and http vs https, which count as different hosts.
How do I test whether robots.txt blocks a page?
Use the tester under the results. It matches rules the way Google does: the most specific user-agent group applies, the longest matching rule wins, and Allow wins a tie. You can edit the file and test before you deploy.
Does this tool store my robots.txt or sitemap?
No. We fetch them once to build the report. The tester runs entirely in your browser.