.htaccess Redirect Generator
Build redirect, HTTPS, www and caching rules for Apache.
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 โColor Converter & Picker
Convert colours between HEX, RGB, HSL and HSV and build tints, shades and palettes.
JWT Decoder
Decode a JSON Web Token and read its header, payload and expiry.
CSS, JS & HTML Minifier
Strip comments and whitespace to make your code files smaller.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text.
Password Generator
Generate strong random passwords with a live strength meter.
QR Code Generator
Create a downloadable QR code for a link, text, Wi-Fi, phone number or email.