Links can be broken for a number of reasons. A 404 page error can be the result of:
- A typo that leads to the wrong page
- A page that doesn’t currently exist
- A page that was removed or transferred to another link
Though smart marketers and web masters create fun and high-converting 404 pages, a “page not found” error is truly not the ideal spot for a visitor to land. Besides a bad user experience, broken links can have negative implications from an SEO perspective.
When a search engine crawls your website and has trouble finding pages that are supposed to be there, it makes note of these negative results, and your search engine standing is affected. As a rule, broken links should be avoided whenever possible, with a compelling 404 page ready to go as a backup for a worst case scenario.
One major tactic for avoiding the possibility of a broken link is by creating redirects for pages with URLs that have changed over time, and potentially also for common misspellings of your company’s most important landing pages. Here’s all you need to know about redirects, and how to implement them in WordPress.
What Is a Redirect?
A redirect occurs when a page is published with one specific URL, then moves to a new URL. The redirect ensures that even though that page’s online home has changed, anyone using the old URL to access it will still end up in the right place. A redirect provides a seamless user experience, as the visitor is automatically rerouted to the new location of a specific page, instead of getting an error and landing on a 404 page. Not having access to the content they were hoping for is an excellent way to turn off a searcher and potential customer.
Besides fixing some of the broken link scenarios listed above, redirects are often used when a website moves to a new hosting company, or when a website goes through a domain name change.
One of the best features of using WordPress redirects to make sure that people get to the right page is the fact that they don’t necessarily even need to know it’s happening – their browser redirects them automatically.
Different Types of Redirects
There are a number of different types of redirects. Here’s what each one refers to, According to Search Engine People:
- 301 redirect: The page has been permanently deleted. This redirect allows you to specify the next most related page to send people to, or a new version of the page.
- 302 redirect: The page has been temporarily redirected, perhaps because it’s being updated.
- 303 redirect: This redirect was created to prevent bookmarking and refreshing of pages that hold one-time only data, like online transactions.
- 307 redirect: Very similar to the above.
- 308 redirect: A 307 with a permanent status.
The 301 redirect is the most known, and widely used. The remainder of this article will focus specifically on this type of redirect.
When to Use a 301 Redirect
The 301 redirect gets its name from the HTTP response status code 301, which informs search engines that a page has been permanently moved to a new URL. From an SEO perspective, it guarantees that you’ll still keep any built up PageRank, associated traffic, and other related search engine information, even after the link URL changes.
You’ll want to create a redirect when:
- Planning to delete a post or page. You can use a redirect to point the visitor to another (related) location or to a new post.
- Changing the permalinks of a post or page.
The following represent different ways to create a WordPress redirect.
One of the fastest working types of WordPress redirect is through a web server configuration file .htaccess. As far as WordPress redirects are concerned, this method is one of the more technical and complicated, and should, therefore, be handled with a lot of care.
For the inexperienced backend WordPress developer, messing with the .htaccess file and causing even one one small mistake with your code could cause your website to be totally inaccessible. If you think you know what you’re doing, it’s still a good practice to create a backup of the file, or a WordPress staging site before attempting to make any changes.
Creating a 301 Redirect using the WordPress .htaccess file:
- Connect to your WordPress installation using an FTP client.
- Locate the .htaccess file, at the root directory of your WordPress site. Note that if you can’t locate the file, it’s hidden and you’ll need to force the FTP to show your hidden files.
- To edit the .htaccess file, use Notepad or any plain text editor.
- Specify the old location and the new location of a URL.
Sample redirect code:
Redirect 301 /old-page-here.html http://www.yournewwebsite.com/new-page-here.html
- If you need to redirect the whole website, use this sample code:
Redirect 301 / http://www.yournewwebsitehere.com
As a best practice, add the code at the end of the .htaccess file. You can check that the WordPress redirect is working by saving the file and reloading the page you are trying to redirect.
Using WordPress Redirect Plugins
A much simpler way of creating redirects is by using WordPress redirect plugins. These WordPress plugins make it easy to create redirects without needing to use an FTP to access the backend, and in most cases, no coding knowledge is necessary to be successful.
With over 800,000 active users on WordPress, this plugin has been reviewed by users as the simplest way to add and manage redirects in WordPress. To use it, just install and activate the plugin, then go to Tools, then Redirection, and start setting up your redirects. As an added bonus, you can also use this WordPress redirects plugin to check your website for 404 page errors that need fixing.
This particular WordPress redirects plugin has over 200,000 active users on WordPress. Besides 301 redirects, It also allows you to perform 302 and 307 (meta refresh) redirects.
The plugin has two redirect functionalities – “Quick Redirects” and “Individual Redirects”. Quick Redirects are quick and simple to add. When using this feature, there’s no need to have an existing page or post set up in order to add one. All you have to do is enter in the Request URL and the Destination URL, then the plugin will redirect it.
Individual Redirects are for pages/posts that already exist. The plugin adds an option meta box to the edit screen where you can specify the redirect location and type.
As the name suggests, this WordPress redirect plugin is pretty straightforward. Simple 301 redirects is another easy to use WordPress plugin for creating 301 redirects. Like the aforementioned plugin, it is extensively used with over 200,000 active users on WordPress. To use, install and activate the plugin, then go to Settings, and 301 redirects. You’ll be instantly directed to start adding URLs you’d like to redirect.
Unfortunately, there’s a bit of a caveat when it comes to using this simple WordPress redirects plugin. While it’s true that it’s very easy to use, comparing this plugin to some of the others on this list, and the .htaccess method, there’s a lot to be desired in terms of fast page load. And if you’re keeping track, slow page load can have a large negative impact on your SEO and marketing efforts.
This plugin allows you to link a post or page to a URL of your choosing, instead of the original WordPress post or page URL. This can be useful if you want to setup navigational links to non-WordPress sections of your website or off-site resources.
How to Create WordPress Redirects to Avoid Broken Links
Using a plugin is one of the easiest ways to handle WordPress redirects, but consider manually creating redirects by carefully editing the .htaccess file if the use of plugins is affecting your page load.
Do you employ any other methods for handling WordPress redirects? If so, we’d love to hear what’s working for you! Tweet your thoughts at @Pagely, and we’ll share the best insights.