Blog
SavedSearch
Visit Hostlelo

Moving to a CDN? Keep Googlebot In and Your Origin Up

A new CDN starts with an empty cache, so your origin takes the hit. Allow verified bots, warm the cache slowly and use a short 429 or 503 brake only if needed.

The short answer

A new CDN starts with a cold cache, and faster responses can make Google crawl more, so your origin server carries the load at first. Allow verified bots in the CDN, pre-warm important URLs at a controlled pace, and lower DNS TTL a week ahead. If the origin still struggles, return 429 or 503 with Retry-After for a few hours, never more than 1 to 2 days.

Reading options

On this page

Moving your site behind a CDN can briefly make your origin server busier. The CDN starts with nothing in its cache, and Google often crawls faster once your site gets quicker. To keep things calm, let verified crawlers through and warm the cache slowly. A short 429 or 503 brake is there only for when the origin really struggles.

Here's a scene Google says it hears about. Site owners put their site behind a CDN to take load off the server, and right after the switch, crawler traffic to that server spikes almost immediately. It's tempting to switch on blanket bot protection then, and that's how Googlebot ends up stuck on a challenge page.

By the end of this guide you'll have a step by step plan for a CDN move that keeps Googlebot crawling and keeps your origin standing.

What a CDN move does to crawling

A CDN (content delivery network) is a set of servers around the world that keep copies of your pages and files close to visitors. Your origin is the server that holds the real content, the one the CDN goes back to whenever it doesn't have a copy.

Google explains the surge in its Search Central post from 11 November 2026. Its crawlers speed up when a server answers quickly and steadily, so the moment your DNS points to a fast CDN edge, your site looks like it just got a big hardware upgrade.

The catch, in Google's words, is that "a brand-new CDN starts with an empty (cold) cache." The first request for each URL at an edge location is a cache miss, which means the CDN has to fetch it from your origin. So, as Google puts it, "the real bottleneck during a CDN launch is still the origin server."

Think of a new branch of a bakery that opens with empty shelves. Regular customers mostly want the same few loaves, so those get stocked fast. Then a stock inspector walks in and asks for one of everything on the menu, and every item has to be fetched from the main kitchen across town.

Googlebot is that inspector, and every uncached URL it asks for lands on your origin.

Why this matters: Google's site move guide says it's normal to see crawl rate dip right after a hosting change and then climb over the next few days, possibly above where it was before. Your origin needs to survive that climb.

Before you start

Run through this list before you touch DNS:

  • DNS access: a login where you can edit records and see their TTL (time to live, how long resolvers cache a record).
  • CDN login: admin access to the CDN dashboard, including its security and bot settings.
  • Origin logs: a way to read your web server's access log, through SSH or your hosting panel.
  • A backup or snapshot: a fresh backup of files, database, server config and an export of your DNS records, so you can roll back.
  • Time: about a week of lead time for the TTL change, plus a quiet hour for the switch itself.
  • Risk level: medium. Done carefully, visitors notice nothing. Done in a rush, crawlers get blocked or the origin falls over.
  • Tools: dig, host and curl on your computer.

If you want the bigger migration picture first, our website migration plan covers the full sequence.

Step by step: move to the CDN safely

Step 1: Lower your DNS TTL and pick a switch window

Google's guide on changing hosting suggests lowering your DNS TTL to a conservative low value, for example a few hours, at least a week before the move. Resolvers then refresh faster when you change the records.

Check the current TTL on the record you plan to change with this command:

dig +noall +answer example.com A

You should see one line per record. The number right after the name is the TTL in seconds.

example.com.   86400   IN   A   192.0.2.10

That output is a made-up example. A value of 86400 means one day, so lower it in your DNS panel now and confirm the new number shows up in a later check.

Heads up: at the time of writing (30 November 2026), Cloudflare documents that proxied records always use a TTL of Auto, which is 300 seconds and cannot be edited. Unproxied records can be set from 60 seconds (30 on Enterprise) up to a day.

We walk through the TTL routine in more detail in lower your DNS TTL before a move and check it with dig.

Step 2: See what Googlebot is doing in your origin logs today

You need a baseline. How many requests does Googlebot make now, and from which addresses?

On many Nginx servers the access log lives at /var/log/nginx/access.log, though your path may differ. This counts the log lines from anything calling itself Googlebot, ignoring upper and lower case:

grep -i -c "googlebot" /var/log/nginx/access.log

You'll get a single number. Write it down with the date so you can compare after the switch.

To see the matching lines themselves, including the client IP at the start of each one, drop the count option:

grep -i "googlebot" /var/log/nginx/access.log

Pick a few of those IPs to verify next.

