Many of us get tired of visiting sites and stumbling upon the dreaded "404 Error: Page Not Found" notice. Google feels the same way and this broken link can lead to a downgrading of your search ranking.
These 404-page errors can be avoided by setting up redirects.
Setting up a redirect
Not sure what is a redirect and if you need one? Take a look at a broken link checker to determine how guilt your website is.
If you have a few, don't worry. It's a simple task to set up redirect links right in your WordPress admin. When you set up a redirect, you can specify for those trying to visit a page from an old URL how to redirect to the new URL. It's as simple as that.
Let’s get started.
Why do this in WordPress?
Redirects are a way for your website to tell the visitor's browser that the page they want to visit has been moved. The browser then automatically "redirects" them to the new page your specified in the code.
There are different types of redirects such as 301 redirect, 302 redirect, 307 redirect, etc.
However, you likely only need 301 redirects, as that’s the most common and achieves what we are exploring in this post.
To use a plugin in WordPress allows you to easily create the redirects as well as update them over time. Many plugins will even allow you to see the stats of how many times the redirection is occurring which gives you insight into adjusting areas of your website.
What types of 301 redirects would you create?
You need to create a redirect when:
- you delete a post or page in favor of new content
- you change the permalinks of your post or page
- you deploy a new website and the URLs change
Installing and Using a Plugin
We really like using the free plugin Redirection to accomplish setting up redirects in WordPress.
Adding it through the admin is the simplest way to manage redirects over time.
Once you have activated the plugin, visit Tools » Redirection to setup your redirects.
A bonus of the Redirection plugin is that it also allows you to find those pesky 404 errors with their tool.
Once you've narrowed them down, also try to discover if other websites are linking to incorrect URLs to your website and either have them update the link or setup the redirect.