404 vs 410 Errors – What They Mean and How to Fix Them (4XX)

Contents

Got a question about your site?

Book a short consultation – I will tell you where to start.

A 404 error (HTTP 404 Not Found) is an HTTP status code the server uses to say it found no content at the requested URL. A 410 (Gone) says more: the resource was removed deliberately and most likely for good. Google treats both codes almost the same way and drops such URLs from its index, and the advantage of 410 (slightly faster processing) is small in practice.

In this article I explain what the 4XX family of codes means and how to find 404 errors in Google Search Console, a crawler and server logs. I also cover when to use a 301 redirect, when a 410 and when it’s fine to just leave a 404. At the end you’ll find a table of the most common 4XX codes and answers to the questions I get asked most often.

What does a 404 code mean (HTTP 404 Not Found error)?

The 404 Not Found code means the server didn’t find a current representation for the requested URL, or isn’t willing to disclose that one exists. That’s how the current HTTP specification, RFC 9110, defines it. An important caveat: a 404 doesn’t say whether the absence is temporary or permanent. The server doesn’t tell you whether the page ever existed. All you know is that it isn’t there right now.

The most common causes of a 404 error are:

  • a typo in a URL typed by hand or in a link,
  • a page, product or post deleted without a redirect,
  • a changed URL (slug, category structure, site migration) without 301 redirects,
  • external links that pointed to a wrong URL from the start,
  • URLs ‘invented’ by bots, scripts or badly parsed JavaScript code.

Is a 404 a server error?

No. The phrase ‘404 server error’ is a common misunderstanding. 4XX codes are client errors. The server is working fine and understood the request – it just can’t fulfil it, because the resource doesn’t exist or the request is invalid. Server failures and overloads are covered by 5XX codes, e.g. 500 or 503 Service Unavailable. I describe them in my article on 5XX error codes. The difference matters to Google too: with a 503, Googlebot assumes a temporary problem and comes back later. With a 404, it concludes the content isn’t there.

You see a 404 error in your browser or after clicking a Google result – what should you do?

If you hit a 404 as a user, the problem usually isn’t on your end. Still, it’s worth trying a few things:

  1. Check the address in the browser bar: typos, double slashes, stray characters at the end.
  2. Refresh the page, or go to the site’s homepage and use its search or menu.
  3. If the 404 appears after clicking a Google result, the page was most likely deleted or moved and Google hasn’t updated its index yet. Search for the title of the content together with the site, e.g. site:example.com title.
  4. When a 404 shows up on many different sites at once, the cause is often a browser extension, the cache or the network. Clear the cache, disable extensions or try incognito mode.

If you own the website, the following sections matter more: how to find such URLs and what to do with them.

410 Gone error – what does it mean?

The 410 Gone code means the server knows the resource is no longer available and that this is most likely permanent. The HTTP specification explicitly recommends 410 instead of 404 when the site owner knows the removal is final. So it’s a deliberate statement – ‘we removed this on purpose’ – rather than a plain ‘not found’.

In SEO practice I use 410 for things like:

  • posts and pages removed as part of a content clean-up (content pruning), if they have no sensible equivalent,
  • products discontinued for good, with no replacement and no valuable external links,
  • spam URLs generated after a site was hacked (e.g. thousands of pages of Japanese spam),
  • parameter URLs or sections I’m deliberately retiring.

You can set a 410 at server level (examples below) or in a redirect plugin. Popular WordPress plugins such as Redirection or Rank Math let you return a 410 for a given URL instead of a redirect.

Apache / LiteSpeed (.htaccess file):

Redirect gone /old-post/

Nginx:

location = /old-post/ { return 410; }

404 vs 410 – how do they differ and how does Google treat them?

From the protocol’s point of view, the difference is simple. 404 means ‘not found’ and doesn’t say whether the absence is permanent. 410 means ‘removed and most likely not coming back’. For completeness I’ve added the 503 code to the comparison, because it sometimes gets confused with a 404, yet Google treats it completely differently:

