I'm currently looking into building a mobile version of our website, and I've been looking at how our competitors do it. It seems that a common way to do this is check for the useragent when someone hits the main domain, and then to redirect to a mobile version of the site - m.domain.com, for example.
Quite often, our competitors are blocking search bots from indexing m.domain.com (presumably to avoid dupe content), but it's suddenly struck me that this is effectively cloaking.
Google is showing www.domain.com in the index, but when a human visitor hits that site it sees m.domain.com. Due to the fact that m.domain.com can't be indexed, that will never be displayed by the search engine, so in theory, I could have a lovely looking & well optimised page on www.domain.com, and as soon as you get redirected to the same page on m.domain.com I could serve a completely different ad-heavy page.
How does Google determine that this isn't being abused, or used for cloaking?