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. Technical SEO Issues
    4. Does rel="canonical" support protocol relative URL?

    Does rel="canonical" support protocol relative URL?

    Technical SEO Issues
    3 3 1.9k
    • 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.
    • EquipeWeb
      EquipeWeb last edited by

      I need to switch a site from http to https.  We gonna add 301 redirect all over the board.  I also use rel="canonical" to strip some queries parameter from the index (parameter uses to identify which navigation elements were use.)

      rel="canonical" can be used with relative or absolute links, but Google recommend using absolute links to minimize potential confusion or difficulties.  So here my question, did you see any issue using relative protocol in rel="canonical"?

      Instead of:

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

        You can use a relative canonical but the example you give is wrong, it should be href="/page1.html" The example you give looks like mis take 2 on this page http://googlewebmastercentral.blogspot.be/2013/04/5-common-mistakes-with-relcanonical.html

        rgds

        Dirk

        1 Reply Last reply Reply Quote 1
        • Cyrus-Shepard
          Cyrus-Shepard last edited by

          Relative URLs can be used, but it's still superior to use absolute URLs to avoid any mistakes down the line. i.e.  you miss a 301 redirect on a subdirectory and both HTTP and HTTPs versions resolve.

          Relative URLs can be used in a pinch, but aren't recommended.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Rel="canonical" in hyperlink
            Dr-Pete
            Dr-Pete
            0
            6
            140

          • Meta data & xml sitemaps for mobile sites when using rel="canonical"/rel="alternate" annotations
            Dr-Pete
            Dr-Pete
            0
            2
            714

          • Rel="canonical" again
            socialengaged
            socialengaged
            0
            12
            257

          • Implementation of rel="next" & rel="prev"
            KeriMorgret
            KeriMorgret
            0
            8
            1.4k

          • Campaign Issue: Rel Canonical - Does this mean it should be "on" or "off?"
            mrbradleyferguson
            mrbradleyferguson
            0
            4
            230

          • Rel="canonical" and rewrite
            webtarget
            webtarget
            0
            4
            551

          • Pagination - rel="next" and rel="prev"
            DigitalJungle
            DigitalJungle
            0
            2
            430

          • Confused about rel="canonical"
            BrandonC-269887
            BrandonC-269887
            0
            7
            1.2k

          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