Having a mobile subdomain and redirecting users there is absolutely fine with Google. Google maintains a guide for setting up your mobile site. In it Google says they support three types of mobile sites:
- Responsive web design - One site where the content resizes itself to fit the screen
- Dynamic serving - One site where the server detects the device type and serves differently formatted pages
- Separate URLs - Different pages for mobile and desktop with redirects between them.
Google says that the "separate URLs" solution is sometimes called an "m-dot site" because a common way of implementing it is to have the mobile site on the subdomain m.example.com
. What you are proposing is fully supported by Google.
Google also has a page about cloaking. Cloaking is serving different content or different redirects to visitors than to Googlebot. It is easy to avoid cloaking with a mobile subdomain. Googlebot crawls with both mobile and desktop variant user agents:
- Desktop:
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
- Mobile:
Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
You should treat Googlebot just like any other visitor: redirect the Googlebot variant that looks like a mobile phone (Android
) to the mobile site and redirect regular Googlebot to the desktop site.
Every page on your desktop site should redirect to the same content on the mobile site and vice-versa. You should never redirect deep pages to the mobile home page.
When implemented properly, there is no risk of cloaking when redirecting to a mobile subdomain.