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. XHTML tag syntax for rel=alternate hreflang

    XHTML tag syntax for rel=alternate hreflang

    Technical SEO Issues
    2 2 51
    • 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.
    • ZachKline
      ZachKline last edited by

      Is there a difference in the below two tags? My dev team is saying the first can be implemented (technical issue on their end), even though second is preferable, according to support.google.com, in the below two sitemap hreflang notations. My question is, will the first xhtml tag work for Google? Appreciate the input.

      <xhtml:link href="<a href="http://store.hp.com/CanadaStore/" rel="nofollow" target="_blank">http://store.hp.com/CanadaStore/" hreflang="en-ca" rel="alternate" /></xhtml:link href="<a>

      <xhtml:link  href="<a href=" http:="" store.hp.com="" canadastore="" "="" rel="nofollow" target="_blank">http://store.hp.com/CanadaStore/" rel="alternate" hreflang="en-ca" /></xhtml:link >

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

        In my experience a couple of spaces and the order of attributes don't matter at all. Google will understand just as easily and your developers won't have to jump through extra hoops.

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post
        • How to use rel=alternate and hreflang=es to help with International SEO?
          BlueprintMarketing
          BlueprintMarketing
          0
          3
          70

        • Hreflang tag implementation
          WeAreDigital_BE
          WeAreDigital_BE
          0
          4
          170

        • Does Canonical Tag Syntax Matter?
          Healio
          Healio
          0
          3
          92

        • Hreflang Tags - error: 'en' - no return tags
          DirkC
          DirkC
          0
          4
          645

        • Using hreflang tags properly.
          absoauto
          absoauto
          0
          3
          125

        • Duplicate Titles and Sitemap rel=alternate
          JoelDay
          JoelDay
          0
          3
          100

        • SEO question: Need help on rel="alternate" hreflang="x"
          TruvoDirectories
          TruvoDirectories
          0
          3
          183

        • Will I still get Duplicate Meta Data Errors with the correct use of the rel="next" and rel="prev" tags?
          irvingw
          irvingw
          0
          6
          911

        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

        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