NginX – redirect domain with www to without www

server {

    listen 80;

    server_name www.example.com;

    return 301 $scheme://example.com$request_uri;

}

Was this helpful?

0 / 0