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. On-Page / Site Optimization
    4. Can you reference http and https in a sitemap.xml?

    Can you reference http and https in a sitemap.xml?

    On-Page / Site Optimization
    3 2 124
    • 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.
    • RoxBrock
      RoxBrock last edited by

      I have a site where some pages (in Spanish) are https. The english pages are http. Can you tell me if it's okay to have both in the sitemap.xml?

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

        I think you can, I always would make it two different sitemaps though to also have the data for the specific languages.

        1 Reply Last reply Reply Quote 1
        • RoxBrock
          RoxBrock last edited by

          After reading some Google documentation I set it up like this:

          <url><loc>http://www.mexpro.com/</loc>
            <lastmod>2014-08-25T21:02:47+00:00</lastmod>
            <changefreq>monthly</changefreq>
            <priority>1.00</priority>
            <xhtml:link <br="">rel="alternate"
                           hreflang="es-mx"
                           href="https://www.mexpro.com/mx/"
                           />
            <xhtml:link <br="">rel="alternate"
                           hreflang="en"
                           href="http://www.mexpro.com/"
                           />
            <xhtml:link <br="">rel="canonical"
                           href="http://www.mexpro.com/mexico/"
                           /></xhtml:link></xhtml:link></xhtml:link></url>

          Do I need rel="alternate" and rel="canonical" for the sitemap, or is it better to do a traditional sitemap for English and Spanish?Thank you.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • How To Avoid Redirect Chains When Switching From http to https
            BWiseContractors
            BWiseContractors
            0
            5
            750

          • HTTP to HTTPS
            GPainter
            GPainter
            0
            2
            52

          • Sitemap.xml parameters
            JohnHuynh
            JohnHuynh
            0
            3
            194

          • Do https sites rank as well as http sites?
            JustinClark
            JustinClark
            0
            4
            145

          • Tool to creat a good XML sitemap
            SEO5Team
            SEO5Team
            0
            4
            422

          • Google indexing https insted of http pages
            malecce
            malecce
            0
            8
            479

          • Website accessible on http and https. Is it bad?
            CyrilWilson
            CyrilWilson
            1
            6
            662

          • Are xml sitemaps still in use today?
            Tobiask-121573
            Tobiask-121573
            1
            13
            1.3k

          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