Vai al contenuto

A report that lists the broken storefront addresses, with the redirect ready in the same row

Reports > 404 Errors collects every address that answers 404 with hits, first and last visit and referer, and each row opens a rewrite already filled with the store view, the path and a 301.

A store changes a URL, an old link keeps arriving from a forum or from a campaign three years old, and the visitor lands on a blank page. Nobody notices, because a 404 leaves no trace where people usually look. Pull request #1834 gives those requests somewhere to land.

What it adds

A new report, Reports > 404 Errors, right after the search terms. It lists every storefront address that answered “404 Not Found” with the number of hits, the first and last time it was seen and the last referer. Bots count like everybody else, because a broken link that search engines keep asking for is a problem even when no human opens it.

The 404 Errors report with five addresses and a Redirect link in each row

The part that saves time is the Redirect link in each row: it opens a new custom rewrite already filled with the store view, the path and the 301 option, so only the destination is left to type.

The custom URL rewrite form with the store view, the path and the 301 already filled in

The report does not lean on the visitor log, which at the default level writes nothing and skips bots anyway: it has a table of its own, one row per path and store view, with a counter that grows on every hit, so it grows with the number of broken links and not with the traffic.

Why it matters

Whoever runs a store that comes from Magento 1 or from an older site knows that URLs change and that external links do not follow. Knowing which addresses answer 404, where the visitors come from and for how long turns guesswork into a list to work through: open the address with the most hits, create the redirect from the same row, move to the next one.

The report also shows Redirects To, that is the destination, but only when the rewrite the storefront really uses redirects. A disabled product that keeps a rewrite which does not redirect appears without a destination, and that is correct: its page answers 404.

What it needs

  • The settings are in System > Configuration > General > Reports > 404 Errors: the Record 404 Errors switch, the budget per visitor per hour (100 by default), how long the rows not seen again are kept (30 days) and the size limit of the table (10,000 rows), which an hourly cron applies.
  • The report starts with the upgrade: the earlier broken addresses are not there, because nobody had recorded them.
  • One redirect per path and store view: when the store view already has a rewrite for that path, the row shows no link, because two rewrites with the same request path cannot be saved.

What can still change

The pull request is merged but not in a release, and these are the limits it declares. A 404 that the web server answers by itself, a missing image, CSS or JS file, never reaches Maho, so the report cannot see it. The rows keep the path the way the rewrite lookup reads it, that is lower case, without the trailing slashes and without the query string: that is what keeps utm_* parameters from multiplying the rows and what makes the generated redirect match the request. The report skips the admin, the api/ path, the .well-known/ folder, the 410 answers and the paths longer than 255 characters.

The same work carries three fixes that go beyond the report: a spreadsheet reads a cell starting with @ as a formula, so the CSV export now protects it as it already did with =, + and -; the CSV import no longer keeps the space the export puts before those values; and the rewrite lookup now always prefers the rewrite of the store view over the one of store 0 for the same path, where before it depended on the order the database answered in.

Status

The snapshot is from 21 November 2026. The pull request was merged on 15 November and is not in a release yet: whoever wants to try it finds it in the repository documentation, and whoever waits for a version finds it in the next patch or the next release, when they come out.

Text prepared with the help of AI and checked against the source before publication. It can still contain mistakes: if you find one, report it.Read the manifesto

Source: MahoCommerce/maho#1834

Does your store still sell?

Tell us where you are starting from: we reply with a first assessment, no strings attached.

Ask for the store assessment