View as Googlebot: What User-Agent Switching Proves
This feature temporarily changes the browser tab's User-Agent header to Googlebot's, so a server that serves different content based on UA reveals that behaviour. It is a UA switch only. The requesting IP stays the browser's own, and nothing about Google's actual rendering pipeline runs.
Why it matters
This test switches only the User-Agent header. Real cloaking checks both UA and the crawl IP: two separate dimensions. A page could serve different content to actual Google IP ranges whilst treating this spoofed UA like any browser. So a green result here doesn't prove the site is safe.
Use this test for catching bugs in feature detection or bot-blocking code. It's reliable for finding accidental UA-sniffing mistakes, not for proving whether cloaking is intentional or present.
How it works
The browser's User-Agent header is a string that identifies the client software, e.g., Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36. Googlebot's User-Agent is Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) for the desktop crawler and a distinct string for the mobile crawler. When you toggle the "View as Googlebot" feature, the extension rewrites the User-Agent header before fetching the page. If the server treats Googlebot's UA differently than a browser UA, the HTML will differ.
The limitation is that this test controls only the User-Agent header. The requesting IP address remains your browser's IP, not Google's actual crawl IPs. A server could implement IP-based cloaking (serving different HTML to Google's IP ranges than to public IPs) that this test would never detect. Similarly, if the server renders content dynamically with JavaScript after detecting the UA as a browser, this test only sees the initial HTML, not the rendered result.
What does not matter
The fact that a page renders the same in this test does not prove the site is safe from cloaking. A sophisticated cloaking implementation could treat this spoofed UA the same as any browser, yet still cloak to actual Googlebot crawl IPs. This test is a filter, not a full forensic analysis.
Differences in how a page renders for different User-Agents aren't always malicious. Adaptive serving (e.g., a bot detector that blocks bad bots but allows Googlebot) is legitimate. So is serving a stripped-down mobile version to mobile crawlers when appropriate.
Code example
Here is a page that uses UA sniffing to block bots:
<script>
if (navigator.userAgent.includes('Googlebot')) {
document.body.innerHTML = '<p>Sorry, bots are not allowed.</p>';
}
</script>
<h1>Welcome to our site</h1>
<p>This is the real content.</p>
When you view this page in a normal browser, you see the real content. When you view it as Googlebot (this feature), you see the bot block message. This reveals UA-based sniffing. Fixing it means either removing the sniffing code or allowing Googlebot specifically.
How Scalpel shows it
The extension has a toolbar toggle that temporarily reloads the active tab with Googlebot's User-Agent applied. You can compare the content side-by-side with a normal browser view to spot UA-based differences.