Skip to content

Instantly share code, notes, and snippets.

@paulund
Created April 8, 2018 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulund/5fb069205b3a25e5f75b3448c056ce07 to your computer and use it in GitHub Desktop.
Save paulund/5fb069205b3a25e5f75b3448c056ce07 to your computer and use it in GitHub Desktop.
Nginx redirect www to non-www
server {
listen 80;
listen 443 ssl;
server_name www.example.com;
return 301 https://example.com$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment