.htaccess Redirect Generator
Ready rules for HTTPS, www, page and domain redirects.
About .htaccess Redirect Generator
A very common SEO mistake is leaving a site reachable on www, non-www and plain http all at once; to a search engine those look like four separate sites with duplicate content. This tool builds the htaccess rules that funnel every variant into one canonical version.
How to use .htaccess Redirect Generator
- 1
Decide whether the canonical form is www or non-www, and enable only one.
- 2
Leave the HTTPS redirect on unless you have no SSL certificate.
- 3
Add any per-page redirects using old path then new path on each line.
- 4
Place the rules in the htaccess file at your site root, above other rules.
Frequently asked questions
What is the difference between a 301 and a 302?
301 is permanent and passes the old page ranking signals to the new one. 302 is temporary and does not. For a moved address, 301 is always the correct choice.
Is www or non-www better?
SEO-wise there is no difference; what matters is picking one and staying consistent. Only if you run many subdomains does www simplify cookie scoping.
Does this work on every server?
htaccess is an Apache and LiteSpeed feature. It does nothing on Nginx, where equivalent rules go in the server configuration instead.