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. Rel Canonical Syntax

    Rel Canonical Syntax

    Intermediate & Advanced SEO
    7 7 3.3k
    • 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.
    • costume
      costume last edited by

      My IT department is getting ready to setup the rel canonical tag, finally.  I took a look at the code on our test server and see that they are using a single quote in the tag syntax (see code block below).  Should I be concerned?  Will Google read those lines the same?

      <link rel='canonical' href='[http://www.wholesalecostumeclub.com/easter-costumes/bunny-suits](view-source:http://www.wholesalecostumeclub.com/easter-costumes/bunny-suits)' />VS.
      
      **versus**
      
      <link rel="canonical" href="[http://www.wholesalecostumeclub.com/easter-costumes/bunny-suits](view-source:http://www.wholesalecostumeclub.com/easter-costumes/bunny-suits)" />
      
      1 Reply Last reply Reply Quote 0
      • dohertyjf
        dohertyjf last edited by

        I'm not positive about how they'll deal with it, but why take a chance? It won't be that hard for them to change it from a single to a normal quotation, especially since it's on your test server.

        Better safe than sorry.

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

          I agree with John... why chance it?  It should be a piece of cake for them to set it up with conformity to the standard 🙂

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

            I have used it like this and haven't had any issues<link rel="canonical" href=http://www.sitename.com />If you use wordpress - yoast seo plugin - does it the same way.Read this post it will clear your question
            http://www.seomoz.org/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps

            1 Reply Last reply Reply Quote 0
            • Getz.pro
              Getz.pro last edited by

              Double quote is the norm in HTML

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

                <link rel="canonical" href="<a class="external" rel="nofollow" target="_blank">http://www.sitename.com/</a>" />
                would be correct. Don't forget the double quotes!
                
                1 Reply Last reply Reply Quote 1
                • oznappies
                  oznappies last edited by

                  To quote W3C draft specification on HTML5

                  Attributes are placed  inside the start tag, and consist of a name and a value, separated by an "=" character. The attribute value can remain unquoted if it doesn't contain spaces or any of  " ' ``` = <  or >. Otherwise, it has to be quoted using  either single or double quotes. The value, along with the "=" character, can be omitted altogether if the value  is the empty string.

                  The accepted convention is " but according to the standard both are supported.

                  P.S. Is a version of your site live, if so I would maybe like to blog about it as it is related to what we are doing in baby toddler items (looking at your avatar).

                  1 Reply Last reply Reply Quote 1
                  • 1 / 1
                  • First post
                    Last post
                  • Should I put rel next and rel prev and canonical on tags pages
                    donsilvernail
                    donsilvernail
                    1
                    2
                    43

                  • Rel=canonical
                    MickEdwards
                    MickEdwards
                    0
                    4
                    63

                  • Cross Domain Rel Canonical tags vs. Rel Canonical Tags for internal webpages
                    VanguardCommunications
                    VanguardCommunications
                    0
                    5
                    1.2k

                  • 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

                  • Rel Canonical Link on the Canonical Page
                    Stew222
                    Stew222
                    0
                    4
                    248

                  • Is it ok to add rel=CANONICAL into the desktop version on top of the rel="alternate" Tag (Mobile vs Desktop version)
                    Ideas-Money-Art
                    Ideas-Money-Art
                    0
                    3
                    172

                  • Pagination, AJAX, rel=next and previous, rel canonical and meta noindex :)
                    Dr-Pete
                    Dr-Pete
                    0
                    4
                    6.9k

                  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