server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name "~^www.(?.*joshstock.in)$"; # www redirect to non-www return 301 https://$domain$request_uri; }