Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

1 Answer 1

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 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. –  w3d Feb 20 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 at 10:20
    
yes, there should be no problem –  PatomaS Feb 20 at 11:14

Your Answer

 
discard

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.