↑ ↓ select, Enter open, Esc close

Fetch a page as Googlebot and compare with a normal request

Adjust the values, the command updates live
user@server
for ua in 'Mozilla/5.0 (X11; Linux x86_64)' 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'; do curl -s -o /dev/null -A "$ua" -w "%{http_code}  %{size_download} Bytes  $ua\n" https://example.com/; done

Compares two requests that differ only in the user agent. A different status code or a very different size points to bot blocking (WAF, Fail2ban, security plugins), hacked sites serving spam only to Google, or faulty caching rules.

Note: Small size differences due to nonces or timestamps are normal. diff <(curl -s URL) <(curl -s -A 'Googlebot' URL) compares the content in detail.

Also searched as

  • fetch page as googlebot curl
  • does google see a different page
  • check for cloaking
  • is googlebot being blocked

Related one-liners

All in SEO checks

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.