.htaccess Redirect Generator

Create 301 redirects, HTTPS and www rules for Apache. Free, no sign-up, works in your browser.

Always keep a backup of your current .htaccess before replacing it.

🔒 100% private — processing happens in your browser. Nothing is uploaded.

How to create .htaccess redirects

  1. Tick “Force HTTPS” and choose www: leave, remove or add.
  2. Choose whether to remove trailing slashes.
  3. List page redirects, one per line: /old-page /new-page.
  4. Choose 301 or 302, then copy or download the .htaccess.

Redirects for Apache sites

When you move pages, change domains or switch to HTTPS, redirects send visitors and Google to the new address and keep your search rankings. 301 means permanent and passes SEO value; 302 is temporary.

Always back up your current .htaccess before replacing it, and test a few URLs afterwards.

Questions and answers

Does it work on Nginx?

No, .htaccess is for Apache and LiteSpeed servers.

301 or 302?

301 for permanent moves, 302 for short-term ones.

Where do I put the file?

In the root folder of your site (public_html).

Is it free?

Yes, no sign-up.