2

Google in search console has clearly stated that it is indexing as a smartphone. Our redirection logic, look at user-agent and redirects all mobile traffic to mobile URL. However, in our mobile site's header, our canonical URL is of the desktop site. This as per Google documentation here, should be indicating it as primary URL to Googlebot and it identifies primary content based on canonical. As per the link, Googlebot tries to crawl primary content more often.

Will our redirection to mobile site and canonical with desktop URL by creating an infinite loop for the Googlebot? Is there any chance Googlebot will crawl our site less often, as the link it's getting is mobile URL and it says it's an alternative URL in its header?

Some quick info of the setup, to set the context for the question:

  1. Both the primary domain and mobile domains are sub-domains. (Eg:text.site.com & m.site.com)
  2. Google search console says it's indexing as a smartphone in the console.
  3. Mobile traffic to the desktop site is automatically redirected to the mobile URL. However, desktop traffic to a mobile URL is not redirected back.
  4. In desktop site, canonical is the desktop url itself. Eg: <link rel="canonical" href="[Desktop URL]" />. Apart from that, alternate link is given header with link to mobile site aswell. Eg: <link rel="alternate" href="[Mob URL]" />
  5. In the mobile website, the canonical URL points to the desktop site.
  6. Google search results are showing mobile URLs in mobile search and desktop URLs in desktop search.
1

I figured out the answer from some Google experts. I will post them below.

  1. This setup is valid. There is nothing wrong with desktop being canonical and smartphone being redirected to mobile url.
  2. Googlebot is intelligent enough to crawl a desktop URL with a desktop bot if it's redirected back.
  3. When the setup involves multiple URL and redirections, it's important to have the rel=alternate, and rel=canonical tags setup to communicate clearly to Googlebot what and how each of the URLs is connected. So, Googlebot won't end up in a redirect loop.

These being said, its important to note the below 2 points:

  1. Google has added a note in the link explaining how to handle multiple URL, suggesting to not use separate URL. It's basically a recommendation.
  2. Google instead suggests using dynamic loading or responsive site.

Sidenote: In any implementation consider adding vary tag in cache header so that CDN etc can understand that you serve content based on user-agent/device.

References:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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