Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
What is the correct Canonical tag on m.site?
-
We have 2 separate sites for desktop (www.example.com) and mobile (m.example.com)
As per the guideline, we have added Rel=alternate tag on www.example.com to point to mobile URL(m.example.com) and Rel=canonical tag on m.example.com to point to Desktop site(www.example.com).However, i didn't find any guideline on what canonical tag we should add ifFor Desktop sitewww.example.com/PageA - has a canonical tag to www.example.com/PageBOn this page, we have a Rel=alternate tag m.example.com/pageAWhat will be the canonical we should add for the mobile version of Page Am.example.com/PageA - Canonical tag point to www.example.com/PageA -or www.example.com/PageB?Kalpesh
-
Hi, I hope this helps,
Do NOT point desktop pages to m. pages via a
rel="canonical" tags use rel="alternate" for that & make sure
rel="canonical"tag on the m. URL pointing to the corresponding desktop URL
Annotations for desktop and mobile URLs
- On the desktop page, add a
rel="alternate"
tag pointing to the corresponding mobile URL. This helps Googlebot discover the location of your site's mobile pages. - On the mobile page, add a
rel="canonical"
tag pointing to the corresponding desktop URL.
We support two methods to have this annotation: in the HTML of the pages themselves and in sitemaps. For example, suppose that the desktop URL is
https://example.com/page-1
and the corresponding mobile URL ishttps://m.example.com/page-1
. The annotations in this example would be as follows.Annotations in the HTML
On the desktop page (
https://www.example.com/page-1
), add the following annotation:<code dir="ltr"><linkrel="alternate"media="only screen="" and="" (max-width:="" 640px)"<br="">href="https://m.example.com/page-1"></linkrel="alternate"media="only></code>
On the mobile page (
https://m.example.com/page-1
), the required annotation should be:<code dir="ltr"><linkrel="canonical"href="https: www.example.com="" page-1"=""></linkrel="canonical"href="https:></code>
This
rel="canonical"
tag on the mobile URL pointing to the desktop page is required.A page have a self-referencing canonical URL
In the example above, we link the non-canonical page to the canonical version. But should a page set a rel=canonical for itself? I strongly recommend having a canonical link element on every page and Google has confirmed that’s best. That’s because most Sites & CMS’s will allow URL parameters without changing the content.
So all of these URLs would show the same content:
-
https://www.example.com/page-1
-
https://www.example.com/page-1/?isnt=it-awesome
-
https://www.example.com/page-1/?cmpgn=twitter
-
https://www.example.com/page-1/?cmpgn=facebook
Using a mobile website version of their desktop version, they need to implement a canonical tag on their mobile website page with an URL of the desktop version.
For example,
Your main domain: iamexample.com
Your mobile version: m.iamexample.com
Then, have this tag in the section of your main domain -
And, have this tag in the section of your mobile version page -
Mobile-Specific URLs, Such as AMP Pages or a Mobile-Specific Subdomain
Creating content with mobile in mind is a marketing must -- just be sure to remember to set your canonical URLs when you have pages that are specific to mobile but have the same content as a page on the desktop version of your website. For AMP pages specifically, Google also provides detailed guidelines on how to correctly differentiate your Accelerated Mobile Page from your standard webpage.
SEE:
- https://developers.google.com/search/mobile-sites/mobile-seo/separate-urls
- https://yoast.com/rel-canonical/
- https://moz.com/blog/cross-domain-rel-canonical-seo-value-cross-posted-content
- https://moz.com/learn/seo/canonicalization
- https://moz.com/blog/rel-canonical
Hope this helps,
Tom
- On the desktop page, add a
-
You shouldn't have canonical tags on either pointing to the other IMO. A canonical tag, deployed on a web-page, says to Google "I am the non-canonical version of a page. Unless you have signals like links which contradict this tag strongly, don't index this non-canonical page at all. Only index the canonical URL which I am pointing you to"
So the page which you place the canonical tag on, becomes (itself) non canonical and therefore gives a medium-to-strong signal to Google that it should be de-indexed. As such, if you plaster your mobile site in canonical tags, you are essentially telling Google that the entire mobile site is non-canonical and thereby probably not a great candidate for indexation. Do you want your mobile site to rank? I assume you do
I don't know what guidance you have read. Google's guidance is often woefully out of date as their documentation update cycle for organic-search stuff is really poor. If it was something here on Moz, I personally disagree with it
I would just stick with the alternate tags. Anyway if you have canonicals going in two directions, you will create a soft redirect loop where both URLs specify themselves as non-canonical. That could make things way worse than they are now
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Canonical tag use for ecommerce product page detail
Hi, I have a category page I want to rank. This page has 24 different products quite similar but not exactly the same.
Technical SEO | | amastone
I want to use canonical tag in any product to the parent category.
Is this a right use of the canonical?
Category page I'm talking about is : Finger bits If I understand how to use canonical tags I can improve all my category pages. thanks marco0 -
Does my "spam" site affect my other sites on the same IP?
I have a link directory called Liberty Resource Directory. It's the main site on my dedicated IP, all my other sites are Addon domains on top of it. While exploring the new MOZ spam ranking I saw that LRD (Liberty Resource Directory) has a spam score of 9/17 and that Google penalizes 71% of sites with a similar score. Fair enough, thin content, bunch of follow links (there's over 2,000 links by now), no problem. That site isn't for Google, it's for me. Question, does that site (and linking to my own sites on it) negatively affect my other sites on the same IP? If so, by how much? Does a simple noindex fix that potential issues? Bonus: How does one go about going through hundreds of pages with thousands of links, built with raw, plain text HTML to change things to nofollow? =/
Technical SEO | | eglove0 -
How to create site map for large site (ecommerce type) that has 1000's if not 100,000 of pages.
I know this is kind of a newbie question but I am having an amazing amount of trouble creating a sitemap for our site Bestride.com. We just did a complete redesign (look and feel, functionality, the works) and now I am trying to create a site map. Most of the generators I have used "break" after reaching some number of pages. I am at a loss as to how to create the sitemap. Any help would be greatly appreciated! Thanks
Technical SEO | | BestRide0 -
Mobile site ranking instead of/as well as desktop site in desktop SERPS
I have just noticed that the mobile version of my site is sometimes ranking in the desktop serps either instead of as well as the desktop site. It is not something that I have noticed in the past as it doesn't happen with the keywords that I track, which are highly competitive. It is happening for results that include our brand name, e.g '[brand name][search term]'. The mobile site is served with mobile optimised content from another URL. e.g wwww.domain.com/productpage redirects to m.domain.com/productpage for mobile. Sometimes I am only seen the mobile URL in the desktop SERPS, other times I am seeing both the desktop and mobile URL for the same product. My understanding is that the mobile URL should not be ranking at all in desktop SERPS, could we be being penalised for either bad redirects or duplicate content? Any ideas as to how I could further diagnose and solve the problem if you do believe that it could be harming rankings?
Technical SEO | | pugh0 -
Do canonical tags pass all of the link juice onto the URL they point to?
I have an ecommerce website where the category pages have various sorting and paging options which add a suffix to the URLs. My site is setup so the root category URL, domain.com/category-name, has a canonical tag pointing to domain.com/category-name/page1/price however all links, both interner & external, point to the former (i.e. domain.com/category-name). I would like to know whether all of the link juice is being passed onto the canonical tag URL? Otherwise should I change the canonical tag to point the other way? Thanks!
Technical SEO | | tjhossy0 -
Do I need to add canonical link tags to pages that I promote & track w/ UTM tags?
New to SEOmoz, loving it so far. I promote content on my site a lot and am diligent about using UTM tags to track conversions & attribute data properly. I was reading earlier about the use of link rel=canonical in the case of duplicate page content and can't find a conclusive answer whether or not I need to add the canonical tag to these pages. Do I need the canonical tag in this case? If so, can the canonical tag live in the HEAD section of the original / base page itself as well as any other URLs that call that content (that have UTM tags, etc)? Thank you.
Technical SEO | | askotzko1 -
Header Tags
Ok so I am writing different pages and the first heading is an H3 just because I wanted to it be a certain size. Then as you see the content, I have an H1 tag. Example page: http://www.oxfordmshomes.net/condos/acadia-court-Oxford-MS you can see that "Acadia First" is the first thing you see on the page and it uses an H3 element. Long story short, my hierarchy is wrong. Does this have any negative effect on my SEO efforts?
Technical SEO | | blake-766240 -
Robots.txt and canonical tag
In the SEOmoz post - http://www.seomoz.org/blog/robot-access-indexation-restriction-techniques-avoiding-conflicts, it's being said - If you have a robots.txt disallow in place for a page, the canonical tag will never be seen. Does it so happen that if a page is disallowed by robots.txt, spiders DO NOT read the html code ?
Technical SEO | | seoug_20050