Anyone can type "Googlebot" into a user agent, so the name alone proves nothing. Google's verification method is a reverse DNS lookup, then a forward lookup on the name you get back.

Run the reverse lookup on an IP from your log (192.0.2.10 here is a documentation address standing in for a real one):

host 192.0.2.10

A genuine Google crawler returns a hostname ending in googlebot.com, google.com or googleusercontent.com. Next, look up that hostname and check that it points back to the same IP:

host crawl-192-0-2-10.googlebot.com

That hostname is made up to match the example IP. With a real log entry, the forward lookup must return exactly the address you started with, or the visitor is not Google.

Quick tip: for checking lots of IPs, Google also publishes its crawler IP ranges as JSON files, such as common-crawlers.json, in CIDR format. Matching against those is Google's suggested route for large scale checks.

Step 3: Allow verified bots in the CDN

This is the step that keeps you in Search. Google warns that blanket bot protection, like a CAPTCHA wall, stops its crawlers, and if left in place your pages will begin to drop out of Search.

A verified bot is one the CDN has confirmed is honest about who it is. Cloudflare lists Googlebot under its legacy Search Engine Crawler category, and says verified bots have historically been excluded in default bot configurations across all plans.

On Cloudflare with Super Bot Fight Mode (Pro, Business and Enterprise plans), do this:

  1. Go to Security > Settings and filter by Bot traffic.
  2. Open Super Bot fight mode and select the edit icon for the bot groupings.
  3. Set Verified bots to Allow.

Cloudflare also lets you exempt traffic from Super Bot Fight Mode and rate limiting rules with a Skip custom rule. Go to the Security rules page, choose Create rule > Custom rules, and match on the Verified Bot field. In expression form that field is cf.client.bot:

(cf.client.bot)

Under Choose action pick Skip, then tick the products to skip. Save, and verified crawlers will bypass those checks.

Heads up: the free Bot Fight Mode can't be bypassed with custom rules or Skip, according to Cloudflare's docs. If you see Googlebot being challenged by it, your choices are to turn it off under Security > Settings (filter Bot traffic) or upgrade to a plan with Super Bot Fight Mode.

On any other CDN or firewall, check your provider's bot allow list. Google notes that most major CDNs and WAFs offer a built-in toggle or managed rule for known or verified bots.

Step 4: Pre-warm the cache at a controlled pace

Google recommends fetching your busiest pages through the CDN before you route all traffic to it, along with upcoming launch pages and the URLs crawlers request most. The key words are "at a controlled pace".

First check what the CDN will actually cache. On Cloudflare, the CF-Cache-Status header tells you, and the meanings below come from Cloudflare's cache responses page:

  • HIT: served from Cloudflare's cache.
  • MISS: cacheable, but not in cache yet, so it came from your origin.
  • EXPIRED: was in cache but past its freshness time, so it was fetched from the origin again.
  • DYNAMIC: not eligible for cache, so it went to the origin with no cache lookup.
  • BYPASS: eligible, but the origin's response said it can't be cached.

Why this matters: Cloudflare says DYNAMIC typically happens when a file type like HTML isn't cached by default and no rule tells Cloudflare to cache it. If your HTML pages show DYNAMIC, warming them does nothing, and every Googlebot page request still reaches your origin.

Here is a small warming loop. This is my own example script, not a recipe from Google or Cloudflare. It reads one URL per line from urls.txt and waits a second between requests.

#!/usr/bin/env bash
# Own example script: warm a CDN cache slowly, one URL per second.
while read -r url; do
  curl -s -o /dev/null -w "%{http_code} %header{cf-cache-status} %{time_total} %{url_effective}\n" "$url"
  sleep 1
done < urls.txt

The %header{name} part needs curl 7.84.0 or newer, per the curl manual. Each line shows the status code, the cache status, the time taken and the URL.

Run it twice. On the first pass you'd expect MISS for cacheable files, and on the second pass HIT. If you keep seeing MISS, DYNAMIC or BYPASS, fix caching before you go further.

Some CDNs can serve your hostname before public DNS changes, using an edge address or CNAME target they give you. In that case, curl --resolve sends a request to a chosen address while keeping your real hostname, like this:

curl -s -o /dev/null -w "%{http_code} %header{cf-cache-status}\n" --resolve example.com:443:203.0.113.25 https://example.com/

Here 203.0.113.25 stands in for the edge address. Confirm with your provider that this setup works for your account before relying on it.

Step 5: Keep a temporary 429 or 503 brake ready

If crawling still pushes your origin too hard while caches fill, Google's crawl rate guide says you can return 500, 503 or 429 instead of 200 to crawl requests. Google then slows crawling across the whole hostname and speeds back up when the errors drop.

A 429 means "Too Many Requests" and a 503 means "Service Unavailable". Both can carry a Retry-After header, which tells crawlers when to try again, either as seconds or as a UTC date.

