The redirect generator writes .htaccess rules for Apache and LiteSpeed servers: force HTTPS, choose www or non www, and add 301 redirects for moved pages.
Copy the code and paste it at the top of your .htaccess file.
How to use it
- Choose HTTPS and www options.
- Add old and new paths, one pair per line.
- Copy the code into your .htaccess file and save.
Before you paste
- Make a backup of your current .htaccess file.
- Paste the rules above the WordPress block.
- Test the old URLs with our redirect checker afterwards.
Tip
If your site uses Nginx, these rules will not work. Ask your host to add the same redirects in the Nginx config.
Questions
Can a mistake break my site?
Yes, a wrong rule can cause an error. Keep the backup so you can undo quickly.
301 or 302?
Use 301 for permanent moves. It passes link value to the new page.
Do I need both HTTPS and www rules?
Use both if you want one single version of every URL, which is best for SEO.