server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; server_name www.joshstock.in; # www redirect to non-www return 301 https://joshstock.in$request_uri; }