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. Should sitemap include https pages?

    Should sitemap include https pages?

    Intermediate & Advanced SEO
    7 2 5.7k
    • 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.
    • G.Anderson
      G.Anderson last edited by

      Hi guys,

      Trying to figure out some onsite issues I've been having. Would appreciate any feedback on the following 2 questions:

      My homepage (http://mysite.com) is a 301 redirect to https://mysite.com, which is under SSL. Only 2 pages of my site are https, the rest are http.

      1. Should the directory of my sitemap be https://mysite.com/sitemap.xml or should it be kept with http (even though the redirected homepage is to https)?

      2. Should my sitemap include the https pages (only 2 pages) as well as the http?

      Thanks,

      G

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

        Hey G!

        You can serve your sitemap in both versions, that won't be any problem and won't trigger the duplicate content issue. So you are safe both ways.

        As for the second question: Yes, you should, unless you don't want your pages indexed (any HTTP or HTTPS). I think I saw your site before, and if I remember correctly you had your homepage and login script under SSL, right? Then you should definitely include your homepage in the sitemap but you can leave the login script file out as you don't need that indexed nor google will index it either.

        Once you have your sitemap ready, consider including a path in the robots file, like this:

        User-agent: *
        Sitemap: http://[your website address here]/sitemap.xml

        Hope that helps!

        G.Anderson 1 Reply Last reply Reply Quote 1
        • G.Anderson
          G.Anderson @FedeEinhorn last edited by

          Hey Federico,

          Thanks again for the insight - much appreciated.

          So there's no problem for us to create a sitemap that has the https homepage and then the rest of the pages in http? From reading previous Q&As on this topic it seems as though people felt you shouldn't have https and http pages under the same sitemap - I am a novice here so that's why I'm just looking for advice.

          Is there any reason why we would need to have the two sitemaps available - as in, why wouldn't we just remove the old http sitemap (that didn't include the https homepage) and just go with the https homepage sitemap?

          I just wanted to make sure I understood your response before we take action.

          Cheers,

          -G

          FedeEinhorn 1 Reply Last reply Reply Quote 0
          • FedeEinhorn
            FedeEinhorn @G.Anderson last edited by

            G,

            It wouldn't do any difference to serve the sitemap over HTTP or HTTPS. As for the http and https pages within the same sitemap, it isn't a problem either.

            The only reason I can find for creating multiple sitemaps is for HTML pages, images or videos that do require separate sitemaps.

            Does you site uses PHP? If yes, I suggest you test xml-sitemaps.com and it will create the full sitemap for you. If you have a dynamic site, then I suggest getting their commercial version. I've been using it for over 7 years I think and I always get a copy for each site I create. And they offer lots of extras in case you need them (news sitemaps, etc).

            G.Anderson 1 Reply Last reply Reply Quote 0
            • G.Anderson
              G.Anderson @FedeEinhorn last edited by

              Thanks for the input Frederico. I've been receiving various different answers to this question.

              Most responses have said that we should submit 2 sitemaps: 1 sitemap listed under http that only includes the http pages of the site (which means we wouldn't include our homepage since it's under https!!!).

              And 1 sitemap listed on the https version which only includes the https pages (which is only 2 pages!).

              To be honest, I still don't know what to do here. Really frustrating that there is no clear cut answer to our situation, which I can't believe is even that unique.

              FedeEinhorn 1 Reply Last reply Reply Quote 0
              • FedeEinhorn
                FedeEinhorn @G.Anderson last edited by

                Those suggesting not to add the SSL pages to the HTTP sitemap are using data back from 2007, when indeed Google showed an error on those sitemaps listing both HTTP and HTTPS pages as they were being recognized as different domains. Those days are long gone. Google had evolved and can now handle sitemaps with both HTTP and HTTPS pages just fine.

                G.Anderson 1 Reply Last reply Reply Quote 0
                • G.Anderson
                  G.Anderson @FedeEinhorn last edited by

                  Hi Frederico,

                  On the google Sitemaps Errors help page, they include the following information:

                  "You should also check that the URLs all begin with the same domain as your Sitemap location. For instance, if your Sitemap is listed under http://www.example.com/sitemap.xml, the following URLs are not valid for that Sitemap:

                  • http://www.google.com — it's in the google.com domain rather than the example.com domain
                  • http://example.com/ — it's missing the initial www
                  • www.example.com/ — it's missing the protocol (http), and will generate an Invalid URL warning
                  • https://www.example.com/ — it's using a different protocol (https rather than http)

                  Any URLs in the Sitemap that are not denied are processed normally."

                  This leads me to understand that Google don't want you to put http urls in an https sitemap and also vice-versa. What makes you believe otherwise??

                  Hoping to get to the bottom of this - thanks for the ongoing feedback

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  • How will canonicalizing an https page affect the SERP-ranked http version of that page?
                    BlueprintMarketing
                    BlueprintMarketing
                    0
                    4
                    85

                  • Sitemap: unique sitemap or different sitemaps by Country
                    ConclusionDigital
                    ConclusionDigital
                    0
                    4
                    2.3k

                  • Sitemaps and dynamic pages
                    Martijn_Scheijbeler
                    Martijn_Scheijbeler
                    0
                    2
                    66

                  • Xml sitemap Issue... Xml sitemap generator facilitating only few pages for indexing
                    Paddy_Moogan
                    Paddy_Moogan
                    0
                    6
                    153

                  • To include in Sitemap or not to include?
                    HB17
                    HB17
                    0
                    4
                    2.7k

                  • Should all pages on a site be included in either your sitemap or robots.txt?
                    RossFruin
                    RossFruin
                    1
                    8
                    162

                  • Duplicate pages with http and https
                    Diana.varbanescu
                    Diana.varbanescu
                    0
                    6
                    261

                  • Blocking Pages Via Robots, Can Images On Those Pages Be Included In Image Search
                    Dr-Pete
                    Dr-Pete
                    0
                    6
                    682

                  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