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
-
Who is correct - please help!
I have a website with a lot of product pages - often thousands of pages. As each of these pages is for a specific lease car they are often only fractionally different from other pages. The urls are too long, the H1 is often too long and the Title is often too long for "SEO best practice". And they do create duplication issues according to MOZ. Some people tell me to change them to noindex/nofollow whilst others tell me to leave them as they are as best not to hide from google crawler. Any advice will be gratefully received. Thanks for listening.
Technical SEO | | jlhitch0 -
Removing a site from Google index with no index met tags
Hi there! I wanted to remove a duplicated site from the google index. I've read that you can do this by removing the URL from Google Search console and, although I can't find it in Google Search console, Google keeps on showing the site on SERPs. So I wanted to add a "no index" meta tag to the code of the site however I've only found out how to do this for individual pages, can you do the same for a entire site? How can I do it? Thank you for your help in advance! L
Technical SEO | | Chris_Wright1 -
Quick Fix to "Duplicate page without canonical tag"?
When we pull up Google Search Console, in the Index Coverage section, under the category of Excluded, there is a sub-category called ‘Duplicate page without canonical tag’. The majority of the 665 pages in that section are from a test environment. If we were to include in the robots.txt file, a wildcard to cover every URL that started with the particular root URL ("www.domain.com/host/"), could we eliminate the majority of these errors? That solution is not one of the 5 or 6 recommended solutions that the Google Search Console Help section text suggests. It seems like a simple effective solution. Are we missing something?
Technical SEO | | CREW-MARKETING1 -
Staging site and "live" site have both been indexed by Google
While creating a site we forgot to password protect the staging site while it was being built. Now that the site has been moved to the new domain, it has come to my attention that both the staging site (site.staging.com) and the "live" site (site.com) are both being indexed. What is the best way to solve this problem? I was thinking about adding a 301 redirect from the staging site to the live site via HTACCESS. Any recommendations?
Technical SEO | | melen0 -
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 -
Error: Missing Meta Description Tag on pages I can't find in order to correct
This seems silly, but I have errors on blog URLs in our WordPress site that I don't know how to access because they are not in our Dashboard. We are using All in One SEO. The errors are for blog archive dates, authors and just simply 'blog'. Here are samples: http://www.fateyes.com/2012/10/
Technical SEO | | gfiedel
http://www.fateyes.com/author/gina-fiedel/
http://www.fateyes.com/blog/ Does anyone know how to input descriptions for pages like these?
Thanks!!0 -
Duplicate title-tags with pagination and canonical
Some time back we implemented the Google recommendation for pagination (the rel="next/prev"). GWMT now reports 17K pages with duplicate title-tags (we have about 1,1m products on our site and about 50m pages indexed in Google) As an example we have properties listed in various states and the category title would be "Properties for Sale in [state-name]". A paginated search page or browsing a category (see also http://searchengineland.com/implementing-pagination-attributes-correctly-for-google-114970) would then include the following: The title for each page is the same - so to avoid the duplicate title-tags issue, I would think one would have the following options: Ignore what Google says Change the canonical to http://www.site.com/property/state.html (which would then only show the first XX results) Append a page number to the title "Properties for Sale in [state-name] | Page XX" Have all paginated pages use noindex,follow - this would then result in no category page being indexed Would you have the canonical point to the individual paginated page or the base page?
Technical SEO | | MagicDude4Eva2 -
URL query strings and canonical tag
Hi, I have recently been getting my comparison website redesigned and developed onto wordpress and the site is now 90% complete. Part of the redesign has meant that there are now dynamic urls in the format: http://www.mywebsite.com/10-pounds-productss/?display=cost&value=10 I have other pages similar to this but with different content for the different price ranges and these are linked to from the menus: http://www.mywebsite.com/20-pounds-products/?display=cost&value=20 Now my questions are: 1. I am using Joost's All-in-one SEO plugin and this adds a canonical tag to the page that is pointing to http://www.mywebsite.com/10-pounds-products/ which is the permalink. Is this OK as it is or should i change this to http://www.mywebsite.com/10-pounds-products/?display=cost&value=10 2. Which URL will get indexed, what gets shown as the display URL in the SERPs and what page will users land on? I'm a bit confused so apologies if these seem like silly questions. Thanks
Technical SEO | | bizarro10000