Cloaking is a black-hat SEO violation where web servers present different content or URLs to search engine crawlers (Googlebot) than to human site visitors.

Detecting User-Agent Mismatches via cURL

cURL Inspection Commandsbash
# 1. Fetch page as standard desktop browser User-Agent
curl -s -A "Mozilla/5.0 (X11; Linux x86_64)" https://example.com/ > human.html
 
# 2. Fetch page spoofing Googlebot User-Agent
curl -s -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://example.com/ > bot.html
 
# 3. Compare response diffs to verify consistency
diff human.html bot.html