Whenever you update your WordPress website links or page URLs – search engines tend to keep the old information in their results until the search engine web crawler scans your website again.
Having old links that don’t redirect to your new ones can cause problems for your website’s SEO and obviously, over time, it really hurts your traffic.
That’s why you always want to make sure to redirect your old or missing pages to your new links to keep your traffic and SEO in good standing.
There are two ways to handle missing pages on your WordPress website:
- By implementing a basic 301 redirect
- By using a WordPress plugin to scan for all missing pages and implement a redirect
If you only have one or a couple of pages or links that aren’t working and showing a 404 error message, you can use a simple 301 redirect.
This will send traffic from your old links to your new ones.
To put in a 301 redirect, you need to insert the redirect in the .htaccess file on your website, in the following format:
Redirect 301 /old-page/ https://yourdomain.com/new-page/
*Make sure to replace yourdomain.com with your actual domain name.
Let’s use an About Us page as example:
https://yourdomain.com/about-us/ (the old old page URL)
https://yourdomain.com/about/ (the new page URL)
The 301 redirect you put in the .htaccess file:
Redirect 301 /about-us/ https://yourdomain.com/about/
This will automatically redirect https://yourdomain.com/about-us/ to https://yourdomain.com/about/ – which means your new URL takes the place of your old one.
Here’s an example of .htaccess code when viewed via a file manager in a web hosting control panel (we’re using cPanel in our example below):
You can also put in redirects using a plugin. We recommend using a Redirection plugin to scan and redirect all old links to new ones on your WordPress website.
It’s very straightforward and easy to use. It also automates the redirection process and lets you know which links are not working correctly.
Log in to your WordPress dashboard, and head to Plugins -> Add New. Type in Redirection in the search field and click the Install Now button to install the Redirection plugin:
Next, click the Activate button to enable it:
You will then see a notice at the top of the page that the Redirection plugin needs to be set up first, so click the Redirection setup link to move to the next step:
Next, the plugin will take you through a couple of simple setup steps. The first screen explains what a redirect is and how to set the plugin up:
Click the Start Setup button.
On the next page, tick the boxes that apply. We recommend enabling the monitoring of permalink changes so that the plugin can automatically set redirects. Additionally, have the plugin save the log of all 404 errors and redirects, so you can check them if needed.
Click the Continue Setup button to move to the next step.
Next, the plugin checks if the REST API is working correctly. Click the Finish Setup button.
The plugin will then configure itself, and once completed, click the Finished button.
Now, head to Tools -> Redirection to configure the redirect.
On the main (Redirects) screen, you’ll see a list of your current redirects, and you’ll be able to add a new redirect.
For example, if we want to redirect https://yourdomain.com/about-us/ (old) page to the https://yourdomain.com/about/ (new) page, we would configure it like this:
In addition, you can click the cogwheel icon to expand more options:
Click the Add Redirect button to save changes once ready.
It’s that easy!
The plugin has multiple functions, and you can find the menu with various options on the top of the page:
Here’s a quick rundown of available options:
Redirects – Shows all current redirects and allows you to add a new redirect.
Groups – Allows you to sort your redirects into groups for easier management and organization:
Site – These options are site-wide, which means they’ll affect the entire website. You can redirect the whole website to a new domain, from HTTP to HTTPS, add aliases, etc.
Logs – Shows all log entries, so you can check them if needed.
404 errors – Here, you’ll find the detected missing URLs on your website.
Import/Export – This option allows you to import or export a CSV, .htaccess (Apache) or JSON (Redirection) file. Additionally, you can export logs for current redirects and 404s.
Options – These are the plugin options where you can adjust various settings such as log retention and scanning features.
The Redirection plugin handles 301 and 404 redirects very well, it’s really your best friend when it comes to redirecting old URLs on your WordPress website to new ones.