Skip to content

Monitoring

404 detection

Spots robots that request page after page that does not exist, the typical sign of a vulnerability scanner, and can ban them automatically.

What it does

Every "page not found" is logged with the address that asked for it. When one address hits too many missing pages in a short time, Stack Guard bans it for the time you choose.

The panel shows today's numbers, how many requests looked like vulnerability probes, and the addresses with the most misses.

Why it matters

Scanners try hundreds of known weak files, like old plugin paths and backup files, to find a way in. Banning them after the first few misses stops the search early.

Set it up

  1. Go to the Monitoring tab, section 404 detection, and switch on 404 Detection.
  2. Keep the 404 threshold at 20 and the Time window at 5 minutes to start.
  3. Leave Automatically ban IPs exceeding the threshold on and choose a Ban duration, for example 24 hours.
  4. Set Log retention and click Save Changes.

Good to know

A site with many broken links can make real visitors hit the threshold. If you see real people banned, raise the threshold and fix the links.

With auto-ban off, misses are only logged, which is a safe way to watch first.

Bans appear in the Firewall tab's ban list, where you can lift them. Allow-listed addresses are never counted.

Which plan includes it

404 detection is part of Pro.

How it works, for developers
  • Misses are stored in the smg_404_log table (address, page, user agent, referring page, time). Old rows are removed daily by smg_cleanup_404_logs.
  • A ban goes through the firewall ban list (smg_bans), fires smg_404_threshold_exceeded and is written to the activity log as 404_auto_ban.
  • Settings and ranges: smg_404_detection, smg_404_threshold (5 to 100), smg_404_window (1 to 60 minutes), smg_404_auto_ban, smg_404_ban_duration (1 to 720 hours), smg_404_log_retention (1 to 90 days).

Quick answers about 404 detection

What does 404 detection do in Stack Guard?

Every "page not found" is logged with the address that asked for it. When one address hits too many missing pages in a short time, Stack Guard bans it for the time you choose. The panel shows today's numbers, how many requests looked like vulnerability probes, and the addresses with the most misses.

Why use 404 detection on a WordPress site?

Scanners try hundreds of known weak files, like old plugin paths and backup files, to find a way in. Banning them after the first few misses stops the search early.

How do I set up 404 detection?

1. Go to the Monitoring tab, section 404 detection, and switch on 404 Detection. 2. Keep the 404 threshold at 20 and the Time window at 5 minutes to start. 3. Leave Automatically ban IPs exceeding the threshold on and choose a Ban duration, for example 24 hours. 4. Set Log retention and click Save Changes.

Which Stack Guard plan includes 404 detection?

404 detection is part of Pro.

More in Monitoring

Not running Stack Guard yet? It is free.

Download Free