L
L
Lici2015-04-30 13:15:53
HTML
Lici, 2015-04-30 13:15:53

Sitemap.xml file and https - how to write?

If the site is transferred to https, should the site.ru/post links be changed to https://site.ru/post ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nikita Kamenev, 2015-04-30
@NickStone

Yes, and everything.
Alternating protocols can lead to incorrect indexing of the site by search engines.
And if the site supports encryption, then redirect everyone who goes to http:

RewriteEngine On
 RewriteCond %{HTTPS} !=on
 RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

A
Alexander Karabanov, 2015-04-30
@karabanov

I did find . -type f -name "*.*" -exec sudo sed -i 's! http://!//!g ' {} \;
That is, I replaced http:// with simply //
Now the browser chooses the protocol itself. So does Google, so does Yandex, etc.
Browsers have supported this feature since the 90s, so no problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question