Answer the question
In order to leave comments, you need to log in
How to redirect from www to non-www with ssl?
Tell me what to prescribe and where?
Answer the question
In order to leave comments, you need to log in
Depends on what kind of server you have. Here are the redirects for nginx for example:
// https://www → https://
server {
listen 443 ssl;
server_name www.example.ru;
return 301 https://example.ru$request_uri;
}
// http://www → https://
server {
listen 80;
server_name www.example.ru;
return 301 https://example.ru$request_uri;
}
// http:// → https://
server {
listen 80;
server_name example.ru;
return 301 https://example.ru$request_uri;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question