404 Not Found410 Gone503 Service Unavailable
Class4xx – client error4xx – client error5xx – server error
What it saysThere’s no content here (unclear whether for good)The content was removed, most likely for goodThe server can’t respond right now
What Google doesDoesn’t index it, drops the URL from the index, crawls it less and less oftenThe same as with a 404Slows down crawling and comes back later; the URL stays in the index, but only for a while
When to use itThe URL doesn’t exist, typos, content with no equivalentDeliberate, permanent removal of contentA short technical break or overload (a few days at most)

From Google’s point of view, the difference is much smaller than many guides suggest. Google Search Central documentation says that all 4XX codes except 429 are treated the same. Google doesn’t index URLs that return them, and removes previously indexed pages from the index. How often such a URL is crawled drops over time. Google’s John Mueller has stressed many times that the difference between 404 and 410 is negligible for SEO. A 410 may be processed slightly faster at most, but it isn’t a ‘stronger ranking signal’.

My practical rule: I use 410 when I’m deliberately and permanently removing content and want to say so clearly. It’s especially handy for big clean-ups and cleaning up after spam. If a URL simply doesn’t exist (a typo, a random URL), the default 404 is perfectly correct and there’s nothing to change.

Do 404 errors hurt SEO?

Not in themselves. Google has been saying for years that 404 errors are a normal part of the web. The fact that some URLs on a site don’t exist doesn’t affect the rankings of the other pages that return 200. There’s also no ‘penalty’ for a large number of 404s in Search Console. What is a problem are specific situations:

  • A 404 on a URL that has traffic or external links. You lose users and the value of the links pointing to that page. Here you almost always need a 301 redirect to the closest equivalent.
  • A 404 on a page that should be working, e.g. after a migration, a permalink change or a CMS bug. That’s not a ‘404 code’ problem but important content disappearing from the index.
  • Internal links pointing to 404s. They break navigation and the user experience, and send crawlers down dead ends. It’s worth fixing them at the source.
  • Soft 404 errors. Pages that look like an error but return 200 OK keep getting crawled. On very large sites they therefore waste crawl budget.

Watch out for a popular myth about crawl budget. Proper 404s and 410s don’t waste it. According to Google, a 404 is a strong signal not to crawl that URL again. 4XX codes (except 429) also don’t affect the crawl rate. And managing crawl budget only really matters for sites with hundreds of thousands or millions of URLs.

404 errors in Google Search Console – how to find and fix them

It’s best to look for 404 errors in three sources at once. Each shows a slightly different slice of the problem.

1. The ‘Pages’ report in Google Search Console

  1. Log in to Google Search Console and select the property.
  2. In the menu, go to Indexing → Pages.
  3. In the Why pages aren’t indexed section, find the Not found (404) status. Next to it you may also see Soft 404, Blocked due to unauthorized request (401), Blocked due to access forbidden (403) and Blocked due to other 4xx issue.
  4. Click the status, review the list of URLs and export it. For a selected URL, use URL Inspection to see where Google knows it from and when it last crawled it.

Remember that URLs simply appearing under ‘Not found (404)’ doesn’t mean there’s an error to fix. Google itself says in the Search Console help that 404 responses aren’t necessarily a problem if the page was removed with no replacement. Googlebot may keep checking such URLs for a long time, though less and less often, and there’s no way to make it ‘forget’ them for good. The Validate fix button only makes sense once you’ve actually changed something, e.g. added redirects or restored the page.

2. An SEO crawler

Search Console shows the URLs Google knows about, while a crawler (e.g. Screaming Frog, Sitebulb) shows where on your site the links to them come from. After crawling the site, I filter the results by 4XX code and check the Inlinks report for each broken URL. That way I fix internal links at the source instead of just patching them with redirects. It’s also worth crawling the URLs from your sitemap: there shouldn’t be any 404s in it.

3. Server logs

Logs show which URLs users and bots actually hit, including ones you can’t see in GSC or in a crawl. Here’s an example for the standard Apache/Nginx log format (status code in field 9, path in field 7):

grep "Googlebot" access.log | awk '$9 == 404 {print $7}' | sort | uniq -c | sort -rn | head -50

At the top of the list you’ll see the most frequently requested non-existent URLs. These are candidates for a redirect, or for checking where the links come from. Remember that the User-Agent header can be faked, so for a more thorough analysis verify that the traffic really comes from Googlebot. Once you have a list of suspicious URLs, you can bulk-check their current status codes with a Python script.

This is how I start every technical SEO audit. I put together the data from GSC, the crawl and the logs, and only then decide what to do with each URL.

When to use a 301, when a 410 and when to leave a 404?

  • 301 redirect – when the content has moved or there’s a close equivalent (a new version of the article, a successor product, a merged category). Especially when the old URL has external links or traffic. I show how to do it in .htaccess, Nginx or WordPress in my guide on how to set up a 301 redirect. You’ll find how the individual codes differ in my article on 3xx status codes.
  • 410 Gone – when you’re deliberately and permanently removing content that has no equivalent and no valuable links, and you want to say so unambiguously (content clean-ups, spam after a hack).
  • Leave the 404 – when the URL never existed (typos, random URLs from bots, broken links from other sites with no value) or when you have no sensible redirect target. That’s correct server behaviour.
  • Restore the page – when the 404 appeared by mistake (a deleted page that’s still needed, an error after a migration).

What not to do: don’t mass-redirect all 404s to the homepage. It’s confusing for users, and Google often treats such redirects as soft 404s. A redirect only makes sense to a page that really matches what someone was looking for.

Soft 404 – what is it and how do you fix it?

A soft 404 happens when a URL doesn’t lead to any useful content (it’s effectively an error page) but still returns a 200 OK code.

  • A real 404 error: Google asks for a page, and the server honestly replies: ‘Not found (code 404)’.
  • A soft 404 error: Google asks for a page, and the server replies: ‘All good (code 200 OK)!’. But once inside, the crawler only sees a ‘Product not found’ or ‘Under construction’ message, or an empty page.

Google analyses the page content and compares it with the HTTP code that was sent. When it detects a mismatch – a success code for a page that looks like an error page – it flags the URL in Search Console as Soft 404 (the Indexing → Pages report, ‘Why pages aren’t indexed’ section). Such a URL won’t make it into the index, but the crawler will keep visiting it.

The most common causes of soft 404s are:

  • empty or nearly empty product and category pages in online shops,
  • badly configured error pages that return 200 OK instead of 404,
  • deleted pages mass-redirected (with no topical connection) to the homepage,
  • pages with very little content that the algorithm treats as an error page (thin content),
  • JavaScript-rendered pages that show an error message with a 200 code when data fails to load.

Scenario 1: The page really doesn’t exist and won’t have a successor

If the URL belongs to a deleted product or an outdated article, or simply doesn’t exist and has no alternative, configure the server to return a proper 404 Not Found or 410 Gone code. That’s a clear signal to Google that the content isn’t there and the URL should be removed from the index. The crawler will then visit it less and less often.

Scenario 2: The content has moved or has a good alternative

If the page has moved to a new URL or its content has been merged into another, more comprehensive article, use a 301 redirect to the most relevant equivalent. That way you pass the signals from the old URL to the new one and give users a smooth transition.

Scenario 3: The page has too little content (thin content)

The problem often affects categories that temporarily have no products, or tag pages with a single post. You have two options:

  • Enrich the content: add useful information. In an empty category this could be when the products will be back, plus links to similar, popular categories.
  • Block indexing: if the page has to exist in the site structure but offers nothing to search users, add a noindex meta tag to it. Google will stop indexing it, and the page will still be available when navigating the site.

Scenario 4: The problem is your own 404 error page

Make sure your custom error page returns a 404 Not Found code in the HTTP header, not 200 OK. It’s a common configuration mistake: because of it, every typo in a URL produces a soft 404.

