1

We have our normal website - http://www.example.com. We now also have a mobile site - http://m.example.com. If a "mobile" user visits my site, we have JavaScript that detects it and auto forwards them over to the mobile site as well, for proper user experience.

When I use Google's "Am I mobile friendly" tools, my site doesn't show up as mobile friendly, since it's checking the original site, rather than what is redirected.

How do I "tell" Google, or assure myself that Google is aware of our mobile presence (since not having a mobile presence can affect SEO)?

3
  • 1
    Seems like using JavaScript to trigger a mobile switch would be a major speed/performance hit, as well as not too reliable/compatible in regards to automated tools/bots/scans. Are you able to migrate the trigger to server side pre-process instead?
    – dhaupin
    Commented Apr 17, 2015 at 23:24
  • 1
    And to confirm Google sees the mobile: find your site in a serp using a mobile phone. It will show a grey "mobile friendly" tag in the description. Might take a few days to aappear.
    – dhaupin
    Commented Apr 17, 2015 at 23:30
  • Thanks @dhaupin I never gave any thought to redirecting at the server side, but that would definately be a preferred option. I'll research some more..
    – ewitkows
    Commented Apr 20, 2015 at 13:08

1 Answer 1

1

This is what Google calls the "separate URLs" configuration.

In the desktop site, you should add a special <link rel="alternate" ...> tag pointing to the corresponding mobile URL. This helps Googlebot discover the location of your site's mobile pages.

In the mobile site, you should add a <link rel="canonical" ...> tag pointing to the corresponding desktop URL.

You can put the links either in the HTML of the pages or in your sitemaps.

More details and explanation here.

2
  • 1
    As a note, those meta directives should happen with server side logic, don't use JS conditionals to render them into Dom via the existing JS mobile switch
    – dhaupin
    Commented Apr 17, 2015 at 23:28
  • Thanks! Will add this today and let you know if I have any issues, much appreciated
    – ewitkows
    Commented Apr 20, 2015 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.