6

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)

6

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.

  • 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. – MrWhite 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 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.