There’s no out-of-the-box AEM module for Googlebot verification, but it can be custom-implemented using a Sling Filter or Servlet Filter in AEM.
The solution works as follows:
1. Intercept Targeted Requests
The filter applies to paths such as:
`/content/...`
Structured data endpoints (e.g., `/page.structure-data.json`)
2. Perform Reverse DNS Lookup
Extract the client IP from `request.getRemoteAddr()`
Do a reverse DNS lookup to get the hostname
Check if the hostname ends with:
`.googlebot.com`
`.google.com`
3. Perform Forward DNS Lookup
Resolve the hostname obtained above
Verify that the original IP is one of the resolved addresses
4. Flag the Request
If both checks pass, mark the request with a flag:
request.setAttribute("isVerified", true)
Otherwise, set it to `false`
This flag can then be used in downstream logic — such as structured data components — to control what’s exposed to legitimate bots vs regular users.