Step-by-Step Fix

How to Fix 404 Errors
on Your Website — the right way

I've audited a lot of websites over the years. And the one thing that surprises people most? How many 404 errors they're sitting on without even knowing. This guide walks you through finding every single one — and fixing them properly, not just papering over the problem.

April 22, 2026
10 min read
Technical SEO · How-To
S
Sarah Mitchell
Technical SEO Lead at BrokenLinkChecker.org — 9 years auditing websites of every shape and size.

What exactly is a 404 error?

A 404 error means one thing: the URL was requested, the server understood the request, and responded with "there's nothing here." The page doesn't exist.

It's different from a server crash (that's a 500 error) or a permissions issue (403). With a 404, the server is perfectly healthy — it just can't find what was asked for at that specific address.

The number comes from the HTTP protocol. When your browser requests a page, the server responds with a three-digit status code. 200 means success. 404 means not found. The "4" at the front tells you the problem is on the client side — in other words, the URL being requested is wrong or doesn't exist.

Soft 404s — the sneaky kind
A "soft 404" is when a page returns HTTP 200 OK but its content essentially says "page not found." CMS platforms do this a lot — the server reports success but shows a "we couldn't find that" message. Google still counts these against you.

Why 404s actually matter — and it's not just SEO

Yes, 404 errors hurt your SEO. But I want to talk about the part that often gets skipped: the real-world cost to your business.

Think about it from a visitor's perspective. They click a link — from Google, from a social post, from an email newsletter — and land on a dead page. What do they do? Most of them leave. They don't hunt around your site hoping to find what they came for. They're gone.

"Every 404 page is a door that got locked after someone already had directions to it. The visitor followed the directions correctly — you just forgot to leave the door open."

On the SEO side, here's what's actually happening with Google. Every time Googlebot crawls a 404 on your site, it wastes a portion of your crawl budget — the finite amount of crawling Google allocates to your site. It also stops passing PageRank through that link. And if Googlebot finds too many dead ends, it can start crawling your site less frequently, which means new content takes longer to get indexed.

For e-commerce sites this is especially brutal. A deleted product page that's still linked from your navigation or sitemap is actively killing sales every single day it's left unfixed.

Step 1 — Find all your 404 errors

You can't fix what you haven't found. There are a few ways to do this, and I'll go through them in order of thoroughness.

The fastest way: use a link checker

The most complete method is running your site through an automated crawler. This is exactly what BrokenLinkChecker.org does — it visits every page on your site, follows every link it finds, and tells you exactly which ones return 404 (and other errors).

Run a scan, filter the results to show only 404s, and you'll have your complete list in minutes. For most sites under 500 pages, this takes under 10 minutes.

Export to CSV. Once your scan finishes, download the CSV export. This gives you a spreadsheet you can sort, filter, and share with a developer — much easier than working from a web dashboard when you have dozens of fixes to make.

Google Search Console

Go to Coverage → Excluded and look for "Not found (404)" in the list. GSC shows 404s that Googlebot has already encountered. The advantage here is that these are definitely the ones Google knows about. The downside is it's not real-time — it can take days or weeks for GSC to catch up with 404s that appeared recently.

Server logs

If you have access to your server's access logs, you can grep for 404 responses directly. This is the most raw, complete picture — every 404 request that hit your server, including from bots, scanners, and real users. It requires a bit of technical comfort but gives you data that no external tool can match.

bash — server log grep
# Apache — list the 50 most-requested 404 URLs
grep ' 404 ' /var/log/apache2/access.log \
  | awk '{print $7}' \
  | sort | uniq -c | sort -rn \
  | head -50

# Nginx equivalent
grep ' 404 ' /var/log/nginx/access.log \
  | awk '{print $7}' \
  | sort | uniq -c | sort -rn \
  | head -50

Step 2 — Fix with a 301 redirect (the most important fix)

For most 404 errors, a 301 permanent redirect is the right fix. It tells browsers and search engines: "This URL has permanently moved — go here instead." Google follows 301 redirects and passes nearly all of the original page's PageRank to the destination.

This is especially important when:

In your .htaccess file (Apache)

.htaccess
# Single page redirect
Redirect 301 /old-page-url /new-page-url

# Redirect an entire old directory
RedirectMatch 301 ^/old-blog/(.*) /blog/$1

In nginx.conf (Nginx)

nginx.conf
location = /old-page-url {
    return 301 /new-page-url;
}

# Or for pattern matching
rewrite ^/old-blog/(.*)$ /blog/$1 permanent;
Don't redirect everything to your homepage
This is a really common mistake. Sending all 404 URLs to your homepage looks like a fix in GSC, but Google sees through it — it's treated as a soft 404 and the PageRank is still wasted. Always redirect to the most relevant equivalent page, not a catch-all.

Step 3 — Update the link directly (for internal 404s)

If the 404 is caused by an internal link on your own site pointing to the wrong URL, the cleanest fix is simply editing that link. No redirect needed — just correct the typo or update the href to the right address.

This is the right fix when you control both ends: the page with the link and the destination page. It avoids adding unnecessary redirects to your server and gives a faster, cleaner experience for visitors and search bots.

