Guides · Technical SEO · 5 min read

Is that really Googlebot? Check by reverse DNS

Anyone can send a Googlebot user agent. Before you block, rate-limit or trust a crawler in your logs, check its address: a real one resolves to Google's or Microsoft's names and back.

Tested on the script on Rocky Linux 10 with a combined-format access log

Why the user agent is not enough

Scrapers and attack tools often call themselves Googlebot, because sites wave Googlebot through. If you block by user agent you may block the real one and lose crawling. If you trust by user agent you let the fakes through. The address is what tells them apart.

Check one address by hand

  1. Look up the name of the address (reverse DNS). getent is on every Linux system; host or dig give the same answer if you have them.
  2. A real Googlebot ends in googlebot.com or google.com (Google's other fetchers can also end in googleusercontent.com). A real Bingbot ends in search.msn.com.
  3. Look that name up again (forward DNS). It must give back the same address. Without this step anyone who controls the reverse zone of their own addresses could name them crawl-something.googlebot.com.
$ getent hosts 66.249.66.1 66.249.66.1 crawl-66-249-66-1.googlebot.com $ getent ahosts crawl-66-249-66-1.googlebot.com | awk '{print $1}' | sort -u 66.249.66.1

Check the busiest ones in your logs

List the addresses that sent a Googlebot user agent, busiest first, then check each one. This works on the usual combined log format of nginx and Apache:

grep -i 'googlebot' /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head -20 for ip in $(grep -i googlebot /var/log/nginx/access.log | awk '{print $1}' | sort -u | head -20); do name=$(getent hosts "$ip" | awk '{print $2}') case "$name" in *.googlebot.com|*.google.com|*.googleusercontent.com) getent ahosts "$name" | awk '{print $1}' | grep -qxF "$ip" && echo "real $ip $name" || echo "FAKE $ip $name (does not resolve back)";; *) echo "FAKE $ip ${name:-no reverse name}";; esac done

Or use the published address lists

Google publishes Googlebot's address ranges as JSON (developers.google.com/static/search/apis/ipranges/googlebot.json) and Bing does the same for Bingbot (www.bing.com/toolbox/bingbot.json). Checking against them needs no DNS lookups, which is better for a firewall or rate-limit rule that runs on every request. Fetch the lists again regularly, because the ranges change.

What to do with the answer

Fake ones: treat them like any other bot. Rate-limit or block them if they cost you something. Real ones: never block them. If real Googlebot is heavy, that is a crawl budget question (faceted navigation, endless filter URLs, slow pages), not an attack. In rate-limit rules, exempt verified crawlers rather than anything that says Googlebot.

Or hand it to your AI

With AskYourStack connected, Claude, ChatGPT or Cursor can do this on your server, following our tested playbook, and nothing changes until you open changes on that server. Paste this:

Which crawlers visited my site this week, are the Googlebots real, and is anything wasting crawl budget?

More: Technical SEO with your AI, Free robots.txt tester.

More guides