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. Is this correct?

    Is this correct?

    Intermediate & Advanced SEO
    6 3 1.6k
    • 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.
    • Bio-RadAbs
      Bio-RadAbs last edited by

      I noticed Moz using the following for its homepage

      Is this best practice though?  The reason I ask is that, I use  and I've been reading this page by Google

      http://googlewebmastercentral.blogspot.co.uk/2013/04/5-common-mistakes-with-relcanonical.html

      5 common mistakes with rel=canonical

      Mistake 2: Absolute URLs mistakenly written as relative URLs

      The tag, like many HTML tags, accepts both relative and absolute URLs. Relative URLs include a path “relative” to the current page. For example, “images/cupcake.png” means “from the current directory go to the “images” subdirectory, then to cupcake.png.” Absolute URLs specify the full path—including the scheme like http://.

      Specifying (a relative URL since there’s no “http://”) implies that the desired canonical URL is http://example.com/example.com/cupcake.html even though that is almost certainly not what was intended. In these cases, our algorithms may ignore the specified rel=canonical. Ultimately this means that whatever you had hoped to accomplish with this rel=canonical will not come to fruition.

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

        Looks fine to me, i think you misunderstand Mistake 2

        They are using an absolute URL

        If they did the "mistake 2" their canonical tag would look like


        You canonical tags should always be absolute for good practice

        is correct

        or any variant of this would be wrong

        Bio-RadAbs 1 Reply Last reply Reply Quote 1
        • Bio-RadAbs
          Bio-RadAbs @ATP last edited by

          Thanks, I realise the usage should be a correct relative URL or a correctly formed absolute URL. In Moz's case, they used a correctly formed absolute URL.

          My question is more around...why not use "/"?

          Cyto

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

            Ow im sorry, totally mis understood - sorry if i was explaining something you understood.

            Moz use

            you said they use

            /> i presume now you mean the / at the end of the tag.

            This is an old school closing tag. HTML elements were traditionally opened and closed in HTML versions before HTML5. Normally this is done obviously with tags such the opener "

            " and closer  "

            ". However some elements dont have a seperate closing tag such as "" tags. In older html versions these were closed using the format

            Missing these tags didn't used to do much as most browsers rendered the page correctly anyways, but best practice was to include the / to close elements. However with the dawn of HTML5 things changed.

            HTML5 doesn't require the closing tag. Elements that used to require one now simply dont. Browsers still understand both versions absolutely fine and its kinda ok to use either. But the most modern and correct practice is to use it without.

            Edit:

            Racking my brain, i believe the / was added as best practice to assure compatibility with XHTML which was pegged to be the next version of HTML. When XHTML was scrapped in favour of HTML5 it changed. Somebody may correct me on this one though 🙂

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

              This post is deleted!
              Bio-RadAbs 1 Reply Last reply Reply Quote 1
              • Bio-RadAbs
                Bio-RadAbs @Guest last edited by

                Thanks

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                • The correct hreflang for the GB
                  Taiger
                  Taiger
                  0
                  7
                  816

                • Correct Schema Markup
                  BlueprintMarketing
                  BlueprintMarketing
                  0
                  9
                  1.4k

                • Canonical code set up correctly?
                  Linda-Vassily
                  Linda-Vassily
                  0
                  3
                  96

                • Correct URL Parameters for GWT?
                  Everett
                  Everett
                  0
                  3
                  1.0k

                • How long until my correct url is in the serps?
                  Travis-W
                  Travis-W
                  0
                  5
                  956

                • Is my schema implemented correctly and not spammy?
                  RobertFisher
                  RobertFisher
                  1
                  8
                  387

                • Title tags not displaying correctly?
                  Webmaster_SEO
                  Webmaster_SEO
                  0
                  4
                  470

                • Site not indexing correctly
                  ShaMenz
                  ShaMenz
                  0
                  11
                  730

                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