We’ve heard it over and over again for at least the last two years: responsive design is where it’s at for mobile SEO. We get it.
Unfortunately, responsive design might not always be an option. Maybe your client already has a mobile version of their website and absolutely loves it as if it was one of his own children. Or, maybe your client does not have a responsive redesign in their budget. So when responsive design just isn’t an option, what can you do to ensure mobile SEO best practices?
Optimizing for Mobile on the Same URL
If you want to serve mobile-friendly content on the desktop URL, user-agent detection is the way to go. By detecting the user agent (the device or browser being used) on the server side, you have the option to dynamically serve mobile-friendly HTML and CSS. This allows you to serve mobile devices a more mobile-friendly version of the on-page content without fooling around with redirects. A downside to this is that not all methods of user-agent detection work very well or work for all mobile devices (some methods detect screen size, some detect a mobile browser, and some detect the specific device).
Optimizing for Mobile on Different URLs
If you’re dealing with a completely separate mobile website where the mobile content has unique URLs, you will want to use bidirectional annotations — basically, a rel=alternate and rel=canonical loop.
For the desktop version of a page, use: rel=“alternate”
<link rel=”alternate” media=”only screen and (max-width: 640px)”href=“http//m.example.com/page-one/”>
For the corresponding mobile page, use: rel=“canonical”
<link rel=”canonical” href=”http://www.example.com/page-one/” >
When you use different URLs to serve the same content in different formats, the annotation tells search engines that those two URLs have equivalent content and should be treated as a single website instead of two. If they are treated separately, both desktop and mobile URLs will likely be shown in desktop search results, and the two pages may compete with each other for placement in the SERPs.
Note: For mobile-specific URLs, Google does not favor any particular URI format (including m. subdomains and .mobi extensions), as long as pages are accessible to Googlebot and Googlebot-Mobile.
Mobile Sitemaps for SEO
If you are using one sitemap for both desktop and mobile website version, you will want to annotate your main XML sitemap to include the mobile URLs. To indicate there is a mobile version of a URL, use the rel= alternate tag to let crawlers know there is an alternate version of the content.
If you have a separate mobile website, you will want to include a mobile-specific sitemap. Mobile-specific sitemaps should be created using mobile sitemap protocol, and should only contain those URLs that are mobile-specific (do not include your desktop URLs).