Blog

Smart 404: the Drupal module I install on every site

I built Smart 404 to find 404s before a visitor happens to report one.

Here's what the module does and when you need it.


Header met de tekst Smart 404 kapotte links opsporen

A visitor clicks an old link and gets an error page.
You only find out if someone happens to mention it, or never.

Smart 404 is a Drupal module I wrote myself and now install on every site I manage.
It logs every 404 automatically and lets you set up a redirect in a few clicks, without server logs or the command line.

Why I built Smart 404

A 404 appears the moment someone renames a page, migrates a site or restructures its content.
It often takes months before anyone notices, and even then only if that person happens to dig through server logs or keeps an analytics tool open.

I didn't want to work that out separately for every client any more.
So I built Smart 404: a module that shows what's broken right inside the Drupal admin, without me having to log in anywhere else.

Persoon kijkt verbaasd naar een scherm met een verbroken schakel

What I see in practice:

  • After a migration: dozens of old paths that no longer exist, scattered across the whole domain.
  • After a restructure: a menu that changes, while old links elsewhere stay as they were.
  • From other sites: an external site links to a page you've since moved.

What the module does

A few things I consider important myself:

  • No IP addresses: no IP address is ever stored, only the path and a bot indicator.
  • Ignore list: exclude paths such as /wp-admin or .php with a pattern, so scan attempts don't clutter the list.
  • Automatic cleanup: old records disappear by themselves after a set retention period.

When you need this

You usually only recognise the moment once it's already been going wrong for a while.

About to migrate to a new site or a new CMS?
That's exactly the scenario where old links break on a large scale.
Restructuring the content of an existing site causes the same thing on a smaller scale.

And if you notice that your site isn't found as well as it used to be, a pile-up of broken links is often part of the explanation.

Persoon draagt een doos over stapstenen naar een nieuwe plek

Why a broken link is also an SEO problem

A broken link isn't just annoying for a visitor.
Search engines follow links too, and a path that keeps returning an error eventually loses the value attached to it.
If that link comes from another site, you even lose part of the external authority you could have kept with a redirect.

That's also what my SEO and GEO audit looks at: not just content and technology, but also which paths are broken internally and externally.

Requirements and installation

Smart 404 is listed as a contrib module on the project page on drupal.org and requires Drupal 10.3, Drupal 11 or Drupal 12, with PHP 8.1 or higher.
The Redirect module comes along automatically through Composer: Smart 404 doesn't build its own separate redirect system.

Status on 14 November 2026: the current version is 1.2, which adds, among other things, extra protection against misuse of the bulk actions.

Don't manage your own Drupal site, or would you rather have this done for you? I install and configure the module as part of maintenance and support or as part of a technical SEO assignment.

Smart 404 is one of the modules I share as open source, alongside Connector Hub.

Suspect there are broken links lurking somewhere on your own site, or want Smart 404 installed?
Send your question through the contact form, and I'll get back to you within 24 hours.

Frequently asked questions

What exactly is a 404 error?

A 404 is the error a browser gets when a requested page doesn't exist.
That happens after renaming or deleting a page, after a migration, or when someone uses an outdated link.

How does Smart 404 differ from the Redirect module?

The Redirect module fixes a 404 once you already know which path is broken.
Smart 404 helps you discover that problem in the first place: it logs every error and shows you where to step in, before you'd have noticed yourself.
Both modules work together: Smart 404 requires the Redirect module and uses it to actually create the redirect.

Does Smart 404 store personal data?

No.
No IP address is ever stored, and a user agent is immediately reduced to a label such as bot or browser, without keeping the raw string.
An external referring site is stored only as a domain name, not as a full URL.

Does this also work on a multilingual site?

Yes.
A path with a language prefix, such as /nl/over-ons or /en/about-us, is logged and handled separately.
When creating a redirect, the module detects the language and applies it to the new redirect.

Question about 404s or redirects on your site?

Describe your situation briefly, and I'll let you know what's involved.

Privacy policy
You can read how I handle your data in the privacy policy.

More to read