Nginx Redirect Generator
Generate Nginx redirect and rewrite rules. Create 301/302 redirects, HTTPS redirects, and www redirects.
39.0Kuses
9/10(135)
Redirect Rules
Nginx Config
server {
listen 80;
server_name example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name www.example.com;
return 301 https://example.com$request_uri;
}
server {
listen 443 ssl;
server_name example.com;
location = /old-page {
return 301 /new-page;
}
# ... rest of your config
}Features
- 301 and 302 redirect rules
- HTTP to HTTPS redirect
- www to non-www redirect
- Regex pattern support
⚡ Pro OptionsSponsored
Some links on this page are affiliate links. If you click and make a purchase, we may earn a commission at no extra cost to you.
Disclaimer: This tool is provided as-is for informational and educational purposes only.