The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. Canonical and Alternate Advice

    Canonical and Alternate Advice

    Intermediate & Advanced SEO
    27 4 811
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JH_OffLimits
      JH_OffLimits @Nigel_Carr last edited by

      Would this mean we need canonical only on desktop or mobile site?

      Nigel_Carr 1 Reply Last reply Reply Quote 0
      • BlueprintMarketing
        BlueprintMarketing last edited by

        You guys are fast I was going to answer this and had to do some other things but let me weigh in on couple things.

        as you said

        “We are in a predicament of how to properly use the canonical and alternate rel tags**. Currently we have a canonical on mobile and alternate on desktop, both of which have the same URL because both mobile and desktop use the same as explained in the first paragraph.”**

        so what you’re saying is that you have a dynamic site so you don’t need to add “alternate"media” tags to the site.

        https://developers.google.com/search/mobile-sites/mobile-seo/dynamic-serving

        As it is not immediately apparent in this setup that the site alters the HTML for mobile user agents (the mobile content is "hidden" when crawled with a desktop user agent), it’s  recommend that the server send a hint to request that Googlebot for smartphones also crawl the page, and thus discover the mobile content. This hint is implemented using the Vary HTTP header.

        **you don’t need this **

        Annotations in the HTML

        On the desktop page (http://www.example.com/page-1), add the following annotation:

        <code dir="ltr"><linkrel="alternate"media="only screen="" and="" (max-width:="" 640px)"<br="">href="http://m.example.com/page-1"></linkrel="alternate"media="only></code> 
        

        On the mobile page (http://m.example.com/page-1), the required annotation should be:

         <code dir="ltr"><linkrel="canonical"href="http: www.example.com="" page-1"=""></linkrel="canonical"href="http:></code> 
        

        This rel="canonical" tag on the mobile URL pointing to the desktop page is required.

        Annotations in sitemaps

        We support including the rel="alternate"annotation for the desktop pages in sitemaps like this:

         <code dir="ltr"><urlsetxmlns="http: www.sitemaps.org="" schemas="" sitemap="" 0.9"<br="">xmlns:xhtml="http://www.w3.org/1999/xhtml">
          <url><loc>http://www.example.com/page-1/</loc>
            <xhtml:linkrel="alternate"media="only screen="" and="" (max-width:="" 640px)"<br="">href="http://m.example.com/page-1"/></xhtml:linkrel="alternate"media="only></url></urlsetxmlns="http:></code> 
        

        The required rel="canonical" tag on the mobile URL should still be added to the mobile page's HTML.

        **to be sure **

        Are you willing to share your domain with us? Or one domain?

        1. We're talking about multiple websites that all have the identical site structure or at least mobile and desktop site structure?

        2. Your server is making the change for you?

        3. Would you be kind enough to install this plug-in on chrome in order for you to show a couple examples of the canonical and the URL?

        • https://chrome.google.com/webstore/detail/portents-seo-page-review/babgchcegnkbiojmdpnoilficladccfm?hl=en-US
        • https://chrome.google.com/webstore/detail/link-redirect-trace/nnpljppamoaalgkieeciijbcccohlpoh?hl=en

        In addition, would you be kind enough to run your site through the two tools here ( 100% free and very easy to use)

        • https://varvy.com/mobile/
        • https://varvy.com/
        • &
        • https://redbot.org/

        If you would not mind doing this and sending screenshots it would mean a lot to us and getting your canonical's straightened out.

        screenshots https://snag.gy/  then upload to http://imgur.com/

        everything is on the same server I'm assuming?

        Of the three below how would you categorize your site?

        1. https://developers.google.com/search/mobile-sites/mobile-seo/separate-urls
        2. https://developers.google.com/search/mobile-sites/mobile-seo/dynamic-serving
        3. https://developers.google.com/search/mobile-sites/mobile-seo/responsive-design

        Respectfully,

        Tom

        JH_OffLimits 1 Reply Last reply Reply Quote 1
        • Nigel_Carr
          Nigel_Carr @JH_OffLimits last edited by

          The URLs are identical it is just the content that is served that may be slightly different.

          Since you can only specify one canonical for each URL it makes no difference. Just self-reference and that is it.

          If you had to different URLs then it would be an issue where you woudl need a rel=alternative so there is nothing to worry about.

          Regards

          Nigel

          effectdigital 1 Reply Last reply Reply Quote 2
          • effectdigital
            effectdigital @Nigel_Carr last edited by

            This is the correct solution!

            1 Reply Last reply Reply Quote 0
            • JH_OffLimits
              JH_OffLimits @BlueprintMarketing last edited by

              Hi,

              I can't give off too much information as it's not my call, but I can answer your questions without mentioning the brands.

              1. We have multiple brand sites, that have a similar setup. They all have mobile and desktop versions of the sites running on the same URL, both of which show the same content.

              2. The server determines whether if you're on a desktop or mobile devices using the header information, and points the user to the site relevant files for the given device.

              3. Our sites would quite clearly fit in the dynamic serving category.

              We have 301 redirects on none www to www and http to https.

              BlueprintMarketing 1 Reply Last reply Reply Quote 1
              • BlueprintMarketing
                BlueprintMarketing @JH_OffLimits last edited by

                Cool, that's what I thought when I heard your description I just wanted to be very thorough because sometimes you get very little information and I appreciate you letting me know that.

                dynamic  serving URLs are identical to each other so you should have a self-referencing canonical tag because the URL does not change the real canonical tag just decides what should be in the index and the same URL.

                You're Rel canonical should be something like this example below

                Example URL https://www.example.com/example-url/

                because the end URL is the same and URL that you want to be indexed in Google you want to be certain that you have a self-referencing URL to prevent query strings and other things like that and you do not need to point a URL to an identical URL you just need a self-referencing canonical if that makes sense.

                See: https://yoast.com/rel-canonical/

                I hope that is of help,

                Tom

                BlueprintMarketing JH_OffLimits 2 Replies Last reply Reply Quote 0
                • BlueprintMarketing
                  BlueprintMarketing @BlueprintMarketing last edited by

                  Unless you are using AMP?

                  Then you would add

                  Linking pages with

                  In order to solve this problem, we add information about the AMP page to the non-AMP page and vice versa, in the form of  tags in the .

                  Add the following to the non-AMP page:

                  <link rel="amphtml" href="https://www.example.com/url/to/amp/document.html">
                  
                  

                  And this to the AMP page:

                  <link rel="canonical" href="https://www.example.com/url/to/full/document.html">
                  

                  are you using AMP pages?

                  https://support.google.com/webmasters/answer/139066?hl=en

                  https://www.ampproject.org/docs/fundamentals/discovery

                  I hope that helps you if not please let me know.

                  Respectfully,

                  Tom

                  1 Reply Last reply Reply Quote 0
                  • JH_OffLimits
                    JH_OffLimits @BlueprintMarketing last edited by

                    Just to confirm, are we suppose to have a canonical on desktop and mobile or just desktop?

                    This would mean removing the alternate?

                    Want to confirm everything before iterating this across to others.

                    We are not using AMP, just a standard site setup.

                    BlueprintMarketing 1 Reply Last reply Reply Quote 1
                    • BlueprintMarketing
                      BlueprintMarketing @JH_OffLimits last edited by

                      What URLs are you  using with the “alternate” tag on?

                      You said 
                      ”1. We have multiple brand sites, that have a similar setup. They all have mobile and desktop versions of the sites running on the same URL, both of which show the same content.

                      2. The server determines whether if you're on a desktop or mobile devices using the header information, and points the user to the site relevant files for the given device.”

                      thats Dynamic serving same URL

                      Dynamic serving is a setup where the server responds with different HTML (and CSS) on the same URL depending on which user agent requests the page (mobile, tablet, or desktop).

                      that would NOT give you the mobile or m.example.com & www.example.com different URLs

                      **But If you do have  a different  m.example.com & www.example.com  URLs you should use this code or  XML site maps **

                      for different URLs use this:

                      Annotations in the HTML

                      On the desktop page (http://www.example.com/page-1), add the following annotation:

                      <linkrel="alternate"media="only screen="" and="" (max-width:="" 640px)"<="" span="">href="http://m.example.com/page-1"></linkrel="alternate"media="only>

                      On the mobile page (http://m.example.com/page-1), the required annotation should be:

                      <linkrel="canonical"href="http: www.example.com="" page-1"=""></linkrel="canonical"href="http:>

                      This rel="canonical" tag on the mobile URL pointing to the desktop page is required.

                      Or

                      Annotations in sitemaps

                      We support including the rel="alternate"annotation for the desktop pages in sitemaps like this:

                      <urlsetxmlns="http: www.sitemaps.org="" schemas="" sitemap="" 0.9"<="" span="">xmlns:xhtml="http://www.w3.org/1999/xhtml">

                      <loc>http://www.example.com/page-1/</loc>
                      <xhtml:linkrel="alternate"media="only screen="" and="" (max-width:="" 640px)"<="" span="">href="http://m.example.com/page-1"/></xhtml:linkrel="alternate"media="only></urlsetxmlns="http:>

                      You should have the same URL on mobile and desktop

                      You should have the same rel canonical tag on your URLs unless and this is a big unless you're talking about using Google AMP?

                      If the URL you want to be indexed is the same URL point everything to that URL if that makes it easier to understand.

                      respectfully,

                      Tom

                      BlueprintMarketing JH_OffLimits 2 Replies Last reply Reply Quote 0
                      • BlueprintMarketing
                        BlueprintMarketing @BlueprintMarketing last edited by

                        The single self-referencing URL will work.

                        1 Reply Last reply Reply Quote 0
                        • JH_OffLimits
                          JH_OffLimits @BlueprintMarketing last edited by

                          So both mobile and desktop require a self referencing canonical(in both headers)?

                          Sorry for the questions, just need to make sure! It's a very touchy subject!

                          BlueprintMarketing 1 Reply Last reply Reply Quote 0
                          • BlueprintMarketing
                            BlueprintMarketing @JH_OffLimits last edited by

                            Hey man I understand is a big deal

                            could you do me a huge favor and run your site through screaming frog SEO spider send me a couple of pages with the domains whited out so I can tell you 100% what to do in this situation because I am basing this on what you have told me and honestly I would like to look at what a tool can show me and that will tell me what I need to do.

                            Or you can tell me if the mobile version of the site hit's Google's index yes or no?

                            respectfully,

                            Tom

                            JH_OffLimits 1 Reply Last reply Reply Quote 0
                            • JH_OffLimits
                              JH_OffLimits @BlueprintMarketing last edited by

                              I've been told to pass on a URL, thanks for your help Thomas!

                              https://www.stag.com/

                              BlueprintMarketing Nigel_Carr 2 Replies Last reply Reply Quote 1
                              • BlueprintMarketing
                                BlueprintMarketing @JH_OffLimits last edited by

                                Use a self-referencing canonical

                                https://blog.seoprofiler.com/google-recommend-self-referencing-canonical-tags/

                                Please let me know if you want me to remove the image below?

                                you can use this one if needed http://bseo.io/c1vMSv

                                mgkic5E.png

                                JH_OffLimits 1 Reply Last reply Reply Quote 0
                                • Nigel_Carr
                                  Nigel_Carr @JH_OffLimits last edited by

                                  Hi JH

                                  I'm sure Thomas means well with his multiple complicated posts but all of this is totally unnecessary.

                                  Both sites are serving the same URL

                                  You can't put a rel=alternative because there is nothing to point to.

                                  Just put a self-referencing canonical. I said that 2 hours ago!

                                  That is all.

                                  Regards Nigel

                                  BlueprintMarketing 1 Reply Last reply Reply Quote 2
                                  • JH_OffLimits
                                    JH_OffLimits @BlueprintMarketing last edited by

                                    So a self referencing canonical on both mobile and desktop versions of the site, regardless if they chuck out two version with the same content?

                                    Nigel_Carr 1 Reply Last reply Reply Quote 1
                                    • BlueprintMarketing
                                      BlueprintMarketing @Nigel_Carr last edited by

                                      Sorry Nigel

                                      was not trying to make this more complicated was just trying to make sure that we were all on the same page.

                                      FYI if you need a method of adding the rel canonical to your website quickly you can use Google tag manager or if you want to add to the header

                                      https://support.stackpath.com/hc/en-us/articles/360001445283-EdgeRules-Adding-a-Canonical-Header

                                      Nigel_Carr 1 Reply Last reply Reply Quote 0
                                      • Nigel_Carr
                                        Nigel_Carr @JH_OffLimits last edited by

                                        There is only ONE URL that is the point.

                                        If they share the same URL then you only have one page of code so ONE canonical

                                        Regards

                                        Nigel

                                        1 Reply Last reply Reply Quote 0
                                        • Nigel_Carr
                                          Nigel_Carr @BlueprintMarketing last edited by

                                          The reason we answered 'quickly' by the way is because we are in the UK -  you were still in bed lol! 🙂

                                          BlueprintMarketing 1 Reply Last reply Reply Quote 1
                                          • BlueprintMarketing
                                            BlueprintMarketing @Nigel_Carr last edited by

                                            That would normally be the case but not tonight.

                                            LOL, I am picking up a lot of the UK Q&A I will be at BrightonSEO and search love London if any of you guys will be in the area I'd love to grab a pint?

                                            sincerely,

                                            Thomas

                                            1 Reply Last reply Reply Quote 1
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            • Advice needed on canonical paginated pages
                                              Nobody1616542228134
                                              Nobody1616542228134
                                              0
                                              4
                                              38

                                            • [Advice] Dealing with an immense URl structure full of canonicals with Budget & Time constraint
                                              Charles-O
                                              Charles-O
                                              1
                                              5
                                              308

                                            • Canonicals question ref canonicals pointing to redundant urls
                                              AndyMacLean
                                              AndyMacLean
                                              0
                                              4
                                              99

                                            • Mixing 'rel canonical' and 'rel alternate'
                                              Vizergy
                                              Vizergy
                                              0
                                              2
                                              147

                                            • Rel="canonical" and rel="alternate" both necessary?
                                              Dr-Pete
                                              Dr-Pete
                                              0
                                              10
                                              9.3k

                                            • Backlinking from a Canonical Page to the Non-Canonical Doman - Wrong Signals?
                                              EvolveCreative
                                              EvolveCreative
                                              0
                                              2
                                              165

                                            • Alternative to rel canonical?
                                              YESdesign
                                              YESdesign
                                              0
                                              5
                                              268

                                            • To "Rel canon" or not to "Rel canon" that is the question
                                              Dr-Pete
                                              Dr-Pete
                                              0
                                              10
                                              728

                                            Get started with Moz Pro!

                                            Unlock the power of advanced SEO tools and data-driven insights.

                                            Start my free trial
                                            Products
                                            • Moz Pro
                                            • Moz Local
                                            • Moz API
                                            • Moz Data
                                            • STAT
                                            • Product Updates
                                            Moz Solutions
                                            • SMB Solutions
                                            • Agency Solutions
                                            • Enterprise Solutions
                                            • Digital Marketers
                                            Free SEO Tools
                                            • Domain Authority Checker
                                            • Link Explorer
                                            • Keyword Explorer
                                            • Competitive Research
                                            • Brand Authority Checker
                                            • Local Citation Checker
                                            • MozBar Extension
                                            • MozCast
                                            Resources
                                            • Blog
                                            • SEO Learning Center
                                            • Help Hub
                                            • Beginner's Guide to SEO
                                            • How-to Guides
                                            • Moz Academy
                                            • API Docs
                                            About Moz
                                            • About
                                            • Team
                                            • Careers
                                            • Contact
                                            Why Moz
                                            • Case Studies
                                            • Testimonials
                                            Get Involved
                                            • Become an Affiliate
                                            • MozCon
                                            • Webinars
                                            • Practical Marketer Series
                                            • MozPod
                                            Connect with us

                                            Contact the Help team

                                            Join our newsletter
                                            Moz logo
                                            © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                                            • Accessibility
                                            • Terms of Use
                                            • Privacy