Server and HTTP · Server behaviour

Different responses for Googlebot and users

This page shows Googlebot a different title and an extra paragraph of text that visitors never see, which is cloaking.

How this page is built

A Netlify Edge Function on this page checks the user agent. When it contains Googlebot, the page gets a different title and the extra paragraph below. Everyone else gets the page as you see it.

Both responses carry a Vary: User-Agent header, so caches keep them apart. To see the difference, request the page with curl and the -A Googlebot option, then without it.

Why it matters

Showing search engines different content from visitors is cloaking, which breaks Google’s spam policies. Pages that do it on purpose can be removed from the index.

It also happens by accident: a server that treats bots differently for speed, a personalisation layer, or a security rule can change the page for Googlebot. Then Google indexes and ranks a page that visitors never see.

How to check it

Request the page twice, once with a browser user agent and once with a Googlebot user agent, and compare the two. Crawl tools can crawl as Googlebot, and some compare the responses for different user agents. The URL Inspection tool in Search Console shows the page Google fetched.

How to fix it

Serve the same content to everyone. If the server must treat bots differently, for example to skip personalisation, make sure the title, headings, text, links and structured data stay the same.

Then fetch the page with URL Inspection to confirm what Google sees.

Back to all tests