1. Install and activate
The plugin is in the official WordPress.org directory. In the WordPress dashboard go to Plugins → Add new, search for «Lobbit 404 Monitor», press «Install now» and then «Activate»: the «404 Monitor» item appears in the menu, the log starts straight away and updates arrive from the dashboard as with any other plugin.
Alternatively, download the zip from the plugin page on WordPress.org and upload it from Plugins → Add new → Upload plugin. The plugin is written in English and the Italian translation comes from translate.wordpress.org.
Plugin page on WordPress.org
2. Start from internal links
In the 404 pages tab, look at the internal links first: they are broken links on your pages. Open the address, read «Where the broken link is» and fix the link on the page shown with «Edit». If the same address comes from many pages, the link is in the menu or in the footer.
3. Redirect the old addresses
For addresses that come from Google, from other sites or from crawlers, choose the page that took the place of the old one and save a 301 redirect: Google moves the address and anyone following the old link finds the right page. The home page is the quick solution, when there is no replacement page.
4. Set aside what you don't need
An address not worth fixing can be ignored: it leaves the To fix view and stays in Ignored. Suspicious scans are only counted; addresses you don't want to record, such as /favicon.ico, go in the Settings.
5. Check back again
Open the tab again now and then: the totals for the last 7 or 30 days tell you whether 404s are falling, and the Redirect tab how many visits each redirect has recovered.
PHP: another domain of the same site counts as an internal link
add_filter( 'lobbit_404_site_hosts', function ( $hosts ) {
$hosts[] = 'shop.example.com';
return $hosts;
} );
PHP: if you use another cache, clear the copy of the address when you save a redirect
add_action( 'lobbit_404_purge_url', function ( $url ) {
// $url is the full address, like https://example.com/old-page
my_cache_purge_url( $url );
} );
PHP: changing the source of a visit
add_filter( 'lobbit_404_classify', function ( $result, $request ) {
// The uptime monitor counts as a crawler.
if ( str_contains( $request['user_agent'], 'UptimeRobot' ) ) {
$result = array(
'source' => 'crawler',
'detail' => 'UptimeRobot',
);
}
return $result;
}, 10, 2 );
The sources are internal, search, external, crawler, direct and scan. The lobbit_404_redirect_saved action fires on every saved redirect, with address, destination and code.