.htaccess Redirect Generator β Free Online
Generate .htaccess redirect rules online for free. Create 301 permanent, 302 temporary, and wildcard redirects with correct Apache syntax instantly.
About Htaccess Redirect Generator
Redirects are essential for SEO when you change URLs, move to HTTPS, rebrand a site, or fix broken links. Our .htaccess redirect generator creates correctly formatted Apache redirect rules for 301 permanent redirects, 302 temporary redirects, URL rewriting, www to non-www redirects, HTTP to HTTPS redirects, and trailing slash canonicalisation. Simply enter the old URL and new URL, choose the redirect type, and copy the generated Apache-compatible .htaccess code to your server.
Frequently Asked Questions
What is the difference between 301 and 302 redirects?
A 301 is permanent and passes SEO link equity. A 302 is temporary and keeps the old URL indexed.
When should I use a 301 redirect?
Use 301 redirects when permanently changing URLs, moving to HTTPS, or consolidating duplicate pages.
Can it generate HTTP to HTTPS redirects?
Yes β a one-click option generates the Apache rules to force all HTTP traffic to HTTPS.
How do I add the rules to my website?
Copy the generated code and paste it into your .htaccess file in the root directory.
Does it work with Nginx?
This generator creates Apache .htaccess syntax. For Nginx, different directive syntax is required.