❌ Before (broken)
<a href="/produts/blue-widget">
Blue Widget
</a>
✓ After (fixed)
<a href="/products/blue-widget">
Blue Widget
</a>

When working through your broken link report, look at the "source page" column — that tells you exactly which page on your site contains the bad link. Open that page in your CMS, find the link, and update it. Our link checker's source viewer highlights the exact line in the HTML so you don't have to hunt.

Step 4 — Restore, repurpose, or remove the page

Sometimes the right call isn't a redirect — it's dealing with the destination page itself.

Restore the page

If a page was deleted by accident, or if it still has value and was removed prematurely, simply restore it. If the page had external backlinks pointing to it, this is always the best option — you recover all that link equity without any redirect chain.

Repurpose it as a related page

If the original content is gone but you have something similar, redirect to the closest equivalent. For example, if a specific product was discontinued, redirect to that product category. Visitors still find something useful, and SEO value isn't completely lost.

Remove the link

If the linked content is genuinely gone with no equivalent, and there are no significant backlinks pointing to it, just delete the link from your page. A missing link is better than a visible link that leads to a dead end.

SituationBest fix
Page moved to a new URL301 redirect from old URL to new URL
Typo in the link's hrefEdit the link directly in your CMS
Page deleted but content exists elsewhere301 redirect to the closest equivalent page
Page deleted, has external backlinksRestore the page OR 301 redirect to most relevant page
Page deleted, no backlinks, no equivalentRemove the internal link entirely
External site went offlineFind a new source and update the link, or remove it

Step 5 — Set up a genuinely helpful custom 404 page

Here's something a lot of people forget: even after fixing your known 404s, you'll always get some. People mistype URLs. Links go stale. It happens. So having a good custom 404 page is not optional — it's your last line of defence.

A helpful 404 page should do a few things. It should acknowledge the problem plainly, without being overly apologetic or cutesy about it. It should give the visitor somewhere useful to go — a search bar, links to popular pages, or a link to your homepage. And it should be on-brand, so it doesn't feel like the site just broke.

What a good 404 page includes
A clear "page not found" message · A search bar · Links to your most important pages (homepage, categories, contact) · Your site's full navigation header · Optionally, a short human message ("Looks like this page moved. Try searching above.")

One important technical note: your custom 404 page must return an actual HTTP 404 status code. If your server returns 200 with a "not found" message on it, Google treats this as a soft 404 — and your nice-looking error page won't prevent the SEO problem.

Fixing 404s in WordPress specifically

WordPress deserves its own section because it's by far the most common platform I see 404 issues on — and it has a few quirks.

The permalink settings fix

A surprisingly large number of WordPress 404s are caused by a corrupted or misconfigured .htaccess file. Before doing anything else, try this: go to Settings → Permalinks in your WordPress admin and click Save Changes without changing anything. This regenerates the .htaccess file and clears many permalink-related 404s in one go.

Use Redirection plugin for easy 301s

The free Redirection plugin by John Godley is the standard tool for managing redirects in WordPress without touching server config files. It has a clean interface, logs 404s automatically, and lets you set up redirects in seconds. Install it, and you've got a redirect manager that even non-developers can use confidently.

After changing your permalink structure

If you ever switch your WordPress permalink structure — say, from /?p=123 to /post-name/ — every single URL on your site changes. Set up wildcard redirects using the Redirection plugin or a regex rule in .htaccess to map the old patterns to the new ones. Don't skip this step.

WooCommerce tip: When a product is deleted in WooCommerce, it leaves behind a 404 at the old product URL. Either set up a redirect to the category page, or use a plugin that handles this automatically on deletion.

How to stop new 404s from appearing

Once you've done the cleanup work, the goal shifts to prevention. Most 404 errors are avoidable — they're the result of skipped steps during content management. Build these habits and you'll dramatically reduce how many appear over time.

1
Always redirect before deleting a page
Before you delete any page, check if it has inbound links (use your broken link checker or Google Search Console). If it does — or if it's been live for more than a few weeks — set up a redirect first, then delete. This takes 60 seconds and prevents a cascade of 404s.
2
Run a scan after every major site change
Migrations, redesigns, plugin updates, theme changes — all of these can silently break links. Run a full scan the day after any significant update. Catching 10 new 404s the next day is far better than discovering 200 of them three months later after they've damaged your rankings.
3
Keep a redirect log
Maintain a simple spreadsheet of every redirect you've set up. Old URL → New URL → Date → Reason. When you next migrate platforms or change servers, this list is invaluable — you'll know exactly which redirects need to carry over, and you won't accidentally undo months of work.
4
Schedule a monthly link audit
External links can break at any time — a site you linked to three years ago may have moved or closed down yesterday. A monthly scan takes a few minutes and keeps your link health clean on a rolling basis. Put it in your calendar like any other maintenance task.

Your 404 fix checklist

Use this as a quick-reference every time you do a link audit:

Ready to find your 404s right now?
Run a free scan on your site — up to 2,000 pages, no account needed. You'll have your complete broken link report in a few minutes, with every 404, redirect, and missing image listed clearly. Start your free scan →