Nginx URL Rewrite & 301 Redirect Generator
Processed in your browser
Generate high-performance Nginx server block rewrite rules and 301 / 302 directives for domain migration and HTTPS.
Redirect Configuration
Nginx Directives
⚡
Direct In-Browser Handoff
HTTP Header & Security Policy Suite
Chain this tool with complementary private browser utilities for a complete zero-server workflow:
Helpful Examples
Canonical HTTPS & www
Redirect http and non-www to https://www.example.com
https redirect
How to Use the Nginx URL Rewrite & 301 Redirect Generator
Client-side Nginx URL redirect and rewrite engine. Formulate high-performance `return 301`, `return 302`, and regex `rewrite` directives for non-www to www normalization, HTTP to HTTPS redirection, trailing slash enforcement, and path restructuring.
Privacy & Data Processing Notice
No user data leaves your browser. Computation is executed entirely on your device. We do not store, view, or transmit your inputs over our network. Your computation remains on your personal machine.
Frequently Asked Questions
Why is return 301 preferred over rewrite in Nginx?
The Nginx team explicitly advises using `return 301 https://$host$request_uri;` over `rewrite ^(.*)$` because `return` avoids regular expression engine overhead and executes instantaneously.
How do 301 redirects preserve SEO link equity?
A 301 (Moved Permanently) status code instructs search engines to transfer PageRank, anchor text relevancy, and ranking history from the legacy URL to the target URL.
Related Utilities
Frequently paired browser tools in SEO & Webmaster Tools