Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

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

    1. Home
    2. Research & Trends
    3. White Hat / Black Hat SEO
    4. Can I leave off HTTP/HTTPS in a canonical tag?

    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.

    Can I leave off HTTP/HTTPS in a canonical tag?

    White Hat / Black Hat SEO
    5
    16
    21911
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • Shawn_Huber
      Shawn_Huber last edited by

      We are working on moving our site to HTTPS and I was asked by my dev team if it is required to declare HTTP or HTTPS in the canonical tag? I know that relative URL's are acceptable but cannot find anything about HTTP/HTTPS.

      Example of what they would like to do

      Has anyone done this?

      Any reason to not leave off the protocol?

      1 Reply Last reply Reply Quote 0
      • linklater
        linklater @Shawn_Huber last edited by

        Very good to hear, thanks Shawn!  The goal is to use absolute canonicals, but for a period of time, we may have to use protocol relative.  The redirects in place should avoid any duplicate content issues, which seems to be the big landmine.

        1 Reply Last reply Reply Quote 1
        • Everett
          Everett @Shawn_Huber last edited by

          That's good to know. Thanks for the update Shawn.

          Since the initial discussion took place several Google reps. have publicly stated that there is no PageRank loss between redirects and rel ="canonical" tags. This seems to substantiate their claim.

          The biggest issue with these is when giving conflicting instructions to user agents, such as a redirect to a page that rel canonicals back to the URL from which it was redirected, thus closing an infinite loop. For example, if you redirected from HTTP to HTTPS, but then the HTTPS version had a rel ="canonical" tag that was hard-coded to the HTTP version.

          The above issue doesn't apply because you're redirecting from HTTP to HTTPs, which shows a relative path rel canonical tag for the HTTPs domain.

          1 Reply Last reply Reply Quote 1
          • Shawn_Huber
            Shawn_Huber @linklater last edited by

            Now that our entire site is HTTPS, there does not seem to be any negative impact to our URL's by leaving off the HTTP protocol. If there was any traffic lost, it didn't seem significant as our reports did not indicate a decline. One year later, traffic through SEO is higher than before we implemented.

            I personally agree with Everett, don't leave things to chance. I did require that the homepage did have HTTPS for the canonical though.  I felt massive panic attacks while we were going through the transition. However, if you are unable to convince your developers the importance of using an absolute path for canonical this did not seem to have a negative impact on our site.

            I am glad that we didn't have any noticeable impact, but I am also glad that I didn't turn it into a bigger issue within our leadership team. Since we didn't see anything negative, it could've reduced my credibility within the business which would've had made it difficult for larger SEO problems.

            BTW, we are still using relative canonical tags today. (except the homepage, that still has HTTPS)

            Everett linklater 2 Replies Last reply Reply Quote 1
            • linklater
              linklater last edited by

              Hey Shawn, did using an unspecified HTTP/HTTPS protocol work for you in the canonical and/or HREF-LANG? We are going through a transition to HTTPS as well, and have multiple systems with some URLs that are hard coded. Hoping this solution would work as a short-term fix, while we update these pages to use a new, more dynamic system.

              Shawn_Huber 1 Reply Last reply Reply Quote 0
              • Everett
                Everett last edited by

                Shawn,

                My advice would be to canonical everything to the HTTPS version using an absolute path. That would be the best practice. I understand that is not what you're doing and you aren't getting any errors, but site-wide use of rel canonicals is something that can do more harm than good if a search engine misinterprets what you're trying to accomplish.

                Either way, good luck and keep us posted.

                1 Reply Last reply Reply Quote 0
                • Andy.Drinkwater
                  Andy.Drinkwater @Shawn_Huber last edited by

                  No worries Shawn. I also hope it doesn't cause issues down the line. Everything in me is screaming "Don't do it!" 😉

                  Best of luck.

                  -Andy

                  1 Reply Last reply Reply Quote 0
                  • Shawn_Huber
                    Shawn_Huber @Andy.Drinkwater last edited by

                    I know, and that's what sucks. It appears to work, but goes against what seems to be best practice and since I cannot find other instances to state one or the other it's hard not to follow their logic.

                    I just hope it doesn't screw up everything in the end. Thanks for the discussion.

                    Andy.Drinkwater 1 Reply Last reply Reply Quote 0
                    • Andy.Drinkwater
                      Andy.Drinkwater @Shawn_Huber last edited by

                      Well, if it works (which I didn't think it would!) then I guess that answers one question - and I ran that page through Screaming Frog just to confirm there are no issues and it does indeed canonical back to the https version of the page.

                      I just can't get out of the mindset that the format looks wrong. I haven't seen other instances of it done that way, and like you, have no documentation to suggest issues that might be caused.

                      Sorry I can't be of more help.

                      -Andy

                      Shawn_Huber 1 Reply Last reply Reply Quote 0
                      • Shawn_Huber
                        Shawn_Huber @Andy.Drinkwater last edited by

                        Thanks Andy, I posted a reply to the other response that ties into your comment here. On the page I listed above, there are not errors if I use HTTPS and the canonical doesn't declare anything. We have SSL certs, just haven't made the big switch yet.

                        Andy.Drinkwater 1 Reply Last reply Reply Quote 0
                        • Shawn_Huber
                          Shawn_Huber @PatrickDelehanty last edited by

                          Thanks for the answers, all of which I've passed on to them.

                          They have attempted this on a page and have not seen any errors or issues as of yet which is problematic for me in the sense of if I cannot show where any issue results by them taking shortcuts, they will not necessarily listen to my feedback.

                          Here is the URL that they have left off the protocol in the canonical

                          http://www.alaskaair.com/content/deals/flights/cheapest-flights-to-hawaii.aspx.

                          I use the Chrome extension Canonical which doesn't give me the icon indicating that I am not viewing the preferred URL. When I use HTTPS and view source it looks the same as it does with HTTP. Sometimes there are parameters in the URL like ?INT=AS_HomePage_-prodID:SEO and even with HTTP missing from the canonical it still seems to work.

                          Since I cannot find any documentation against doing it this way I am getting strong resistance to declaring HTTP and then going back at some point when it moves to HTTPS and updating. Like I've stated above, they are using this for links and assets on the site since our site moves back and forth between HTTPS and HTTP depending on what the customer is doing and they have found leaving off the protocol it makes their life easier and limits the errors that Andy below mentions.

                          https://www.alaskaair.com/content/deals/flights/cheapest-flights-to-hawaii.aspx

                          1 Reply Last reply Reply Quote 0
                          • PatrickDelehanty
                            PatrickDelehanty @PatrickDelehanty last edited by

                            Hi again

                            To be clear, I think this would populate http://www.domain.com//www.domain.com as the where the canonical should be attributed to.

                            Hope this makes a bite more sense. Good luck!

                            Shawn_Huber 1 Reply Last reply Reply Quote 0
                            • Andy.Drinkwater
                              Andy.Drinkwater last edited by

                              Example of what they would like to do

                              That would be a no-no Shawn. If you are running over SSL, then you need to canonical back to the https version of the page. If you don't, you will end up with errors on the page (yellow warning triangle) and trust issues with Google. What they would like to do is canonical to a malformed URL which it could interpret as a file.

                              Try going to any URL and just entering it as //www.domain.com

                              -Andy

                              Shawn_Huber 1 Reply Last reply Reply Quote 1
                              • PatrickDelehanty
                                PatrickDelehanty @Shawn_Huber last edited by

                                Hi there

                                According to Google...

                                Avoid errors**:** use absolute paths rather than relative paths with the rel="canonical" link element. However, they then say (under "Prefer HTTPS over HTTP for canonical URLs)...


                                Google prefers HTTPS pages over equivalent HTTP pages as canonical, except when there are conflicting signals such as the following:

                                • The HTTPS page has an invalid SSL certificate.
                                • The HTTPS page contains insecure dependencies.
                                • The HTTPS page is roboted (and the HTTP page is not).
                                • The HTTPS page redirects users to or through an HTTP page.
                                • The HTTPS page has a rel="canonical" link to the HTTP page.
                                • The HTTPS page contains a noindex robots meta tag

                                Although our systems prefer HTTPS pages over HTTP pages by default, you can ensure this behavior by taking any of the following actions:

                                • Add 301 or 302 redirects from the HTTP page to the HTTPS page.
                                • Add a rel="canonical" link from the HTTP page to the HTTPS page.
                                • Implement HSTS.

                                To prevent Google from incorrectly making the HTTP page canonical, you should avoid the following practices:

                                • Bad SSL certificates and HTTPS-to-HTTP redirects cause us to prefer HTTP very strongly. Implementing HSTS cannot override this strong preference.
                                • Including the HTTP page in your sitemap or hreflang entries rather than the HTTPS version.
                                • Implementing your SSL/TLS certificafe for the wrong host-variant: for example, example.com serving the certificate for www.example.com.  The certificate must match your complete site URL, or be a wildcard certificate that can be used for multiple subdomains on a domain.

                                Since I don't know how your SSL is configured, I can't tell you one way or another, but if you have a https version of your pages, then head that direction. Having a relative protocol won't seem to work here for what you're asking.

                                Read the above and let me know if that helps! Good luck!

                                PatrickDelehanty 1 Reply Last reply Reply Quote 1
                                • Shawn_Huber
                                  Shawn_Huber @PatrickDelehanty last edited by

                                  I did read that before I asked, it didn't really answer my question. I understand that relative URL's work, but leaving off the protocol declaration isn't relative it just leaves it up to the server to provide whether the site is secure or not.

                                  Since we use multiple systems across our site, there isn't an easy way to implement relative or absolute canonical tags which is why the dev's want to know if they can implement without HTTP/HTTPS. They like to do this with assets on the site and have started to code links in a similar manner. What I can't determine is if this will cause issues.

                                  PatrickDelehanty 1 Reply Last reply Reply Quote 0
                                  • PatrickDelehanty
                                    PatrickDelehanty last edited by

                                    Hi there

                                    According to Google, they want you to either use relative URLs or use absolute URLs. You can read more here.

                                    I recommend reading this so you can see the types of common mistakes they find and how to resolve those.

                                    Good luck!

                                    Shawn_Huber 1 Reply Last reply Reply Quote 0
                                    • 1 / 1
                                    • First post
                                      Last post

                                    Got a burning SEO question?

                                    Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                                    Start my free trial


                                    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.

                                    • See all categories

                                    Related Questions

                                    • vtmoz

                                      How good/bad the exit intent pop-ups? What is Google's perspective?

                                      Hi all, We have launched the exit intent pop-ups on our website where a pop-up will appear when the visitor is about to leave the website. This will trigger when the mouse is moved to the top window section; as an attempt by the visitor to close the window. We see a slight ranking drop post this pop-up launch. As the pop-up is appearing just before someone leaves the website; does this making Google to see as if the user left because of the pop-up and penalizing us? What is your thoughts and suggestions on this? Thanks

                                      White Hat / Black Hat SEO | | vtmoz
                                      1
                                    • Joseph-Vodafone

                                      Sub Domain rel=canonical to Main Domain

                                      Just a quick one, i have the following example scenario. Main Domain: http://www.test.com Sub Domain: http://sub.test.com What I am wondering is I can add onto the sub domain a rel=canonical to the main domain. I dont want to de-index the whole sub domain just a few pages are duplicated from the main site. Is it easier to de-index the individual sub domain pages or add the rel=canonical back to the main domain. Much appreciated Joseph

                                      White Hat / Black Hat SEO | | Joseph-Vodafone
                                      0
                                    • HashtagHustler

                                      Pointless Wordpress Tagging: Keep or unindex?

                                      Simple as that. Pointless random tags that are serving no purpose other than adding apparent bulk to a website. They are just showing duplicate content and literally are random keywords that serve almost no purpose. And the tags, for the most part are only used on one page. If I remove them however, they will probably drop our site from around 650 pages to 450 (assuming I keep any tags that were used more than once). I  have read through some of the other posts on here and I know that Google will do some work as far as duplicate content is concerned. Now as far as UX is concerned, all these tags are worthless. Thoughts?

                                      White Hat / Black Hat SEO | | HashtagHustler
                                      0
                                    • smulto

                                      Hidden H1 Tags

                                      I am trying to triple check this - I have a client who has all of their H1 tags as hidden.  As far as I am concerned, anything hidden is not a good thing for SEO. I am debating with their online store provider that this is not good practice.  Everything I am reading says it is not good practice.  They are saying it is for "My SEO experience would suggest otherwise.  In addition, the H1 adds semantic value for users with disabilities to help give them context with what the content of the page is." Did I miss something? They are a large brand and have not been penalized.  This has been happening for 8 months.

                                      White Hat / Black Hat SEO | | smulto
                                      0
                                    • VelasquezEF

                                      Best Location to find High Page Authority/ Domain Authority Expired Domains?

                                      Hi, I've been looking online for the best locations to purchase expired domains with existing Page Authority/ Domain Authority attached to them. So far I've found: http://www.expireddomains.net
                                      http://www.domainauthoritylinks.com
                                      http://moonsy.com/expired_domains/ These site's are great but I'm wondering if I'm potentially missing other locations? Any other recommendations? Thanks.

                                      White Hat / Black Hat SEO | | VelasquezEF
                                      1
                                    • patrickmilligan

                                      Title Tag - Best Practices

                                      I'm pretty new to seo but think I'm starting to get a decent grasp on it. One thing I'm really struggling with is how to organize the meta title tags on my website. I work in real estate and I'm noticing a lot of my local competitors that are ranking for the top keywords seem to using that particular keyword on every title tag within their website. An example would be www.paranych.com. Many of his internal pages have the word "Edmonton Real Estate" in the meta title tag, yet his home page is the page that is ranking for that particular keyword. It doesn't seem logical to have every one of my pages featuring the same keyword, but there are many examples within my industry of this working. Is the best practice with meta title tags to have your keyword on every title tag of your site or just the home page? Thx, Barry

                                      White Hat / Black Hat SEO | | patrickmilligan
                                      0
                                    • petewinter

                                      Can a Page Title be all UPPER CASE?

                                      My clients wants to use UPPER CASE for all his page titles. Is this okay? Does Google react badly to this?

                                      White Hat / Black Hat SEO | | petewinter
                                      0
                                    • phatride

                                      Can you block backlinks from another domain

                                      Wondering if this is somehow possible. A site got hacked and created a /data folder with hundreds of .php files that are web pages selling all sorts of stuff. We deleted the /data folder and blocked Google from indexing it. Just noticed in Webmaster Tools that the site has 35,000 backlinks from other sites that got hacked with the same way. Is there a way to block these sites? I am assuming there isn't, but wanted to see if anyone ran into the same problem. It is a wordpress site is that helps.

                                      White Hat / Black Hat SEO | | phatride
                                      0

                                    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
                                    Free SEO Tools
                                    • Domain Authority Checker
                                    • Link Explorer
                                    • Keyword Explorer
                                    • Competitive Research
                                    • Brand Authority 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

                                    Access all your tools in one place. Whether you're tracking progress or analyzing data, everything you need is at your fingertips.

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

                                    Looks like your connection to Moz was lost, please wait while we try to reconnect.