Monitor 404 Errors and Setup 301 Redirects in WordPress
404 is a HTTP status code returned by a server when the requested URL is not found. This is very common especially on bigger sites due to various reasons. In this article we will explore the reasons for 404, why you should correct it and how to monitor 404 page not found errors in WordPress site.
Reasons for 404 Error Page
There are many reasons for the server to return 404 status code.
- The requested URL of the page or image is changed to a new URL.
- The requested URL is permanently moved to another domain or directory.
- The structure of the URL is changed due to change in hosting platform.
- The site is migrated from one platform to another platform.
Especially for the larger sites having multiple editors modifying the content, there are many possible scenarios resulting in 404 errors. Also during migrating from one platform to another platform you may need to change the URL structure say from .html to no extension or .php.
Why Should You Correct 404 Error?
As every visit to a site is an opportunity for site owners to showcase the content and probably sell something, merely displaying a 404 page will increase the cost of serving a webpage. Site owners should correct the 404 errors for the following reasons:
- Users landing on 404 page may be disappointed since they are not getting what was expected. This will drag the user’s confidence on the site owner’s ability to maintain the site and may not trust the purchasing activities on the site.
- Most of the hosting companies charge for page views which includes serving 404 pages to users.
Now you must have got the point!!! 404 pages not only going to hurt the user’s experience but also cost you for serving an error page.
How to Monitor 404 Errors on WordPress Site?
There are many ways to monitor the serving of 404 error pages.
Using Webmaster Tools Account
Register for webmaster tools account with Bing or search console account with Google to monitor all crawling errors on your site. Though this is the easiest way to monitor the errors it does not have an option to set redirection for those not found pages. For example, the Google Search Console account shows all crawl errors and the indicate the HTTP status code under the response code column.
If it is a 404 response code you need to check the URL and setup appropriate 301 redirect then “Mark as Fixed” button to remove them from the list.
Using Server Error Log File
Your hosting server will log all types of errors including 404 not found errors. By looking into the server log one can find out the 404 errors but it will only be a technical information without the option to fix it on the spot.
Using Third Party Services
There are lots o third parties offer services on finding 404 errors on your site for free. For example, free online tools like broken link check offers easy way to find the broken links on your site which is very difficult to find.
The last option is to use WordPress plugins without the need of looking for outside tools. Even there is a broken link checker offered as a free plugin which can be used to monitor the broken links on your WordPress site which results in 404 error page.
How to Correct 404 Error Pages?
Basically when the URL is changed the correct way is to setup a 301 redirect to point the old URL to new URL. Since search engines take long time to replace the URLs on search results, setting up 301 redirects help the crawlers to index the content on the redirected page. This will also help users landing on your site from external links and bookmarks to land on correct page having required information. Based on our experience we recommend using Redirection plugin for this purpose.
Install Redirection plugin from the WordPress repository, activate the plugin and there will be a new admin menu added under “Tools > Redirection”. This plugin helps in the following scenarios:
- When the post title is changed, the plugin will automatically setup a 301 redirect thus avoiding 404 errors proactively.
- You can monitor 404 errors using the plugin and convert them into 301 redirects seamlessly.
Under “404s” section you can monitor all recent 404 errors encountered on your site and click on the “Add Redirect” link to setup 301 redirect for that 404 page.
The reason for recommending this plugin is simple that you can not only monitor 404 errors but also setup 301 redirects easily on the spot.