.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 โCSS, JS & HTML Minifier
Strip comments and whitespace to make your code files smaller.
JWT Decoder
Decode a JSON Web Token and read its header, payload and expiry.
Color Converter & Picker
Convert colours between HEX, RGB, HSL and HSV and build tints, shades and palettes.
URL Encoder / Decoder
Percent-encode or decode URLs and query string components.
UUID Generator
Generate cryptographically random UUID v4 identifiers in bulk.
SQL Formatter
Format a messy SQL query into readable, indented lines.