Monitor and redirect your 404 errors on WordPress

0

HTTP 404 error is a server error response when a link is not found on the site. A visitor then sees a page displaying that the “404 – Page not found” error. Most content management systems handle 404 errors in their own way. Most CMS just use a plain “not found” error page and do not provide a method to monitor 404 errors. WordPress has some cool plugins to get granular control with your site. One such tool is the 404 Solution, which monitors all the 404 requests on your domain. Here’s why we think you should consider using it.

Wordpress 404 monitor

Detect mistyped or dead links leading to your site

As your site grows, some links may not have a proper page. You may remove it, rename it or move it to another location. You might be able to fix links on your site to point in the right direction, but what about external links that don’t realize you have changed links to your content. 404 Solution plugin allows you to monitor hits statistics of request that generate a 404 response. So if you are getting many hits to an old page, you need to redirect it at a proper link to salvage some traffic.

Detect malicious request/Hack Attempts

Many CMS, plugins, and themes have exploits, and you see what automated requests are hitting your site. Watching the storm of such request encourages you to keep your installation up-to-date. While the positive hit on an exploit does not reveal themselves on a 404 Solution, it serves as a warning to take security more seriously.

Regex patterns for malicious file requests
Regex patterns for malicious file requests

You can also use regex to avoid queries of specific patterns. For example, many vulnerability testers try to request many links to perform a check for a known vulnerable file. They just run this through as many servers as they can to get a hit. The file formats can be different, depending on the page rendering software on the server. Most malicious queries come with additional query string parameters expecting to get a different HTTP response, which means the file exists and the site is vulnerable. You can avoid these entries overloading your list by using regex patterns.

Create your own redirects

404 Solutions main purpose is to detect and redirect to the appropriate page automatically, it is not “setup and forget” solution. While it can perform match to an extent, it is not perfect. You need to create redirects for errors the plugin isn’t able to resolve automatically.

Editing a 404 entry to redirect to home page
Editing a 404 entry to redirect to home page

Every 404 error is marked with a unique entry. You can then edit the said entry to direct them to a page, category or post of your choice. You are provided a list of posts, categories, pages, and tags in a drop-down box to redirect. Regex is used to match patterns in the field.

Make your own external short links

While the primary purpose of 404 Solution is to detect and send users to appropriate pages, you can also direct links to external sites. So you can add your own custom link that would cause a 404 error, but the 404 Solution recognizes your redirect entry and send users to clocked links.

Create your own shortlinks with affiliate links
Create your own shortlinks with 404 solution

You can use anything like your affiliate or referral links to keep them from revealing themselves. Moreover, you can also view statistics based on the hits the cloaked link receives.

 

Ignore entries

Many entries may be of no use. You can’t really redirect some request so why monitor them? For these entries, you can set them as ignored, and they stop showing up on the main statistics. Some entries may have specific patterns. These queries can build up on your 404 Solutions query list. One of them is an “amp_preconnect” link which isn’t an error on itself but is used by AMP for some reason. You can use regex to avoid it entirely.

Ignore unmanageable entries on 404 solutions
Ignore unmanageable entries

If you want to ignore a set of patterns on your site, you need to enter the regex pattern on the advanced setting page. However, be careful, regex can be dangerous and can stop cause problems if written incorrectly.

While this is a good practice to monitor your 404 requests, use it safely to reduce wasted traffic and benefit your website visitors.

Previous articleRunning Pi-hole on Raspberry Pi (aka PiHolePi)
Next article7 powerful use cases for Puffin Browser