Our homepage has a 301 redirect from HTTP to HTTPS but all other pages on the site are on HTTP.

(1) Should the sitemap be located at HTTPS and is there any problem if we:

  • (2) include the HTTPS version of homepage (not including the HTTP homepage)
  • (3) include the HTTP of all other pages within the HTTPS sitemap

I have read conflicting information about including both HTTPS and HTTP in the same sitemap so any info is appreciated here.

  • 4
    Why are you using HTTPS for your homepage but nowhere else on your site? – Andrew Lott Nov 29 '13 at 16:04
  • We have a log in form for users on the homepage so we wanted the page to have an SSL – user33692 Nov 29 '13 at 16:17
  • I'm curious where you have read it would be OK to include both HTTP and HTTPS URLs in the same sitemap? – MrWhite Nov 30 '13 at 15:12

A single XML sitemap should not contain a mix of HTTP and HTTPS URLs (i.e. essentially different locations as far as the search engines are concerned). So, the sitemap located at http://example.com/Sitemap.xml should only contain URLs starting http://example.com/ and similar for the HTTPS sitemap.

From sitemaps.org:

Q: My site has both "http" and "https" versions of URLs. Do I need to list both?
No. Please list only one version of a URL in your Sitemaps. Including multiple versions of URLs may result in incomplete crawling of your site.

From GWT Sitemap Errors:

URL not allowed
https://www.example.com/ — it's using a different protocol (https rather than http)

So, you would seem to need 2 sitemaps. One for HTTPS and the other for HTTP. Although if you only have 1 URL in your HTTPS sitemap (your homepage!) then whether you need an HTTPS sitemap at all is debatable - although it could help with reporting in GWT.

To answer your specific questions...

(1) Should the sitemap be located at HTTPS and is there any problem if we:

Well, yes and no. You would need a sitemap at both, but primarily at HTTP.

(2) include the HTTPS version of homepage (not including the HTTP homepage)

Include the HTTPS version of the homepage in the HTTPS sitemap. You state you have a redirect to the HTTPS homepage, so there is no HTTP homepage. So, the HTTP homepage should not appear in any sitemap.

(3) include the HTTP of all other pages within the HTTPS sitemap

No. You would need a separate HTTP sitemap.

| improve this answer | |
  • 1
    Thanks for that feedback w3d - that all makes sense. Just to clarify one last time: The HTTPS sitemap will just list our HTTPS Homepage. The HTTP sitemap will NOT include any reference to our homepage, since the homepage is located at HTTPS. If we decide not to submit a sitemap for HTTPS, do you imagine we'd run into any issue by not having our homepage included in a sitemap at all? – user33692 Dec 3 '13 at 12:00
  • Yes and yes. If you don't submit a sitemap for HTTPS (which would only contain your homepage) then I can't think of any issues that might arise from this. In GWT you can easily see how many pages from a particular sitemap have been indexed, but with just 1 page that is easy enough to find out by other means. At the end of the day, an XML sitemap is only advisory... Google will not necessarily index all pages in a sitemap and it will index pages that aren't included in a sitemap (if it finds them). Presumably all links to the homepage (on your site) include the HTTPS protocol? – MrWhite Dec 3 '13 at 12:20
  • (A bit off topic...) There is the other curiosity (as mentioned in comments above) as to why only your homepage/login form submission is protected by SSL. Aren't you then subsequently sending your session cookie unencrypted? – MrWhite Dec 3 '13 at 12:23
  • A small tweak: From Google's POV if you have both the HTTP & HTTPS versions of your site verified in the same Webmaster Tools account, you could submit a single Sitemap file for URLs from both "sites" (verification tells us that you own both, so you can do that). – John Mueller Dec 3 '13 at 22:33
  • @JohnMueller: So you could have a mix of HTTP and HTTPS URLs in the same sitemap after all if both sites are verified in GWT? The above GWT error that I quoted would therefore not be an error if the HTTPS site had been verified in this instance? But this, like you say, is only from Google's POV? Other SEs or systems reading the Sitemap XML file could still have problems with a mix of HTTP and HTTPS URLs? Thanks for your input. – MrWhite Dec 3 '13 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.