Heads up: Google says not to do this for longer than 1 to 2 days. If Googlebot sees these codes on the same URL for several days, that URL may be dropped from the index. The brake also has broad effects: fewer new pages discovered and slower refreshes while it's on.

Plan the off switch at the same time as the on switch. Our guide to HTTP 503 during maintenance covers the header details more deeply.

Step 6: Switch DNS and watch the logs

When the cache looks warm and the bot settings are right, update your DNS records to point at the CDN. Google's guide says to remove any temporary crawl blocks, like a Disallow in robots.txt or noindex tags, from the new setup before you start.

Then watch logs on the origin. Google suggests watching server logs on both old and new servers, checking public DNS tools from several regions, confirming old server traffic drops, and keeping an eye on Search Console.

Rerun the count from Step 2 every so often and compare it with your baseline:

grep -i -c "googlebot" /var/log/nginx/access.log

You should see Googlebot requests keep arriving with 200 status codes. A burst of 403 responses or challenge pages means the bot rules are blocking it.

Variants: a 429 or 503 brake on Cloudflare, Nginx and Apache

All of the rates and numbers in these examples are made up. Pick values that suit your own server, and test before you need them.

Cloudflare rate limiting rule

Go to the Security rules page and choose Create rule > Rate limiting rules. Cloudflare lists the Verified Bot field as available on every plan, so you can match crawler traffic directly.

Set the rate under When rate exceeds, choose Block under Then take action, and pick a Duration. Cloudflare's docs say the default response code for a blocked request is 429, and a custom response is available on Pro plans and above.

Cloudflare notes that applying rate limiting to verified bots might affect SEO, which is why this is a short brake only. On Business and higher, you can turn off Also apply rate limiting to cached assets so only requests reaching your origin count.

The Cloudflare pages I checked don't mention a Retry-After header on these responses, so test with curl -I before assuming one is sent.

Nginx with limit_req

Nginx's limit_req module limits request rate per key, and its docs say requests with an empty key are not counted. That lets you limit only requests whose user agent mentions Googlebot, using a map.

Put the first part inside http {} and the rest in your server {} block:

# Inside http {}
map $http_user_agent $crawl_brake_key {
    default        "";
    "~*googlebot"  "googlebot";
}
limit_req_zone $crawl_brake_key zone=crawlbrake:1m rate=2r/s;

# Inside server {}
limit_req zone=crawlbrake burst=10 nodelay;
limit_req_status 429;
error_page 429 = @crawl_brake;

location @crawl_brake {
    add_header Retry-After 120 always;
    return 429;
}

The default status for rejected requests is 503, so limit_req_status 429 changes it. The always flag on add_header adds the header whatever the response code is. Try this on a staging server before production.

Apache with mod_rewrite and mod_headers

Apache has no built in per user agent rate limit that I could verify, so this example is an on or off switch. It returns 503 to every request whose user agent contains "Googlebot", while it's enabled.

RewriteEngine On
RewriteCond "%{HTTP_USER_AGENT}" "Googlebot"
RewriteRule "^" "-" [R=503,L]
Header always set Retry-After "120" "expr=%{REQUEST_STATUS} == 503"

Apache's rewrite docs say a status outside 300 to 399 drops the substitution and returns that code. The mod_headers docs say always adds the header even on error responses, and the expr condition limits it to 503s.

This is the heavier brake, so remove it within hours if you can, and never leave it past Google's 1 to 2 day limit.

How to check it worked

Start with DNS. This shows what your resolver returns for your name now:

dig +short example.com

You should see the CDN's addresses rather than your old origin IP. The host command gives the same answer in a friendlier format:

host example.com

Next, check the response headers. This sends a HEAD request with a shortened version of Google's desktop crawler user agent, for your own test only:

curl -I -A "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://example.com/

You want a 200 status, a CF-Cache-Status header if you're on Cloudflare, and no challenge page. If you've switched a brake on, you should see 429 or 503 plus Retry-After.

Heads up: a spoofed user agent only shows what your rules do with that string. CDNs verify real crawlers by things like IP and reverse DNS, so any real Googlebot hit you see in logs still needs the reverse and forward DNS check from Step 2.

Finally, compare your origin log count with the baseline. Expect a dip, then a rise over a few days.

In Search Console, use the URL Inspection tool on a few key pages. Google's site move guide recommends it to confirm Googlebot can reach the new setup.

Troubleshooting

Googlebot gets 403s or challenge pages. Symptom: logs or Cloudflare security events show challenged crawler requests. Likely cause: blanket bot protection without a verified bot exemption. Fix: set verified bots to Allow or add a Skip rule, and on Cloudflare check Security > Analytics, Events tab, where the Service field shows which product acted.

