Skip to content

Instantly share code, notes, and snippets.

@imliam
Created March 21, 2017 09:44
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 imliam/9d57038df1e37ecd2c1d8e2e559a102d to your computer and use it in GitHub Desktop.
Save imliam/9d57038df1e37ecd2c1d8e2e559a102d to your computer and use it in GitHub Desktop.
Nginx - Redirect www to non-www
server {
server_name www.yourdomain.com;
return 301 $scheme://yourdomain.com$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment