This is a quick tutorial on how to make redirects in WordPress. We’ll dive into 4 different ways to do this, starting with the best and ending with the worst.
What is covered:
First: Backup
Before you do anything, make sure you backup your WordPress website so you can revert to the current version of your website should something go wrong. With that said, here we go:
Redirect Using Your Server Provider
This is the best way to do redirects in WordPress, as the server provider (Kinsta in my case) can optimize the way the redirects are executed, which leads to quicker redirects. Not all server providers will have this option, but the good ones should.
To get started in Kinsta, click on Redirects.
Next, click on Add redirect rule.
Then add the URL you want to redirect from and to, pick 301 as the status code and click on Add redirect rule. That’s it.
Make Redirect Using Your SEO Plugin
Most SEO plugins in WordPress do have a section Redirections. I use Rank Math SEO. There, you might have to activate this feature, but it’s there. The same should be true in YoastSEO, All In One SEO and others.
To get started in Rank Math SEO, click on Add New.
Then add the source URL and destination URL and click on Add Redirection.
You’ll then see the redirect show up and working.
WordPress Redirect Plugin
If the two options before don’t work, you can use a specialized WordPress redirection plugin. I would suggest you go for the plugin called Redirection with over 2 million installations. It has all features you need and has been around for a long time.
After successful installation and activation, click on Redirection setup.
If you can’t see the link, then go to Tools / Redirection. There click on Start Setup.
Make sure to tick the first two checkboxes. The first checkbox will make sure that an automatic redirect is created, when you change the permalink of a page or post. The second one will log all 404 errors so you see what links aren’t working. Click on Continue.
Next, if the REST API test is showing a green Good, click on Finish Setup.
Wait until the setup is complete and click Continue.
Click on Ready to begin!
Click on Add New.
Then add your source URL and target URL and click Add Redirect.
That’s it, your redirect is set up and should be working.
Redirect Using .htaccess
This, in theory, is the quickest way to execute redirects. However, this has the potential to crash your site badly if you don’t know what you’re doing. Furthermore, htaccess is only available on Apache servers, so your server might not even have that option. All in all, if you can avoid it, don’t touch .htaccess.