Answer the question
In order to leave comments, you need to log in
How to redirect when switching to HTTPS?
Website changed from http to https. And a letter came from Yandex:
The main mirror of your website addressSite.ru has changed: instead of the addressSite.ru, the domain https://addressSite.ru has become the main one in the group of mirrors . We recommend checking that the new main mirror is available for indexing and gives the robot a 200 code.
If you are not satisfied with this choice, you can change the main mirror using a 301 redirect. Use the Site Move tool to speed up the application of the new directions and verify that the settings required for the change of address are correct.
Sites are recognized as mirrors of each other if they return the same content to the robot. If this is no longer the case, the sites will unstick automatically within a few weeks. For more information about mirror sites, see Help.
Questions arose: in which files and what to change, and where are the actual mirrors from (or even if they are not there, it still sends this Yandex message as a warning)? I read that it is not relevant to change the Host directive in robot.txt.
Answer the question
In order to leave comments, you need to log in
Example config for nginx:
server {
if ($host = your-site.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80 ;
listen [::]:80 ;
server_name your-site.com;
return 404; # managed by Certbot
}
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Mon, 29 Apr 2019 10:43:47 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://site.ru/about
X-XSS-Protection: 1; mode=block
HTTP/1.1 301 Moved Permanently
Location: https://site.ru/about
Don't panic, you don't need to change anything. Yandex really sent this as a warning.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question