Crawling problem

robots.txt and Sitemap Errors: Find What Blocks Google

robots.txt and sitemap errors can hide a whole section of your site from Google or fill the index with URLs you never wanted. Here is how we test both files, clean them and get blocked pages crawled again.

The symptoms

What robots.txt and sitemap errors look like

Two small files that decide what Google crawls and what it finds first.

robots.txt tells crawlers which paths they may request. The XML sitemap lists the URLs you want discovered. Robots.txt and sitemap errors are small mistakes in these files that can block a whole section from crawling, or flood Google with URLs you never wanted indexed. They show up in three places in Search Console:

WhereEnglish interfaceArabic interface
Page indexing reportBlocked by robots.txtتم الحظر بواسطة ملف robots.txt
Page indexing reportIndexed, though blocked by robots.txtتمت فهرستها على الرغم من حظرها بواسطة ملف robots.txt
Sitemaps reportCouldn't fetch / Has errors / Successتعذر الجلب / تتضمن أخطاء / تمت بنجاح
Settings, robots.txt reportFetch status and the last fetched versionحالة الجلب وآخر نسخة تم جلبها

Typical signs: a new site that stays out of Google weeks after launch, product pages listed as blocked, a sitemap that shows "Couldn't fetch" for days, or a sitemap that reports thousands of discovered URLs while only a fraction are indexed. "Indexed, though blocked by robots.txt" is a special case: Google indexed the URL from links without reading it, so it shows in results with no description.

Causes

The real causes, ranked by how often we see them

1. Staging rules left live

A Disallow: / or a sitewide noindex from the development site is copied to production at launch.

2. Dirty sitemaps

Sitemaps that list redirected, 404, noindex, parameter or non-canonical URLs, so Google stops trusting them.

3. Over-broad Disallow rules

A rule like Disallow: /*? or Disallow: /ar that matches far more URLs than intended, including real pages.

4. Blocked resources

CSS, JavaScript or image folders blocked, so Google cannot render the page the way users see it.

5. Blocking instead of noindex

Pages blocked in robots.txt to remove them from Google. Google cannot see a noindex on a page it cannot crawl, so the URL can stay indexed.

6. Server errors on the files

robots.txt or the sitemap returns 5xx, times out, or sits behind a firewall that blocks Googlebot.

Diagnosis

How we diagnose robots.txt and sitemap errors step by step

01
Read the robots.txt report

In Search Console Settings we check the fetch status, the fetched version and when it was last read.

02
Test the rules

We test important URL patterns against each rule. Google uses the most specific matching rule, and Allow wins a tie.

03
Check the responses

We request robots.txt and every sitemap as Googlebot and confirm a 200 status, the right content type and no firewall block.

04
Audit sitemap contents

We crawl every sitemap URL and flag anything that is not a 200, indexable, self-canonical page.

05
Compare with the index

We compare sitemap URLs with the Page indexing report, filtered by sitemap, to see which templates are not indexed.

06
Check rendering

URL Inspection shows blocked resources. If CSS or JavaScript is blocked we test the rendered page.

The fix

How we fix robots.txt and sitemap errors

robots.txt

  • Keep the file short and explicit: block only crawl traps such as internal search, cart, checkout and endless filter combinations.
  • Never block CSS, JavaScript or image folders that pages need to render.
  • Use a noindex meta tag or X-Robots-Tag header, not robots.txt, to remove pages from the index. Google does not support noindex inside robots.txt.
  • Add the absolute sitemap location with a Sitemap: line. Keep the file under Google's 500 KiB limit.

Our free robots.txt generator builds a clean starting file you can adjust.

XML sitemaps

  • List only 200, indexable, canonical URLs. This keeps the sitemap a reliable signal.
  • Split large sites by type (products, categories, articles) with a sitemap index. Each file holds up to 50,000 URLs or 50 MB uncompressed.
  • Use an accurate lastmod that changes only when content changes. Google ignores priority and changefreq.
  • Submit the sitemap index in Search Console and watch the discovered and indexed counts per file.

Platform defaults differ: Zid and Salla generate their own files with limited control, while WordPress depends on the SEO plugin. We handle this inside our technical SEO service, and on a new site during website migration SEO, which is when staging rules most often leak.

Checklist

robots.txt and sitemap checklist

CheckCorrect state
robots.txt status200 at the root of each host and protocol
Disallow rulesOnly crawl traps, tested against real URLs
Rendering resourcesCSS, JS and images allowed
Sitemap lineAbsolute URL of the sitemap index
Sitemap statusSuccess in Search Console
Sitemap contentsOnly 200, indexable, canonical URLs
lastmodAccurate, changes with content
Staging protectionPassword or IP restriction, not robots.txt

Recovery and proof

How long recovery takes

Google normally refreshes its cached robots.txt within about a day, and you can ask for a recrawl from the robots.txt report. Blocked pages then need to be crawled and processed: important pages often return within 1 to 3 weeks, and a large catalogue can take 1 to 3 months. A cleaned sitemap helps Google rediscover them faster but does not force indexing.

Server errors on these files are serious. If robots.txt returns a 5xx error, Google stops crawling the site for a while and then falls back to the last copy it fetched. This is why we monitor uptime and server responses: on the waste management company in Qatar, a plugin wrote a bad server rule that returned 500 errors for days, and we found and fixed it. For crawl control on thousands of URLs, see the large catalogue case in Iraq. More problems are on the SEO solutions hub, including website not showing on Google.

230
clicks, January 2026 (CS2)
1,820
clicks, September 2026 (CS2)
x7.9
clicks in 8 months

Figures come from Google Search Console of real client properties (monthly web search totals). Results depend on the starting point, the competition and how fast changes are implemented. They are not a promise of the same outcome.

We test your robots.txt and every sitemap URL, and send you the list of what is blocked or wrong.

Get a free SEO audit

FAQ

Frequently asked questions

Does robots.txt stop a page from being indexed?

No. It stops crawling, not indexing. A blocked URL can still be indexed from links, without a description. Use a noindex tag on a crawlable page to keep it out.

What does "Couldn't fetch" mean for a sitemap?

Google could not download the file. Common reasons are a wrong URL, a 4xx or 5xx response, a firewall or bot protection blocking Googlebot, or a temporary state on a new submission.

Do I need a sitemap for a small site?

A small, well-linked site can be crawled without one. A sitemap still helps new pages get found faster and gives you per-file indexing data in Search Console.

How many URLs can one sitemap hold?

Up to 50,000 URLs or 50 MB uncompressed. Larger sites use a sitemap index that lists several sitemap files.

Should I block filter and search URLs in robots.txt?

Often yes, for internal search and endless filter combinations, to save crawl capacity. Do not block filters that you want to rank as landing pages.

Want to know what is holding your site back?

Send us your website and get a free SEO audit with the first fixes to make.