跳至正文
技术 SEO 与抓取索引 · Google SEO

Cloudflare blocking Googlebot: confirm it and allow verified crawlers

// / / 光算科技

A site can be fully online, return 200 in a browser, and still lose Google traffic because a security layer in front of it is turning Googlebot away. Cloudflare is a common place for that to happen, but it is not the only one, and it is not always the cause. This guide shows how to confirm that crawling is actually blocked, which Cloudflare controls tend to cause it, and how to allow verified crawlers without opening the site to abuse.

First confirm it is a crawl block, not a ranking problem

Do not start changing firewall settings on a hunch. Gather evidence first:

  1. Search Console → Settings → Crawl stats. Look at response codes over time. A sudden rise in 403 or 5xx for Googlebot points to a server-side block, not a content problem.
  2. URL Inspection → Test live URL. If Google cannot fetch a page that loads fine in your browser, compare the details: the response code and any restrictions are shown in the page availability section.
  3. Cloudflare → Security → Events. Filter recent events by the request path or by bot category. Blocked or challenged requests from a verified bot category are the clearest signal.
  4. Distinguish "challenge" from "block". A challenge returns a page the crawler cannot use; a block returns a 4xx. Both hurt indexing, but they come from different settings.

If none of these show Googlebot being stopped, the problem is elsewhere — robots.txt, a noindex, a redirect loop, or indexing and quality signals. Fixing the firewall will not help.

Cloudflare features that commonly block legitimate crawlers

FeatureHow it can hurtWhat to review
Security Level (High) or "I'm Under Attack" modeAggressive challenge thresholds or a global interstitial can stop crawlersLower the level when the attack has passed
Bot Fight Mode / Super Bot Fight ModeMay challenge or block automated clients, including crawlers, depending on configurationReview bot settings; allow verified bots
WAF custom or managed rulesA rule that matches a bot signature or a path can block GooglebotCheck rule expressions for user-agent or path matches
Rate limitingFast crawling from Google can trip a low thresholdEnsure verified bots are exempt or the threshold is realistic
IP Access Rules / country blocks / Zone LockdownBlocking a region or range that includes crawler IPsCheck allow rules for Google's ranges
Browser Integrity CheckCan flag non-browser-like clientsReview whether it applies to verified bots

Note that Cloudflare's own security posture is not the enemy here. The goal is a narrow allowance for verified search crawlers, not disabling protection for everyone.

The right way to allow Googlebot

There is a wrong way and a right way. The wrong way is a rule that allows anything whose User-Agent contains "Googlebot". User-Agent strings are trivially forged, so that rule also opens the door to anyone claiming to be a crawler.

The right way layers identity checks:

  • Use verified-bot signals. Cloudflare classifies known crawlers and exposes fields such as cf.client.bot and a verified-bot category to rules. Allow the ones you actually want (for example, the search crawler, not every automated client).
  • Combine with IP ownership. Google publishes the IP ranges used by its crawlers as JSON. A rule that combines the verified-bot signal with Google's published ranges is far more resistant to spoofing than a user-agent match.
  • Scope the exception by path where possible. If only public pages need crawling, you do not need to allow crawlers through admin or API paths.
  • Do not disable everything. Skip or bypass rules for the crawler rather than turning off the WAF.

If you are unsure, make the smallest change that lets the specific verified bot through the specific rule that was blocking it, then measure.

Verify the fix properly

  1. Re-test live. Run URL Inspection → Test live URL on a page that was blocked and confirm the fetch is now successful.
  2. Watch Security Events. Make sure the crawler now shows as allowed, and that you did not create an obvious bypass for abusive traffic.
  3. Watch Crawl stats over several days. Response-code changes and crawl volume move slowly; a same-hour recovery is not the right expectation.
  4. Check the affected pages in the Page indexing report after a recrawl. "Crawled – currently not indexed" or "Discovered" states usually clear over time once fetching works again.

Common mistakes

  • Changing five settings at once. You will not know which one mattered, and you may have weakened protection.
  • Assuming a 200 to your browser means a 200 to Googlebot. The two can be treated differently by any WAF.
  • Trusting a user-agent-only allowlist. It invites spoofing.
  • Leaving "Under Attack" mode on indefinitely. It is an emergency measure; keeping it on keeps legitimate traffic out.

Guangsuan (光算) diagnoses crawling and indexing problems like this within its Google SEO service. If you are not sure whether the block is at the CDN, the origin or somewhere in between, see the companion piece on diagnosing why pages are not appearing.

Sources

Cloudflare and Google both change interfaces and terminology; confirm the current settings and documentation before making changes in production.