Is it ok to have Desktop URL as canonical when Googlebot is crawling as Smartphone?

Is it ok to have Desktop URL as canonical when Googlebot is crawling as Smartphone? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Is it ok to have Desktop URL as canonical when Googlebot is crawling as Smartphone? error on your web browser. Problem :


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.


Solution :

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:




We hope that this article has helped you resolve the seo, redirects, googlebot error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=