The origin is still swamped days later. Symptom: high origin load and lots of crawler hits on HTML. Likely cause: pages show DYNAMIC or BYPASS, so nothing is being cached. Fix: check CF-Cache-Status, review caching rules for HTML, and look at Set-Cookie or no-store headers from your origin.

Every visitor in your logs has the same few IPs. Symptom: all requests appear to come from CDN addresses. Likely cause: the origin logs the CDN's address, not the client's, so you can't verify Googlebot. Fix: ask your host or developer to set up real client IP logging for your CDN before you rely on log based checks.

Pages are dropping from the index. Symptom: fewer indexed pages in Search Console after the move. Likely cause: a 429 or 503 brake left on too long, or a crawl block that never came off. Fix: remove the brake, check robots.txt and noindex, and inspect key URLs.

Some visitors still reach the old server. Symptom: traffic keeps landing on the old origin IP. Likely cause: resolvers still holding the old record from a long TTL. Fix: wait out the TTL, check with public DNS tools, and only shut the old server down when its logs show zero traffic, as Google advises.

Pro tips and when to ask for help

Do the switch in your quietest hour, so crawler misses have room.

After the move, our guide to Cloudflare's Full (strict) SSL mode helps you avoid redirect loops, which are another way crawlers get stuck.

Ask your host or a developer when you can't read origin logs, when the origin logs only CDN IPs, when you need caching rules for HTML, or when load stays high after the brake. Those jobs need server access and a careful hand.

The one message worth forwarding

Hi, we're moving example.com behind a CDN on [date and time, with time zone].
Please help with these before and during the switch:
1. Lower the TTL on the records we'll change to a few hours, a week ahead.
2. Allow verified bots in the CDN and firewall, so Googlebot is never challenged.
3. Confirm which pages the CDN will cache (check CF-Cache-Status or equivalent), and pre-warm the top URLs slowly.
4. Make sure origin logs show real client IPs so we can verify Googlebot by reverse and forward DNS.
5. Have a 429 or 503 brake with Retry-After ready for crawler traffic, but only switch it on if the origin struggles, and remove it within 1 to 2 days at most.
6. After the DNS change, watch origin logs and Search Console, and tell me if crawl errors rise.
Thanks!

A CDN only shields your origin once its cache is warm, so let Googlebot in and fill that cache gently before you lean on it.

Reader questions

Will my Search Console verification keep working after the CDN move?

It should, as long as the verification method moves with the site. Google's hosting guide says to keep the HTML verification file in the new copy, and to keep any verification meta tag or Google Analytics code in your templates.

Does moving to a CDN count as a site move in Google's eyes?

Google treats it as a change of hosting infrastructure, not a URL change, as long as visitors see the same URLs. If your URLs change too, Google points you to its separate guide for site moves with URL changes.

Can I test that Googlebot reaches the new setup before switching DNS?

Google suggests a temporary hostname such as beta.example.com, verified in Search Console and checked with the URL Inspection tool. Add a noindex rule to that test site so it doesn't get indexed by accident.

Should I return 500 instead of 503 or 429 to slow Google down?

Google lists 500, 503 and 429 as working for an urgent slowdown. Retry-After is only described for 503 and 429, which makes those two the cleaner choice for a planned brake.

Can I ask Google to crawl my site more slowly without serving errors?

Yes, Google offers a special request form for reporting an unusually high crawl rate. It can take several days to be evaluated, so it is not a fix for an emergency in progress.

How do I confirm Cloudflare actually purged or cached a page?

Request the page and read the CF-Cache-Status header, then check that the status is no longer HIT after a purge.

Does a 429 or 503 crawl brake affect Google Ads too?

It can. Google warns that reducing its crawl rate this way may cause Ads campaigns to be canceled or paused and ads to stop serving, so keep the brake as short as possible.

Sources & further reading

  1. Google Search Central Blog: Moving to a CDN without overwhelming your origin (or blocking Googlebot)
  2. Google: Reduce the Google crawl rate
  3. Google: Verify requests from Google crawlers and fetchers
  4. Google: Changing your hosting (site move without URL changes)
  5. Cloudflare: Verified bots
  6. Cloudflare: Super Bot Fight Mode
  7. Cloudflare: Cache responses (CF-Cache-Status)
  8. Cloudflare: Create a rate limiting rule in the dashboard
  9. Nginx: ngx_http_limit_req_module
  10. Apache HTTP Server 2.4: mod_headers

Originally published . About our editorial updates.

Your next project deserves a better foundation.

Explore hosting built for your next chapter.

Explore hosting

Find your next answer.

Search published guides and articles.

Ctrl / ⌘ K to open · Esc to close