certbot nginx www redirect code example
Example: digitalocean redirect http to https nginx
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}