Once the fixes are in place, click Validate fix in Google Search Console. Rechecking and updating the report can take anywhere from a few days to a few weeks.

How do you make a good 404 page?

A bare, default server error page is a dead end. A good 404 page keeps users on the site and doesn’t mess up the signals for Google. It should:

  • return an HTTP 404 code (or 410 for content removed on purpose) – that’s a must,
  • look like the rest of the site: logo, menu and footer,
  • clearly say that the page wasn’t found, without technical jargon,
  • include a search box and links to the most important sections, popular content or categories,
  • be light and fast, without heavy scripts or JavaScript redirects,
  • be measured: set up a report or filter in your analytics by the 404 page title, so you can see which URLs and sources bring users to it.

A 404 page doesn’t need a noindex tag. The 404 code on its own keeps it out of the index.

The 404 page in WordPress – how it works

WordPress handles 404 errors by itself. When a request doesn’t match any post, page or archive, it returns a 404 code and displays the theme’s 404.php template. In block themes this is the ‘Page: 404’ template in the Site Editor. So you change the look and content of this page in the theme or the Site Editor, without configuring the server.

Here’s how it looks on my blog. A URL that doesn’t exist, e.g. semurai.pl/404-error-test/, returns an HTTP/2 404 header and a ‘page not found’ page. So it’s a real 404, not a soft 404. It’s also worth knowing two mechanisms WordPress runs before it shows a 404:

  • URL guessing. If a URL is incomplete, WordPress tries to match a similar post and redirects to it with a 301. On the Polish version of my blog, semurai.pl/akademia/blad-404/ redirects to the full address of the Polish version of this article. It’s convenient, but sometimes it lands on the wrong page. You can limit the mechanism with the do_redirect_guess_404_permalink and strict_redirect_guess_404_permalink filters.
  • Old slugs. When you change the slug of a published post, WordPress remembers the old URL and redirects from it to the new one. So changing a post’s URL usually doesn’t create a 404. When you change the whole permalink structure or migrate the site, though, you have to plan such redirects yourself.

The quickest way to check the status code of any URL is in the terminal (or in the ‘Network’ tab of your browser’s developer tools):

curl -I https://yourdomain.com/page-that-does-not-exist/

A custom 404 page at server level

If your site doesn’t run on a CMS that handles 404s by itself, you point to your own error page in the server configuration. Use a local path, not a full URL. A full URL in ErrorDocument makes Apache send a redirect instead of a 404 code.

Apache / LiteSpeed (.htaccess file):

ErrorDocument 404 /404-page.html

Nginx (nginx.conf file):

error_page 404 /404-page.html;
location = /404-page.html { internal; }

IIS (web.config file):

<system.webServer>
  <httpErrors errorMode="Custom">
    <remove statusCode="404" />
    <error statusCode="404" path="/404-page.html" responseMode="File" />
  </httpErrors>
</system.webServer>

The most common 4XX codes – table

HTTP status codes fall into five classes, and the first digit defines the type of response: 1XX (informational), 2XX (success), 3XX (redirection), 4XX (client error) and 5XX (server error). Below I’ve collected the 4XX codes I come across most often in audits.

CodeNameWhat it meansWhat it means for SEO
400Bad RequestThe server can’t process the request because it’s invalid (e.g. bad syntax, a corrupted header or cookie).Google treats it like other 4XX codes – the URL won’t be indexed. Check whether internal links generate it.
401UnauthorizedThe resource requires authentication (logging in), and the request doesn’t include it or the credentials are wrong.Correct for protected areas. In GSC it shows as ‘Blocked due to unauthorized request (401)’.
403ForbiddenThe server understood the request but refuses access. Logging in again usually changes nothing.Check that a firewall or CDN isn’t blocking Googlebot. Don’t use 401/403 to limit crawling.
404Not FoundNo content at the URL. The code doesn’t say whether the absence is permanent.The URL drops out of the index. 404s alone don’t harm the rest of the site. 301-redirect important URLs that have links.
405Method Not AllowedThe HTTP method (e.g. POST instead of GET) isn’t supported for the resource. The response should include an Allow header.Rarely affects indexed pages. More often an API or form issue.
408Request TimeoutThe client didn’t send the full request within the time the server was prepared to wait.Occasional cases are normal. Frequent ones may point to server or network configuration problems.
410GoneThe resource has been removed and this is most likely permanent.Treated like a 404; the difference in how fast it’s removed from the index is negligible. Good for deliberately removing content.
429Too Many RequestsThe client sent too many requests in a given time (rate limiting).The exception: Google treats 429 as a server error and slows down crawling. Long-lasting 429s can lead to URLs dropping out of the index.
451Unavailable For Legal ReasonsAccess blocked for legal reasons (e.g. a court order, blocking in a given country).Treated like other 4XX codes – the content won’t be indexed.

