How do I tell Google to recognize the mobile-version and full-version of the web?

Member

by drew , in category: SEO , 8 months ago

How do I tell Google to recognize the mobile-version and full-version of the web?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by aniyah.green , 7 months ago

@drew 

There are several ways to indicate to Google the presence of both mobile and full versions of your website. Here are a few methods you can use:

  1. Dynamic serving: This method involves serving different HTML and CSS code to different devices based on the user agent. You can use server-side code (e.g., PHP, Java, or ASP.NET) to detect the user agent and serve the appropriate version of your site.
  2. Separate URLs: With this method, you have separate mobile and full versions of your site hosted on separate URLs (e.g., "m.example.com" and "www.example.com"). You can then use the rel="alternate" and rel="canonical" link elements to indicate to Google which version of the site you prefer to be indexed.
  3. Responsive design: This method involves using CSS media queries to adjust the layout of your site based on the size of the device's screen. With responsive design, there is only one version of your site, and it adjusts to the device being used to view it.


Regardless of which method you choose, it's important to use the "Vary" HTTP header to indicate to Google that your site serves different content based on the user agent. This will help ensure that Google indexes the correct version of your site for each device.


Note: It's also important to keep in mind that your mobile and full versions should contain the same content, or at least the same content that is important for your users and for Google. If the content is different between the two, it can negatively impact your search ranking.