Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have changed my website from HTTP to HTTPS.

At this moment, I have the next rewrite rule working to redirect calls for HTTP to HTTPS:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://example.net/$1 [R,L] 

Should I write the URLs on the sitemap with HTTP or with HTTPS? (including the homepage)

share|improve this question
up vote 6 down vote accepted

The sitemap should reflect the way pages should be accessed, if you want them to be accessed by HTTPS, then yes, that is what you have to do. Otherwise, you are just making the server work a bit extra each time it's crawled.

share|improve this answer
Thanks for the answer. First time I used a Sitemap generator it included the homepage with http protocol too, but I thought this is not good so I created a sitemap using https protocol and now all my links are https in the sitemap. – toofast Feb 20 '14 at 9:32
@toofast: "the homepage with http protocol too" - you can't generally use HTTP and HTTPS in the same sitemap, if that is what you are implying by "too"? However, Google will allow this if you have verified both sites in GWT - but it is not part of the sitemap protocol. – w3dk Feb 20 '14 at 10:16
So it's ok if I have added the https protocol link in GWT and the sitemap including only https links? – toofast Feb 20 '14 at 10:20
yes, there should be no problem – PatomaS Feb 20 '14 at 11:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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