Skip to content
Guide

How to fix 404 errors (and when to use 410 or 301)

A 404 means the server looked for the page and could not find it. The link was wrong, the page was deleted, or the URL changed without anyone setting up a forward. The visitor gets an error instead of the content they came for.

Not every 404 is a problem to solve. Some pages should be gone, and a 404 is the honest answer for them. The skill is telling apart the 404s that are quietly costing you traffic from the ones that are working as intended, and then picking the right fix for each. Sometimes that is a redirect, sometimes a 410, and sometimes nothing at all.

Find the 404s that matter

Start by finding out which URLs are returning 404 and, just as important, how people are reaching them. A 404 that gets hit hundreds of times a month from internal links or live backlinks is urgent. One that nobody links to and nobody visits can usually wait, or be left alone.

Pull 404s from a few places: your site crawler, your server logs, and your search console reports. Crawlers catch broken internal links, logs show what real visitors and bots are requesting, and search console flags URLs that search engines tried to crawl and could not reach. Together they tell you both what is broken and whether anyone cares.

Watch out for soft 404s

A soft 404 is a page that shows an error or has no real content but returns a 200 OK status instead of a true 404. To a visitor it looks like a dead end; to a search engine it looks like a real page, so the empty URL can stay indexed and eat crawl budget.

These hide in custom error handlers and single-page apps that render an 'oops, not found' message without ever changing the HTTP status. Test a known-missing URL and check the actual status code it returns. If a missing page answers 200, fix the server or app so it returns a genuine 404 or 410.

When to redirect with a 301

Redirect a 404 when the content still exists somewhere or has a clear, relevant replacement. Use a 301 so the move is treated as permanent and any ranking value the old URL earned carries across to the new one.

  • The page moved to a new URL: 301 to the new location.
  • The page was replaced by a newer, closely matching version: 301 to the replacement.
  • An old URL still pulls traffic or backlinks: 301 it to the most relevant live page.

When to use a 410 instead

A 410 Gone is the right call when a page is genuinely finished and you have no intention of bringing it back. It says the same thing as a 404, that the page is not here, but adds that the absence is deliberate and permanent. Search engines act on that and drop 410 URLs from the index faster than 404s.

Reach for 410 with discontinued products, expired listings, or thin pages you deleted to clean up the site. The thing to avoid is redirecting these to your homepage out of habit. A pile of unrelated pages all 301-ing to the homepage looks like a soft 404 to search engines and helps nobody. If there is no relevant destination, let the page 410.

When a plain 404 is fine

Sometimes the correct fix is no fix. A URL that was never valid, a random string someone typed, or a long-dead page with no traffic and no links can simply return 404. Search engines expect 404s and handle them without penalty.

What you should still do is make the 404 page itself useful. A good 404 page keeps your site's header and navigation, explains that the page is missing, and offers a search box or links to popular sections so a lost visitor can find their way somewhere real instead of bouncing.

Verify and keep an eye out

After each fix, confirm it worked by checking the URL's actual status code. A page you redirected should return a 301 that lands on a live 200 page, and a page you retired should return 410. Do not trust that the change took without looking.

New 404s appear constantly as content changes and external links rot, so make the check a habit rather than a one-off. Re-crawl on a schedule, watch your logs, and monitor the URLs that matter most so a broken important page becomes an alert rather than a surprise.

Frequently asked questions

Are 404 errors bad for SEO?
Not inherently. Search engines expect 404s and handle them fine in small numbers. The problem is valuable pages returning 404 by accident, which loses their rankings and link value, and broken internal links that waste crawl budget. Fix those; let genuinely dead URLs 404.
Should I redirect every 404 to my homepage?
No. Redirecting unrelated missing pages to the homepage looks like a soft 404 to search engines and frustrates visitors. Only redirect a 404 when there is a relevant replacement, and use a 301. If there is no good destination, let the page return 404 or 410.
When should I use a 410 instead of a 404?
Use a 410 when a page is removed on purpose and will not return, such as a discontinued product or expired listing. A 410 tells search engines the removal is permanent, and they drop those URLs from the index faster than 404s.
How do I find soft 404s on my site?
Request a URL you know is missing and check the status code it returns. If a missing page answers 200 OK instead of 404, it is a soft 404. Search console also flags soft 404s it detects. Fix the server or app so missing pages return a real 404 or 410.

Related tools

Related guides

Check it with Sitewell

Put this guide to work on your own site

Sitewell’s free tools run the exact checks covered above — no signup, results in seconds.