07887 423199me@richieaubin.com

Verify crawler identity in server logs

A request can claim any user-agent string. Verify the client address before counting a request as a search crawler or acting on a block.

Crawler identity verification example
Example image · CC0 1.0 licence

Choose a way to do this check

Google’s verification instructions

  1. Use the provider’s documented method for the crawler type in your own logs.
  2. Compare reverse and forward DNS or match the appropriate published ranges.

Browser DNS lookup

  1. Resolve the client IP in reverse, then look up the returned hostname in the same address family.
  2. Confirm the forward answer matches the original address and the hostname ends in the expected domain.

Crawl log review

  1. Keep verified, unverified and unknown records separate.
  2. Do not classify a request from its user-agent string alone.

1. Identify the trusted client address

Use an address recorded by a trusted proxy or edge system. An arbitrary forwarding header from the public request is not reliable evidence. Confirm the value represents the actual client rather than an internal proxy. Keep the request time, agent label and source details according to your logging policy.

2. Choose the provider’s verification method

Google documents reverse and forward DNS checks for individual requests, and published IP range files for large-scale checks. Check which crawler type the list covers. Do not use the common Googlebot ranges to label every Google-operated fetch or every user-triggered request. Use each provider’s own documented method for other crawlers.

Terminal · resolve the logged address in both directions
address='192.0.2.10'  # Documentation address: replace with a real log observation.
dig +short -x "$address"
host='crawl-192-0-2-10.googlebot.com'  # Replace with the returned name.
dig +short "$host" A
dig +short "$host" AAAA

For a claimed common Googlebot request, check that the returned name is under the expected googlebot.com domain. Check the name at a domain label boundary. A name containing the word Googlebot somewhere is not sufficient. Confirm that forward DNS resolves back to the original client address of the same family. Differences in textual IPv6 formatting may represent the same address, so compare parsed addresses where needed.

3. Record and review the outcome

At scale, record the provider list version or verification method and time used. Avoid one DNS request for every repeated log line and keep appropriate limits on lookups. Use an unverified state when DNS does not resolve or the evidence disagrees. Do not silently label missing information as proof of spoofing.

Crawler findings · keep the classification evidence
request_id,claimed_agent,verified_provider,verification_method
sample-1,Googlebot,Google,Published common crawler IP ranges
sample-2,Googlebot,,Forward lookup did not match

Check a known verified request and an unverified control before publishing totals. Where verification occurs after the request, note that the DNS or published ranges could have changed. Keep the verification distinct from the SEO assessment of which routes were fetched.

Technical references

Frequently asked questions

Can the user agent prove it is Googlebot?

No. Use the documented IP or DNS check.

Is a matching reverse lookup enough?

For the DNS method, confirm the hostname belongs to the expected domain and resolves back to the original address.

Should I label all Google addresses as Googlebot?

No. Identify the crawler class that matches the documented evidence.

What if the IP is hidden behind my CDN?

Use the trusted client IP recorded by your CDN or a correctly configured origin log.

Written by Richie Aubin

Published