The scanner does not know. But he never knows even for sites that return simple ol html - it’s very easy to write code that hides the site based on http headers used by scanners or known IP headers.
See this related question: How does Google know you're Cloaking?
Most of them seem like a hunch, but there seem to be various in-place checks, varying between cheating on normal browser headers and the actual person viewing the page.
Continuing the hypothesis, of course, it would not be beyond the ability of programmers on Google to write a crawler form that actually retrieves what the user sees - in the end, they have their own browser that does just that. It would be prohibitively expensive for the CPU to do this all the time, but it probably makes sense for a random check.
source share