Redirect Rule Generator
100% PrivateWebsite & Webmaster ToolsTurn a list of old and new URLs into ready-to-paste .htaccess or Nginx redirect rules.
Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.
- 1Enter a from path and a destination for the first redirect, and pick its status code.
- 2Add rows for each additional redirect.
- 3Choose the output format for your server or host.
- 4Fix any validation messages, then copy or download the generated block.
Rows /old-soap to /soap (301) and /blog/post-1 to /journal/post-1 (301) generate: rewrite ^/old-soap$ /soap permanent; rewrite ^/blog/post-1$ /journal/post-1 permanent;
- Nginx output uses rewrite with permanent/redirect flags for 301 and 302, and an exact-match location with a return directive for 307 and 308, because rewrite cannot emit those codes.
- In Nginx format, regex characters in the from path (such as the dot in /old.html) are escaped automatically.
- The generator validates shape only: it cannot know whether the destination exists or whether your server already has conflicting rules. Test redirects after deploying them.
301 is permanent: browsers and search engines treat the move as final and transfer ranking signals. 302 is temporary: the original URL stays the canonical one. Use 307 or 308 when the request method must be preserved exactly (308 is the permanent version of 307).
About this tool
The Redirect Rule Generator turns a list of from/to pairs into ready-to-paste server configuration in three formats: Apache .htaccess Redirect lines, Nginx rewrite and return rules, and the _redirects file format used by Cloudflare Pages and Netlify. Status codes 301, 302, 307 and 308 are supported per row, and the rows are validated before anything is generated.
Related tools
Part of Ovatly's free tools in Website & Webmaster Tools.