In-Depth Edge SEO
CDN, WAF And Edge SEO Data: Cloudflare Vs Vercel Caching, Speculation Rules And Bot Blocking
Configuring Cache-Control, Brotli, HTTP 304 and Chrome Speculation Rules for sub-100ms TTFB—and auditing Cloudflare/Vercel WAF logs for accidental 403s.
Your CDN and Web Application Firewall (WAF) sit in front of Googlebot, Bingbot, OAI-SearchBot, PerplexityBot, Claude-SearchBot and Chrome visitors. One well-tuned edge setup drops global TTFB under 100ms, negotiates Brotli (br), and unlocks near-0ms internal LCP via Speculation Rules. One sloppy WAF toggle serves HTTP 403 Forbidden to AI search bots and erases months of visibility overnight.
In Cloudflare's August 2025 telemetry, AI training crawlers drove 80% of AI bot traffic, while Google crawled 5.4 pages per referred visit versus 195:1 for Perplexity, 1,091:1 for OpenAI, and 38,065:1 for Anthropic. Meanwhile, the Chrome UX Report (CrUX) measured 18,070,207 origins in October 2026 and found only 56.3% passed all three Core Web Vitals.
Edge SEO is the highest-leverage infrastructure layer in 2026: cache public HTML at the edge, strip cache-busting headers, serve Brotli and HTTP 304 crawls, and govern AI bots by job instead of blanket WAF blocks.
Why Does Edge Infrastructure Decide Both Core Web Vitals And AI Citations?
Every search bot, AI crawler, and Chrome visitor hits your CDN edge before origin code runs. Two systems grade that response: real-user field telemetry for rankings and UX, and crawler status codes for search and AI indexing.
Google's web.dev targets good TTFB of 800ms or less at the 75th percentile so LCP fits inside 2.5 seconds. Un-cached single-region origins burn 700ms to 1,200ms on cross-continent round-trips before CSS starts downloading. Our Core Web Vitals field data guide shows why LCP drives most failures in that 56.3% CrUX pass rate.
At the same edge, Cloudflare's August 2025 analysis sorted 12 months of AI crawling into three jobs. Training dwarfed search indexing and user fetches—pushing teams toward blunt bot blockers that sever citation crawlers.
Cloudflare's 2025 Year In Review found live user fetches grew over 15x year over year. By September 2026, SEOmator's Cloudflare Radar tracking showed crawl-to-refer ratios of 3.7:1 for Google, 340:1 for OpenAI, 548:1 for Anthropic, and 2,372:1 for Perplexity. Job-based edge rules protect origin compute without severing search citations.
How Do Edge Caching Headers Move CrUX TTFB, LCP, And Crawl Capacity?
Google Search Central states Googlebot scales host crawl capacity dynamically from server speed and error rates. Sub-100ms edge HTML improves real-user CrUX TTFB and raises crawl capacity together.
Under RFC 9111 and RFC 9213, four headers govern public HTML caching:
| Header Or Directive | Edge PoP Behavior | SEO And Crawl Impact | Common Failure |
|---|---|---|---|
Cache-Control: public, max-age=0, s-maxage=3600 | Caches HTML at edge 1h; revalidates browser | Sub-100ms global TTFB with clean purges | Omitting s-maxage |
stale-while-revalidate=86400 | Serves stale edge HTML; refreshes async | Stops cold-cache TTFB spikes | Sending no-store |
CDN-Cache-Control / Vercel-CDN-Cache-Control | Sets CDN TTL separate from browsers | Prevents stale browser HTML | Leaking private |
Vary: Accept-Encoding | Splits cache only by codec (br, gzip) | Holds cache hit ratios over 90% | Adding Vary: User-Agent |
Consider a worked LCP calculation for a us-east-1 blog serving Europe and Asia. An un-cached render averaging 890ms TTFB, 950ms CSS/hero fetch, and 750ms render delay hits 2,590ms LCP—failing CrUX's 2,500ms bar. Adding s-maxage=3600, stale-while-revalidate=86400 and Brotli drops TTFB to 95ms, reclaiming 795ms (31.8% of the LCP budget) and cutting LCP to 1,795ms.
Proxying DNS through a CDN never caches HTML automatically. Cloudflare and Vercel both bypass HTML cache when Cache-Control emits private or no-store, stranding TTFB near 640ms.
Why Do Session Cookies And Vary: User-Agent Destroy CDN Cache Hit Ratios?
Two silent origin headers wipe out edge caching: leaked Set-Cookie headers and Vary: User-Agent.
CDNs refuse to cache responses carrying Set-Cookie to avoid leaking private sessions. On WordPress, WooCommerce and A/B scripts frequently stamp cookies onto anonymous /blog/* pages. On Next.js App Router, calling cookies() or headers() in a root layout forces dynamic renders on every child route.
Google Search Central reserves Vary: User-Agent strictly for legacy dynamic serving sending separate mobile and desktop HTML at one URL. On responsive sites shipping identical HTML everywhere, Vary: User-Agent fragments cache keys across every browser build and crawler token.
Run a worked cache-fragmentation calculation: 1,000 daily visits across 40 PoPs and 240 User-Agent strings need just 80 cache fills (br, gzip) under Vary: Accept-Encoding—a 92% hit ratio. Under Vary: User-Agent, those 40 PoPs face up to 9,600 cache keys for one URL, collapsing hit rates toward zero.
Set-Cookie, Cache-Control: private, or Vary: User-Agent on anonymous editorial HTML means your CDN is acting as a pass-through proxy. See HTTP Cache-Control Reference and HTTP Vary: User-Agent Reference.How Much Bandwidth And Crawl Budget Do Brotli Compression And HTTP 304 Save?
Once HTML caches cleanly, Brotli (br) compression and HTTP 304 Not Modified cut wire transfer and crawl overhead further.
Brotli (RFC 7932) pairs a static web dictionary with stronger entropy coding than gzip. Googlebot advertises Accept-Encoding: gzip, deflate, br natively. In CertSimple's top-1,000 URL benchmark, Brotli cut HTML by 21%, CSS by 17%, and JavaScript by 14% versus gzip. Cloudflare and Vercel serve Brotli over HTTPS automatically, while Zstandard (zstd, RFC 8878) is rolling out across Chromium and Cloudflare edges.
Note Googlebot's fetch cap: in February 2026, Google documented a 2MB Search HTML limit (64MB for PDFs), replacing the old 15MB default. That cap counts uncompressed bytes, so Brotli cannot prevent DOM truncation, though it cuts wire transfer up to 21%. See Brotli and Zstd Content-Encoding Reference.
HTTP 304 Not Modified (RFC 9110) compounds savings via ETag and Last-Modified. In a worked crawl-bandwidth model for a 200,000-URL catalog where 85% of recrawls (170,000 URLs) are unchanged weekly and Brotli HTML averages 18KB, skipping 304 transfers 3.06GB. Returning HTTP 304 headers (~0.4KB) drops transfer to 68MB—a 97.8% cut. Cloudflare and Nginx downgrade strong ETags ("abc") to weak validators (W/"abc") during compression; RFC 9110 handles weak validators cleanly. See HTTP ETag & Last-Modified Reference and HTTP 304 Not Modified Reference.
Cloudflare Vs Vercel Edge: Architectural Trade-Offs For Technical SEO
Most teams run directly on Vercel Edge Network, proxy through Cloudflare in front of WordPress or AWS origins, or accidentally stack both proxies together.
| Dimension | Cloudflare (Free To Enterprise) | Vercel Edge Network | Dual-Proxy Caveat |
|---|---|---|---|
| HTML Caching | Requires Cache Rules (s-maxage) | Native prerender, ISR, Vercel-CDN-Cache-Control | Double cache purge drift |
| Edge Redirects | Bulk Redirects at 330+ PoPs | Atomic vercel.json 301/308 rules | Split rules spawn 2- to 3-hop chains |
| AI Bot WAF | AI Crawl Control, Radar, Custom WAF | Vercel Firewall, Attack Challenge Mode | Proxying masks client IPs |
| Compression | Brotli, Zstd, HTTP/3, Early Hints | Automatic Brotli, gzip, HTTP/3 | Double TLS adds 20ms–60ms |
| Best Fit | WordPress, AWS/GCP, multi-origin | Next.js App Router, Astro, Jamstack | Keep Cloudflare DNS-only unless O2O |
Stacking orange-cloud Cloudflare in front of Vercel is a frequent slowdown. Vercel already terminates TLS globally with Brotli and edge caching; adding a standard Cloudflare proxy adds a network hop, complicates ACME SSL renewals, and trips Vercel Firewall limits behind shared egress IPs.
On Vercel Next.js builds, let Vercel run caching, ISR, and vercel.json redirects (see Next.js App Router SEO guide) and leave Cloudflare DNS-only (grey cloud) unless running Enterprise Orange-to-Orange (O2O). On WordPress or AWS origins, Cloudflare's Cache Rules, Bulk Redirects, and AI Crawl Control supply edge leverage the origin lacks.
Why Do One-Click WAF Rules Cause Silent HTTP 403 Blocks On AI Search Bots?
The fastest-growing SEO incident in 2026 is silent edge blocking: /robots.txt declares Allow: / for OAI-SearchBot, PerplexityBot, and Claude-SearchBot, yet a WAF or Bot Fight Mode intercepts them with HTTP 403 Forbidden or a JS challenge before requests reach your app.
By July 2025, over 1 million Cloudflare customers had enabled its AI bot block. On September 15, 2026, Cloudflare set new ad-supported zones to block Training and Agent bots by default—and noted mixed-use crawlers (Googlebot, Applebot, BingBot) inherit their strictest label when Training is blocked. One day later, HasData saw GPTBot disallows on Cloudflare-proxied sites drop from 17.1% to 9.9%, while non-Cloudflare sites held flat (18.7% to 18.6%).
Yet /robots.txt alone fails without enforcement. RFC 9309 warns robots.txt rules "are not a form of access authorization." In HasData's July 2026 test of 592 sites disallowing GPTBot, 39.5% (234 sites) still served full HTML, while 60.5% enforced the block at the edge. From a datacenter IP on publisher sites, Chrome received HTTP 200 83.8% of the time versus 54.2% for GPTBot.
TollBit's State of the Bots reports tracked AI scrapes bypassing robots.txt climbing across 2025 before hitting 15% in H1 2026. Because TollBit sells bot paywalls and shifted cohorts across editions, treat 15% to 30% as the realistic bypass range, driven heavily by user fetchers like ChatGPT-User.
robots.txt declares policy; your WAF enforces it selectively by job. Never let a one-click WAF toggle break live search indexers or inspection tools.
How Should You Verify And Route Search, AI, And Inspection Bots At The Edge?
Trusting raw User-Agent strings invites spoofing, while blocking cloud ASNs cuts off real crawlers. TollBit's 2026 audit found over 98% of AI scrapes matched published operator IPs, proving IP lists and reverse DNS separate real bots from impersonators reliably.
Watch one nuance: in August 2025, Cloudflare removed Perplexity from its Verified Bots list after reporting undeclared crawling on blocked sites. Rules using only cf.client.bot no longer allow PerplexityBot—match Perplexity's published IP list explicitly. Also note Anthropic's warning: blunt IP blocks can stop bots from reading /robots.txt, causing repeated retries.
| Bot Or Class | Job | Verification Method | Target Status | WAF Failure Mode |
|---|---|---|---|---|
Googlebot | Search & AI Overviews | rDNS/fDNS or googlebot.json | 200 / 304 | Crawl collapse in Search |
Google-InspectionTool | GSC Live Test | rDNS/fDNS or special-crawlers.json | 200 | URL Inspection fails with 403 |
OAI-SearchBot | ChatGPT search | OpenAI searchbot.json IPs | 200 / 304 | Drops from ChatGPT citations |
Claude-SearchBot | Anthropic search | Anthropic published IPs | 200 / 304 | Loses Claude search citations |
PerplexityBot | Perplexity search | Perplexity perplexitybot.json IPs | 200 / 304 | Blocked by cf.client.bot-only rules |
GPTBot / ClaudeBot / CCBot | Model training | Operator IP lists + UA | 200 or 403 | Paper-only bans leak ~39.5% |
| Spoofed Scrapers | Unlicensed scraping | Fails rDNS and IP checks | 403 / Challenge | Burns CPU and skews logs |
Use this Cloudflare WAF Custom Rule pattern to separate verified search bots from spoofed UAs and optional training blocks, syncing IP lists via CI. See AI crawlers and robots.txt and HTTP 403 Forbidden Reference.
# Rule 1 (Skip Managed Challenge / Super Bot Fight Mode)
(cf.client.bot and cf.verified_bot_category in {"Search Engine Crawler", "Page Preview"})
or (http.user_agent contains "OAI-SearchBot" and ip.src in $openai_searchbot_ips)
or (http.user_agent contains "Claude-SearchBot" and ip.src in $anthropic_crawler_ips)
or (http.user_agent contains "PerplexityBot" and ip.src in $perplexity_searchbot_ips)
# Rule 2 (Block -> HTTP 403 for spoofed search engines)
((http.user_agent contains "Googlebot" or http.user_agent contains "Bingbot") and not cf.client.bot)
# Rule 3 (Optional Block -> HTTP 403 for publishers excluding training crawlers)
(http.user_agent contains "GPTBot" or http.user_agent contains "ClaudeBot"
or http.user_agent contains "CCBot" or http.user_agent contains "Bytespider")
Exempt verified search bots from HTTP 429 rate limits too—sustained 429 responses make Googlebot slash crawl capacity (see HTTP 429 Too Many Requests Reference and HTTP status codes for SEO).
Why Do Edge Redirect Chains And Trailing-Slash Loops Bleed Crawl Equity?
Split redirect rules across DNS, CDN, and CMS layers routinely stack four hops onto backlinks: http://example.com/guide → https://example.com/guide (301) → https://www.example.com/guide (301) → https://www.example.com/guide/ (308) → https://www.example.com/blog/guide/ (301).
Google Search Central notes Googlebot follows up to 10 hops, yet each hop adds 50ms–250ms mobile latency and wastes crawl budget. Collapse protocol, host, trailing-slash, and slug rules into one atomic edge 301/308 hop in Cloudflare Bulk Redirects or vercel.json. Strip campaign parameters (utm_*, fbclid, gclid) from the CDN cache key via Cache Rules instead of redirecting—preserving analytics while hitting edge cache.
How Does Chrome Speculation Rules API Deliver Near-Zero Internal CrUX LCP?
Edge caching fixes landing TTFB, while 28-day CrUX grades every internal click across a session. Chrome's Speculation Rules API prefetches or prerenders likely next internal pages in a hidden renderer before the click finishes. Per web.dev, activating a prerendered page resets LCP to activationStart, routinely recording near-0ms LCP inside real-user CrUX data.
| Eagerness | Chrome Trigger | CrUX LCP Lift | Edge Cost | Safe Scope |
|---|---|---|---|---|
conservative | pointerdown / touchstart | Moderate gain | Lowest | Large commerce catalogs |
moderate | ~200ms hover or viewport cue | Large gain (near-0ms) | Low to moderate | Default for blogs, docs, SaaS |
eager | Slight pointer motion | Very high gain | High | Small static sites |
immediate | Immediately on load | Highest on 1 URL | Highest | Deterministic next page only |
Exclude state-mutating paths (/logout, /cart, /checkout, /api/*, /account/*) so hover never mutates sessions. Serve the JSON via the Speculation-Rules: "/speculation.json" header (application/speculationrules+json) or an inline block:
{
"prerender": [
{
"where": {
"and": [
{ "href_matches": "/*" },
{ "not": { "href_matches": "/api/*" } },
{ "not": { "href_matches": "/logout*" } },
{ "not": { "href_matches": "/cart*" } },
{ "not": { "href_matches": "/checkout*" } },
{ "not": { "href_matches": "/account/*" } },
{ "not": { "selector_matches": "[rel~=nofollow], [download]" } }
]
},
"eagerness": "moderate"
}
],
"prefetch": [{ "where": { "href_matches": "/*" }, "eagerness": "conservative" }]
}
In a worked 28-day CrUX mobile LCP progression model anchored to HTTP Archive baselines, layering edge caching, Brotli, a preloaded hero image, and moderate Speculation Rules lifts modeled pass rates from 44% to 94%.
See our Speculation Rules API Reference for Sec-Purpose: prefetch;prerender log filtering and Chromium prerender limits.
What Are The Real Risks Of Edge SEO Workers And HTML Rewriting?
Rewriting HTML in Cloudflare Workers (HTMLRewriter) or Vercel Edge Middleware creates three production failure modes:
- React Hydration Mismatches: Mutating SSR DOM nodes breaks client hydration, forcing full-tree re-renders and spiking INP over 200ms.
- Split Source-Of-Truth Regressions: Origin template refactors break Worker selectors outside CI, dropping canonicals or leaving stale
noindextags live. - Full-Body Buffering Latency: Calling
await response.text()instead of streamingHTMLRewriterbuffers the whole body, erasing TTFB gains.
X-Robots-Tag, Link: rel="canonical", Speculation-Rules, Content-Usage), 1-hop redirects, and verified bot routing. Keep HTML markup and schema in your origin repo unless a locked legacy CMS leaves zero alternative.Emit the emerging IETF AI Preferences (Content-Usage) header cleanly at the edge—see AI Content-Usage Header Reference—pairing machine-readable training rules with robots.txt.
How Do You Audit Live Edge Headers, Compression, And Bot Access With CURL?
Dashboard views hide origin overrides, cookie leaks, and extra redirect hops. Verify live production behavior directly with curl (paired with our Chrome DevTools and cURL for SEO guide):
# 1. Inspect cache status, Cache-Control, Vary, ETag, and Brotli
curl -sI --compressed -H "Accept-Encoding: br, gzip" "https://example.com/blog/target-guide" \
| grep -iE "^(HTTP/|cache-control|cdn-cache-control|cf-cache-status|x-vercel-cache|content-encoding|vary|etag|set-cookie|speculation-rules)"
# 2. Measure redirect hops and TTFB from HTTP apex
curl -sIL -o /dev/null -w "hops=%{num_redirects} status=%{http_code} ttfb=%{time_starttransfer}s\n" "http://example.com/blog/target-guide"
# 3. Verify conditional HTTP 304 via live ETag
ETAG=$(curl -sI "https://example.com/blog/target-guide" | awk -F': ' 'tolower($1)=="etag"{gsub(/\r/,"",$2); print $2}')
curl -sI -H "If-None-Match: $ETAG" "https://example.com/blog/target-guide" | head -n 3
# 4. Smoke-test UA edge rules (checks anti-spoofing, not verified-IP allowlists)
for UA in "Googlebot/2.1" "Google-InspectionTool" "OAI-SearchBot/1.0" "PerplexityBot/1.0"; do
echo "$UA => HTTP $(curl -s -o /dev/null -w '%{http_code}' -A "$UA" "https://example.com/blog/target-guide")"
done
Because your laptop IP sits outside Google's and OpenAI's verified ranges, a hardened WAF should challenge a spoofed Googlebot/2.1 in Step 4. To confirm real Googlebot, Google-InspectionTool, OAI-SearchBot, and PerplexityBot receive HTTP 200, inspect CDN edge logs (Cloudflare Security Events or Vercel Firewall Logs)—origin logs never see edge 403 drops.
What Is The Four-Step Edge SEO And WAF Governance Playbook?
Treat edge caching and WAF bot rules as versioned production infrastructure. Run this four-step audit quarterly and after any CDN, middleware, or WAF change.
- 11. Audit Live HTTP HeadersRun curl --compressed to verify HTTP 200, Brotli (br), s-maxage + SWR caching, ETag 304 revalidation, and zero Set-Cookie or Vary: User-Agent leaks.
- 22. Flatten Edge RedirectsCollapse http → https → www → trailing-slash chains into one edge 301/308 hop and strip UTM params from CDN cache keys.
- 33. Audit Edge Bot LogsConfirm inside Cloudflare Security Events or Vercel Firewall logs that Googlebot, Google-InspectionTool, OAI-SearchBot, Claude-SearchBot and PerplexityBot get HTTP 200.
- 44. Roll Out Speculation RulesServe a moderate-eagerness Speculation-Rules header on public links while excluding auth, cart, API and nofollow routes, then track 28-day CrUX LCP.
Inspect the protocol specs in HTTP Cache-Control Reference, Speculation Rules API Reference, HTTP ETag & Last-Modified Reference, and HTTP Vary: User-Agent Reference, or compare Cloudflare Radar vs Screaming Frog Log Analyser.
Frequently Asked Questions
Why Do Some Sites Accidentally Block ChatGPT Search Even When Robots.txt Allows It?
Aggressive one-click CDN/WAF 'Block AI Bots' or Bot Fight Mode settings often return HTTP 403 or JS challenges to OAI-SearchBot and PerplexityBot at the edge before requests reach /robots.txt.
Which HTTP Caching Header Best Speeds Up Public HTML On CDNs?
Cache-Control: public, max-age=0, s-maxage=3600, stale-while-revalidate=86400 caches public HTML cleanly at CDN edges for sub-100ms TTFB while refreshing asynchronously.
Why Should Responsive Websites Omit The Vary: User-Agent Header?
Vary: User-Agent forces CDNs to split edge caches per unique browser string, destroying cache hit rates and degrading mobile TTFB/LCP on responsive sites.
How Does Chrome's Speculation Rules API Improve Core Web Vitals?
Setting moderate eagerness prerendering on internal content links prerenders likely next clicks on hover, recording near-0ms LCP inside real-user 28-day CrUX metrics.
Does Googlebot Support Brotli (br) Compression Automatically?
Yes, Googlebot advertises and decompresses Brotli (br) natively alongside gzip, cutting text/HTML/CSS/JS payload bytes 14%–21%.