.htaccess redirect generator
List old and new addresses to get .htaccess 301 redirects, and optionally force HTTPS and www or non-www.
Frequently asked questions
301 or 302?
301 is permanent: search engines move the old page’s ranking to the new address and browsers remember it. Use 302 only for temporary moves, such as a short campaign.
Where does the file go?
In the web root of an Apache server (or LiteSpeed, which reads .htaccess too), named exactly .htaccess. Nginx does not use .htaccess; the same rules must go into its server configuration.
Will it break my WordPress rules?
Put these lines above the “# BEGIN WordPress” block, never inside it: WordPress rewrites that block when permalinks are saved.