โ†ช๏ธ

.htaccess Redirect Generator

Build redirect, HTTPS, www and caching rules for Apache.

Advertisement
Ad slot: top
Always keep a copy of your current .htaccess before replacing it. One wrong line can take the whole site down with a 500 error โ€” if that happens, restore the backup and the site comes straight back.
Advertisement
Ad slot: incontent

About the .htaccess Redirect Generator

Three generators in one: bulk 301 or 302 redirects from a simple list of old and new paths; canonical rules that force HTTPS and pick www or non-www; and the common performance and security block covering gzip, browser caching, directory listing and security headers.

Everything is produced as plain text you paste into the .htaccess file in your site root.

Frequently asked questions

301 or 302?

Use 301 when the move is permanent โ€” it passes ranking signals to the new URL. Use 302 only for genuinely temporary moves.

My site broke after adding rules

Restore the backup you kept and the site comes straight back. A 500 error nearly always means a directive your host does not have enabled.

Related tools

All Developer โ†’
Advertisement
Ad slot: bottom