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. Web Design
    4. Canonical Tag

    Canonical Tag

    Web Design
    4 2 599
    • 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.
    • StandUpCubicles
      StandUpCubicles last edited by

      I've been helping someone out with their website, and I noticed the person who built the site made the canonical tags like this:
      href="http://www.example.com/" rel="canonical" />

      I'm use to seeing it how seomoz does it:

      Does this matter? Is it ok to have it inverted?

      They also have another canonical tag in there like this:
       var hs_canonical_url = "http\x3A\x2F\x2Fwww.example.com\x2Fhome"

      Any idea what that is? Could it be hurting the site?

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

        For your first question, the order of the link values does not matter. Either will work. You can declare the rel or href in either order.

        StandUpCubicles 1 Reply Last reply Reply Quote 2
        • StandUpCubicles
          StandUpCubicles @RyanKent last edited by

          Thanks Ryan. I've noticed for pages like www.example.com/blog and www.example.com/blog**/**, the latter has a rel canonical = the first URL. but would this be better as a redirect?

          RyanKent 1 Reply Last reply Reply Quote 0
          • RyanKent
            RyanKent @StandUpCubicles last edited by

            Yes, definitely.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • Okay to have additional attributes in canonical tag?
              Dalerio-Consulting
              Dalerio-Consulting
              1
              2
              55

            • Have Your Thoughts Changed Regarding Canonical Tag Best Practice for Pagination? - Google Ignoring rel= Next/Prev Tagging
              Mat_C
              Mat_C
              1
              3
              76

            • Title Tag Suggestion
              crackingmedia
              crackingmedia
              0
              7
              746

            • rel="canonical" Tags Mistake
              jesse-landry
              jesse-landry
              0
              5
              222

            • Does it do harm if you add a rel="canonical" tag on a page that doesn't need it?
              MattAntonino
              MattAntonino
              0
              5
              294

            • How important are tags on blogs?
              csmm
              csmm
              0
              3
              353

            • Missing Meta Description Tag - Wordpress Tag
              jonnyholt
              jonnyholt
              0
              6
              6.0k

            • H1 Tags with Location
              kchandler
              kchandler
              0
              3
              898

            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