In short
A page Googlebot is not allowed to crawl cannot be read, so it can neither be indexed properly nor used in AI Overviews or AI Mode. This check consists of listing the URLs that matter to your business, testing each one against your robots.txt with Google's interpretation rules, then fixing the rules that block one by accident. Expected result: a table in which every strategic page is marked “allowed”, confirmed by the URL Inspection tool in Google Search Console.
Why it matters
Before every crawl, Googlebot reads the host's robots.txt, picks the group of rules that applies to it and applies the most specific rule matching the URL. A block is almost never intentional: it comes from a rule written for something else.
- A prefix that is too short.
Disallow: /blogblocks/blog, but also/blog-recettes/and/blogueurs-partenaires. Rules are prefixes, not folders. - A wildcard that is too broad.
Disallow: /*?blocks every URL with parameters, including filtered category pages you wanted indexed. - A named group. As soon as a
User-agent: Googlebotgroup exists, Googlebot ignores the*group. The disallow or allow rules you wrote there no longer apply to it. - An inherited rule. A robots.txt template copied from a forum, a CMS module or a staging site pushed live with
Disallow: /.
Blocking does not necessarily remove the page from the index. Google can index a blocked URL it knows through links, without reading its content: it then shows up as a poor result, with no description, under the status “Indexed, though blocked by robots.txt”. This is the worst of both worlds: visible, but unreadable for the search engine and for its generative features, which have no separate crawler.
Both versions of Googlebot (Smartphone and Desktop) share the same token: you cannot allow only one of them. Specialized crawlers (Googlebot-Image, Googlebot-News, Googlebot-Video) follow the Googlebot group if they have none of their own.
What it improves
- Crawling Every strategic page can be downloaded and rendered.
- Indexing No more “Indexed, though blocked” status on pages that matter; the content, title and structured data are read.
- AI Overviews and AI Mode Google requires a page to be indexed and eligible for a snippet. Being allowed to crawl it is the precondition, not a guarantee of citation.
- Click-through rate A result with a description and a rich snippet replaces a result with no text.
- Rankings Indirect effect. A crawled page can be evaluated; a blocked page cannot.
How to check
In Google Search Console, open URL Inspection for a strategic page, then “Test live URL”. The “Crawl allowed?” line must say “Yes”. A “No: blocked by robots.txt” pinpoints the problem. Repeat on one page per template: home, category, product or service page, article, local page.
Site-wide, the Page indexing report groups the affected URLs under “Blocked by robots.txt” and “Indexed, though blocked by robots.txt”. Go through the examples: a single strategic page in these lists justifies the check.
From the command line, the method in the “How to implement” section tests your whole list in one go.
Good to know: the Search Console robots.txt report shows whether Google could read the file, not whether a given URL is blocked. For a URL, URL Inspection is the authority. Google retired its old robots.txt testing tool in 2023.
How to implement
Before you start
Step 1: list the strategic pages. Start from your keyword-to-page map (opens in a new tab) and the pages that drive traffic or revenue. Take at least one URL per template, and every URL with a direct commercial stake. Table template:
| URL | Template | Why it matters | Robots.txt (Googlebot) | Search Console inspection | Action |
|---|---|---|---|---|---|
https://example.com/ |
home | brand queries | allowed | Crawl allowed: Yes | none |
https://example.com/chaussures-trail/ |
category | 40% of revenue | allowed | Yes | none |
https://example.com/chaussures-trail/?taille=42 |
filtered category | chosen SEO landing page | BLOCKED (Disallow: /*?) |
No: blocked | add an Allow rule |
https://example.com/blog-running/plan-marathon |
article | key informational query | BLOCKED (Disallow: /blog) |
No: blocked | replace with Disallow: /blog/brouillons/ |
Step 2: test the whole list. Save the URLs in urls.txt, one per line, then download the robots.txt file:
curl -s https://example.com/robots.txt -o robots.txt
This script applies Google's rules: choice of the most specific group, then the longest rule, with Allow winning a tie. Save it as robots_check.py:
import re
import sys
from urllib.parse import urlsplit
robot, fichier_robots, fichier_urls = sys.argv[1].lower(), sys.argv[2], sys.argv[3]
groupes, groupe, dans_entete = [], None, False
for ligne in open(fichier_robots, encoding="utf-8", errors="replace"):
ligne = ligne.split("#", 1)[0].strip()
if ":" not in ligne:
continue
champ, valeur = (partie.strip() for partie in ligne.split(":", 1))
champ = champ.lower()
if champ == "user-agent":
if not dans_entete:
groupe = {"robots": [], "regles": []}
groupes.append(groupe)
groupe["robots"].append(valeur.lower())
dans_entete = True
continue
dans_entete = False
if champ in ("allow", "disallow") and groupe and valeur:
groupe["regles"].append((champ, valeur))
nommes = [g for g in groupes if robot in g["robots"]]
retenus = nommes or [g for g in groupes if "*" in g["robots"]]
regles = [r for g in retenus for r in g["regles"]]
print(f"Group applied to {robot}: {'named group' if nommes else '* group'} ({len(regles)} rules)")
def correspond(valeur, chemin):
ancre = valeur.endswith("$")
expression = re.escape(valeur.rstrip("$")).replace(r"\*", ".*")
return re.match(expression + ("$" if ancre else ""), chemin) is not None
for url in open(fichier_urls, encoding="utf-8").read().split():
morceaux = urlsplit(url)
chemin = (morceaux.path or "/") + (f"?{morceaux.query}" if morceaux.query else "")
gagnante = None
for type_regle, valeur in regles:
if correspond(valeur, chemin):
poids = (len(valeur), type_regle == "allow")
if gagnante is None or poids > gagnante[0]:
gagnante = (poids, type_regle, valeur)
if gagnante is None or gagnante[1] == "allow":
etat = "allowed"
else:
etat = "BLOCKED"
detail = f"{gagnante[1]}: {gagnante[2]}" if gagnante else "no rule"
print(f"{etat:10} {url} ({detail})")
python3 robots_check.py Googlebot robots.txt urls.txt
Each line shows the verdict and the rule responsible. The script does not decode %-encoded characters and assumes every URL is on the same host as the file: for a borderline case, Search Console's URL Inspection settles it.
Step 3: fix the rules. Four fixes cover most cases:
| Faulty rule | What it blocks by mistake | Fix |
|---|---|---|
Disallow: /blog |
/blog-running/…, /blogueurs/ |
Disallow: /blog/brouillons/ (exact path, with the trailing slash) |
Disallow: /*? |
chosen filtered categories, paginated pages | Allow: /chaussures-trail/?taille= above it, or disallow only the parameters with no value (Disallow: /*?tri=) |
Disallow: /*.pdf |
every PDF, including your guides | Disallow: /factures/ |
incomplete User-agent: Googlebot group |
applies rules to Googlebot other than those of the * group |
delete the group, or copy every rule of the * group into it |
An Allow rule longer than the Disallow it contradicts wins. Do not block a page to take it out of the index: use noindex, which Googlebot must be able to read (see check meta robots and X-Robots-Tag (opens in a new tab)).
Step 4: validate. Publish the fixed file, request a recrawl of the file in the robots.txt report, then run the live test again on the fixed URLs. robots.txt is not the only lock: a firewall or a CDN can answer 403 to Googlebot. That side is covered in check Googlebot and Bingbot (opens in a new tab).
Apache
Versions Apache 2.4.
The file is edited at the root of the site (/var/www/example/public/robots.txt). Also look for a rule targeting Googlebot outside robots.txt, in .htaccess or the virtual host, for example a list of refused bots or IP-based protection on a strategic directory:
grep -r -n -i -E "googlebot|Require (ip|host)|Deny from" /var/www/example/public/.htaccess /etc/apache2/sites-enabled/
Nginx
Versions Nginx 1.18 and later.
Run the same search in the configuration, where a deny or a return 403 inside a location can target a strategic section:
grep -r -n -i -E "googlebot|deny |return 403|http_user_agent" /etc/nginx/
Cloudflare
Versions Cloudflare dashboard, all plans, November 2026.
Cloudflare does not change your Disallow rules, but can add some if managed robots.txt is on. Open the public URL of the file, not the origin's, before running the script. For firewall blocks, make sure your rules exclude verified bots (not cf.client.bot), as detailed in the check on Googlebot and Bingbot.
Shared hosting
Edit robots.txt at the web root over SFTP or with the control panel's file manager. If URL Inspection reports “Failed: Server error (5xx)” or “Blocked due to access forbidden (403)” while robots.txt allows the page, the block comes from the host's protection: send support the URL and the time of the test.
WordPress
Versions WordPress 6.4 to 7.1; Yoast SEO 22 to 28, Rank Math 1.0.
- Virtual file: WordPress only disallows
/wp-admin/(with an exception foradmin-ajax.php). If other rules appear, they come from a plugin or a physical file. - Yoast SEO: the crawl optimization options can add disallow rules (internal search,
/wp-json/). Reread the served file after every change. - Rank Math:
Rank Math SEO > General Settings > Edit robots.txtshows the content; it is disabled if a physical file exists. - Multilingual and e-commerce plugins: make sure language prefixes (
/en/) and WooCommerce categories are not caught by a rule written for another section.
Shopify
Versions Shopify admin, all plans, November 2026.
Shopify's default robots.txt disallows, among other things, the cart, checkout, account and internal search, as well as some collection URL variants. Open /robots.txt, then test your strategic collections and products with the script. If a default rule blocks one, create the robots.txt.liquid template (Online Store > Themes > … > Edit code, Templates folder) and remove that rule alone, or add a longer allow rule in the * group:
{% for group in robots.default_groups %}
{{- group.user_agent }}
{%- for rule in group.rules -%}
{%- unless rule.directive == 'Disallow' and rule.value == 'RULE_TO_REMOVE' -%}
{{ rule }}
{%- endunless -%}
{%- endfor -%}
{%- if group.user_agent.value == '*' -%}
{{ 'Allow: /collections/chaussures-trail/' }}
{%- endif -%}
{%- if group.sitemap != blank -%}
{{ group.sitemap }}
{%- endif -%}
{% endfor %}
Replace RULE_TO_REMOVE with the exact value of the faulty rule, as it appears in the file. Keep the cart and checkout disallow rules: they protect your crawl budget.
PrestaShop
Versions PrestaShop 8 and 9 (up to 9.2).
The file generated from Shop Parameters > Traffic & SEO disallows, among other things, the ?order=, ?q=, ?tag= and ?n= parameters, as well as controllers (cart, order, account, search) in every language. Product and category pages with friendly URLs remain allowed. If you index pages filtered by the faceted search module, check their URL format against these rules with the script. Every regeneration overwrites your additions: keep them in a separate file and paste them back.
Magento
Versions Magento Open Source and Adobe Commerce 2.4.7 to 2.4.9.
The rules live in Content > Design > Configuration, for the relevant store view, Search Engine Robots section, custom instructions field. The Magento robots.txt templates that circulate often disallow the parameter URLs of layered navigation: test your strategic categories before reusing them.
Drupal
Versions Drupal 10 and 11.
The default file (web/robots.txt) disallows the admin area, search (/search/, plus /search? in recent Drupal 11 versions), user forms (/user/login, /user/register…) and files in /core/ and /profiles/, except CSS, JavaScript and images. These rules are prefixes: Disallow: /user/login also blocks /user/login-pro. If a strategic page falls under one of them, add a longer allow rule (Allow: /search/guides/) rather than deleting the rule.
Laravel
Versions Laravel 10 to 13 (the check script does not depend on the version).
With a different robots.txt per environment, the risk is deploying the staging version (Disallow: /) to production. Add the script from step 2 and your urls.txt to the repository, then make the deployment fail if a strategic page is blocked:
curl -s https://example.com/robots.txt -o robots.txt
if python3 robots_check.py Googlebot robots.txt urls.txt | grep -q "BLOCKED"; then
echo "robots.txt blocks a strategic page"
exit 1
fi
A plain grep "Disallow: /" is not enough: it would also flag the legitimate refusal of an AI training crawler.
Next.js
Versions Next.js 13.3 to 16 (App Router).
In app/robots.ts, the disallow arrays are prefixes: '/p' would block /produits/. Write full paths with the trailing slash, and tie the staging version to an explicit environment variable rather than to the absence of another one. With the Pages Router, the file is static (public/robots.txt): the prefix rule applies in the same way.
Common mistakes
- Forgetting that rules are prefixes:
Disallow: /catblocks/catalogue/and/catering/. - Creating a
Googlebotgroup “to allow it”: it stops reading the*group, and the disallow rules for the admin area or the cart vanish for it. - Blocking a page to deindex it: it stays known, shows up with no description, and the
noindexit carries is never read. - Testing only the home page: blocks mostly hit parameter URLs, language subfolders and recent sections.
- Ignoring case:
/Produits/and/produits/are two different paths for robots.txt. - Drawing conclusions within the hour: Google caches the file for up to 24 hours.
- Stopping at robots.txt: a firewall
403blocks just as surely as aDisallow.
Frequently asked questions
How do I know whether Googlebot can crawl a specific page?
Open URL Inspection in Google Search Console, paste the address and run “Test live URL”. The “Crawl allowed?” line tells you whether robots.txt lets Googlebot through, and “Page fetch” whether the server responded properly. For a list of several dozen URLs, a script that applies Google's rules to the robots.txt file gives the verdict and the rule responsible for each one.
Can a page blocked by robots.txt appear in Google?
Yes, a page blocked by robots.txt can be indexed if Google discovers it through links, but Google does not read its content. It then shows up as a poor result, often with no description, and appears in the indexing report under “Indexed, though blocked by robots.txt”. To remove a page from the index, allow it to be crawled and add a noindex tag.
Do I need a User-agent: Googlebot group in robots.txt?
No, in most cases the User-agent: * group is enough and Googlebot follows it. A group named Googlebot is only justified if this crawler needs different rules from the others. In that case, Googlebot ignores the * group entirely, so you must copy into it every disallow rule you need, such as those for the admin area or the cart.
Does blocking a page to Googlebot remove it from AI Overviews?
Blocking crawling prevents Google from reading the page's content, and therefore from using it in AI Overviews and AI Mode, which rely on the Google Search index with no separate crawler. But the page also drops out of classic search or keeps only a poor result there. To limit only snippets, use nosnippet or max-snippet rather than a Disallow.
Resources
- Google: How Google interprets the robots.txt specificationdevelopers.google.com
- Google: Googlebotdevelopers.google.com
- Google: URL Inspection toolsupport.google.com
- Google: AI features and your websitedevelopers.google.com
- Shopify: Editing robots.txthelp.shopify.com
Updated on
Topic checklist (PDF)