Blog

How Reverse DNS Confirms a Crawler Is Genuine

A user agent claiming to be a search crawler is a claim, not evidence. The established way to check it uses the domain name system rather than the header, and the procedure has a specific shape for good reasons.

The header carries no proof at all

Any client can send any string. A crawler's user agent is published documentation, which means it is trivially available to anyone wanting to appear as that crawler.

Operators who grant privileges based on the header alone are granting them to whoever sends the right text. This is a common configuration and a weak one.

Verification therefore has to rest on something the requester cannot choose, which in practice means the network address the request came from.

The check runs in both directions

The address is resolved to a hostname through a reverse lookup, and that hostname is checked against the domains the search operator publishes for its crawlers.

The hostname is then resolved forward again, and the resulting address must match the original. This second step is what makes the check sound.

Without it, anyone controlling reverse records for their own address range could return a hostname they do not control. The forward confirmation closes that gap.

Results should be cached carefully

Two lookups per request is unacceptable overhead at any volume, so results are cached against the address for a bounded period.

Caching a positive result for too long is the risk, because addresses are reassigned. A moderate lifetime balances cost against staleness.

Negative results deserve caching too, since unverified traffic claiming to be a crawler often arrives in sustained volume from the same source.

Verification is only worth it where it decides something

If a site treats crawlers exactly like other visitors, verification changes nothing and the lookups are wasted work.

It matters where crawler status confers something: relaxed rate limits, access past an interstitial, or exclusion from analytics totals.

Those are exactly the privileges worth impersonating, which is why the check belongs at the point the privilege is granted rather than at the edge generally.

What a failed check should mean

A failure means the claim is unverified, not that the client is hostile. Misconfigured infrastructure and unusual network paths produce failures too.

The appropriate response is to withhold the privilege and serve the ordinary experience, not to block. Blocking on a failed verification punishes ordinary visitors caught by it.

Treating verification as a gate on privileges rather than on access keeps the failure mode proportionate to the confidence the check actually provides.