UTILS.
100% in-browser

htaccess Redirect Generator

Generate Apache .htaccess redirect rules from a list of from and to pairs.

Each line: source path, then destination URL.
— output appears here —

About this tool

Turn a list of old-path to new-URL pairs into Apache Redirect directives for your .htaccess file, choosing 301 or 302 status; the rules are built in your browser.

Frequently asked questions

When should I use 301 versus 302?
Use 301 for permanent moves so search engines transfer ranking to the new URL, and 302 for temporary redirects you intend to reverse.
What format does each line take?
Each line is the old path followed by the destination, for example '/old-page https://example.com/new-page' separated by a space.

More tools