A bit of history: the 404 code was already in the HTTP/1.0 specification (RFC 1945 from 1996). The 410 code arrived with HTTP/1.1. Newer codes were defined in separate documents: 429 in RFC 6585 (2012) and 451 in RFC 7725 (2016). Today the core definition of HTTP codes is in RFC 9110 (2022). The famous 418 I'm a teapot is an April Fools’ joke from RFC 2324 (1998). The 402 Payment Required code is still formally reserved for future use.

FAQ – 404 and 410 errors

What does a 404 error mean?

A 404 error (Not Found) means the server is working, but found no content at the given URL. Most often the page was deleted, moved without a redirect, or there’s a typo in the address.

What does a 410 code (410 Gone error) mean?

The 410 Gone code means the page was removed on purpose and most likely won’t come back. As a user, there’s nothing you can do about it. As a site owner, you set it when you’re deliberately removing content with no equivalent, e.g. during a content clean-up or when cleaning up after spam.

What’s the difference between a 404 and a 410 error?

404 says ‘not found’ and doesn’t say whether the absence is permanent. 410 says ‘removed for good’. Google treats both codes practically the same and removes such URLs from the index. A 410 may be processed slightly faster at most.

Is a 404 error a server error?

No. 404 belongs to the 4XX codes, i.e. client errors. Server errors are 5XX codes, e.g. 500 or 503.

Do lots of 404 errors in Google Search Console lower rankings?

No. The number of 404s doesn’t affect the rankings of other pages. It’s worth fixing URLs that have traffic, external links or internal links, and pages that should be working but return a 404.

How do I fix a 404 error in Google Search Console?

In the Indexing → Pages report, open the ‘Not found (404)’ status. For each important URL, decide: a 301 redirect to an equivalent, restoring the page, a 410 or leaving the 404. Fix internal links pointing to these URLs, and once you’ve made the changes, click ‘Validate fix’.

How long does Google keep visiting URLs with a 404 or 410 error?

Even long after removal, but less and less often. Google doesn’t ‘forget’ URLs it knows about – it just checks them periodically. That’s normal and needs no action.

Should I redirect all 404 errors to the homepage?

No. Mass redirects to the homepage confuse users, and Google often treats them as soft 404s. Only redirect to pages that genuinely replace the removed content.

What is a soft 404 error?

It’s a page that looks like an error or is empty, but returns a 200 OK code. Google doesn’t index it, but keeps visiting it. The fix is to return a real 404/410, add a 301 redirect or fill in the content.

Summary

4XX codes aren’t a reason to panic – they’re diagnostic information. Proper 404s for non-existent URLs are correct server behaviour. A 410 is useful when you’re deliberately removing content, and a 301 redirect when content has moved or been replaced. Most real problems come from important URLs that disappeared without a redirect, dead internal links and soft 404s. If you’d like me to look at this on your site along with the rest of your technical SEO, have a look at my SEO audit.

Tomasz Stopka

Tomasz Stopka

SEO consultant since 2008 · published author on content marketing

I have worked at agencies, at Onet (one of Poland’s largest web portals) and independently as SEMURAI. In the Academy I share what has worked in practice – specific and no fluff.

Read next