Skip to content
Jellykit

.htaccess Redirect Generator

Generate .htaccess rules for Apache: 301 and 302 redirects from a list of old and new URLs, force HTTPS and add or remove www. Copy or download. Free tool.

Runs in your browser. Nothing is uploaded.

About .htaccess Redirect Generator

Moving pages without redirects loses visitors and search rankings. List each old path and its new URL, and get Apache .htaccess rules: either simple Redirect lines (mod_alias) or RewriteRule lines (mod_rewrite), with your choice of 301, 302, 307 or 308.

Optional blocks force HTTPS and add or remove www, each as a single permanent redirect so search engines see one canonical address.

How to use .htaccess Redirect Generator

  1. Type or paste your text into the input box. Press Sample to see an example.
  2. Adjust the options. The result updates as you type.
  3. Copy the result, or press Use as input to chain another transformation.

Frequently asked questions

301 or 302?

Use 301 for permanent moves so search engines transfer ranking to the new URL. Use 302 only for temporary changes.

Does this work on Nginx?

No. .htaccess is Apache (and LiteSpeed) only. Nginx uses return 301 rules in the server config.

Is .htaccess Redirect Generator free and private?

Yes. .htaccess Redirect Generator is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all developer tools →