Free web tool

.htaccess Redirect Generator

Generate Apache redirect rules for 301, 302, HTTPS, and www — copy or download your .htaccess snippet.

Apache .htaccess redirect rules

Generate 301 redirect rules for page moves, HTTPS upgrades, and www canonicalisation. Bulk mode accepts comma- or arrow-separated pairs.

FAQ

What is an .htaccess redirect?

An .htaccess redirect uses Apache mod_rewrite rules to send visitors from one URL to another — commonly 301 (permanent) redirects for SEO.

How do I add these rules to my site?

Copy the generated code into your .htaccess file in your website root. On WordPress, use a redirects plugin instead if you are not comfortable editing .htaccess directly.

What is the difference between 301 and 302?

301 is permanent — search engines pass ranking to the new URL. 302 is temporary — use for short-term redirects.

Does this work on Nginx?

No — this generates Apache .htaccess rules. Nginx uses a different config format.