Site AI AuditInternet Solutions ürünü

Custom 404 Pages: What a Good Error Page Should Do

30 Eylül 20267 dk okumaSEO temelleri
Custom 404 Pages: What a Good Error Page Should Do

Short answer: A good 404 page does two jobs. For search engines it returns a real 404 (or 410) HTTP status code, so missing pages are dropped from the index instead of being treated as thin content. For visitors it explains in plain words that the page was not found and offers a way forward: a search box, links to the main sections and a contact option, inside your normal site design. Then you monitor which URLs lead to it and fix or redirect the ones that matter.

What a 404 page is, and why every site needs one

When someone requests a URL that does not exist on your server, the server answers with the HTTP status code 404 Not Found and shows an error page. Visitors reach it through mistyped addresses, old bookmarks, outdated links on other websites, deleted products and broken links inside your own site.

Every website has some 404 traffic, and that is normal. Google’s documentation on HTTP status codes states that 404 errors for pages that genuinely do not exist do not harm how the rest of your site is ranked. The problem is not that 404s exist; it is what happens next. A bare server error page with a technical message makes most people leave. A helpful custom page keeps many of them on the site.

Rule one: the status code must be 404

The most important part of a custom 404 page is invisible. The page must be sent with the status code 404 (or 410 for pages removed on purpose), not 200 OK. It is a surprisingly common mistake:

To check your site, request a URL that certainly does not exist, such as /this-page-does-not-exist-123/, and look at the status code. In a terminal, curl -I https://example.com/this-page-does-not-exist-123/ prints it on the first line; in the browser, the Network tab of the developer tools shows it. You want to see 404 and no redirect.

404 or 410: which one to use

Both codes say the page is not available. The difference is intent:

CodeMeaningWhen to use
404 Not FoundNothing is at this address; it might have been a typo or might come backThe default for any unknown URL
410 GoneThe page existed and was removed on purposeDeleted content you do not intend to replace, such as expired spam pages after a hack
301 Moved PermanentlyThe content lives at a new addressRenamed or merged pages with a clear replacement

In practice, search engines drop both 404 and 410 URLs from the index; 410 may be processed a little faster. Most small sites can use 404 everywhere and redirect only the URLs that have a real replacement, as described in our guide on choosing between 301 and 302 redirects.

What a helpful 404 page includes

The visitor on a 404 page is lost, not stupid. The page should make the next step obvious:

  1. Your normal header, navigation and footer. The visitor should immediately recognise they are still on your website.
  2. A clear, friendly message. For example, “We can’t find that page. It may have moved or the address may be mistyped.” Avoid technical jargon and avoid blaming the visitor.
  3. A search box. For content-heavy sites and shops this is often the fastest way back to what they wanted.
  4. Links to the most useful places. The home page, main service or product categories, the blog and the most visited pages.
  5. A contact option. A phone number or contact link helps visitors who were trying to reach you, and lets them report the broken link.
  6. Consistent, light design. The page should load quickly and work on mobile like any other page.

A little personality is fine if it fits your brand, but the purpose is practical. A clever joke without links does not help anyone.

What to avoid on a 404 page

How to set up a custom 404 page

The method depends on your platform:

After any change, repeat the check with a made-up URL and confirm the status code and the page design.

Use 404 data to fix real problems

The 404 page is the symptom; the cause is a link or address that points nowhere. Review which URLs return 404 and where visitors come from:

  1. Google Search Console lists “Not found (404)” URLs in the page indexing report, with where Google found them.
  2. Analytics. Give the 404 page a distinct title, such as “Page not found”, and filter page views by that title to see which addresses and referrers lead there.
  3. Server logs show every 404 request, including those from bots and old links elsewhere on the web.
  4. A site crawl finds broken links inside your own pages, which you should fix at the source. Our guide on finding and fixing broken links walks through it.

Then decide per URL: fix internal links that point to it, redirect addresses that had traffic or backlinks to the closest matching page, and leave random typos and junk URLs as honest 404s. Not every 404 needs action.

Special cases: online shops and removed products

Shops create more missing pages than most sites, because products sell out, get discontinued or change names. A few habits keep this under control:

On the shop’s 404 page itself, a search box and links to the main categories are especially valuable, because most visitors arrived looking for a specific product.

How Site AI Audit helps

Site AI Audit crawls your website like a search engine and reports broken links and redirects among its SEO checks, together with the sitemap, robots.txt and noindex rules. Each finding is explained in plain words with the affected pages and ranked by impact, so you can fix the links that send visitors to your 404 page. You can run a free check of your website.

Related reading

The bottom line

A custom 404 page should return a real 404 or 410 status code, stay inside your normal site design and give lost visitors an obvious way forward with search, key links and a contact option. Do not redirect every missing page to the home page. Watch the URLs that lead to your 404 page and fix or redirect the ones that matter.

SSS

Do 404 errors hurt SEO?

404s for pages that really do not exist are normal and do not harm the rest of the site. They become a problem when important pages return 404 by mistake or when many internal links point to missing pages.

Should I redirect all 404 pages to the home page?

No. Search engines usually treat such redirects as soft 404s and visitors land somewhere unexpected. Redirect only URLs that have a clear replacement and let the rest return 404.

How do I check that my 404 page returns the right status?

Open a made-up URL on your site and check the response in the browser’s developer tools or with curl -I. The first line should show 404, with no redirect before it.

What should a custom 404 page contain?

Your normal navigation, a short friendly message, a search box, links to the main sections and a contact option. Keep it fast and mobile-friendly.

When should I use 410 instead of 404?

Use 410 for pages you removed on purpose and will not replace, such as spam pages created during a hack. For everything else, 404 is fine.

#Broken links#On-page SEO#Technical SEO#Website audit
Kendi web sitenizi kontrol edin — ücretsiz.Web sitenizde neyi düzeltmeli — ve nereden başlamalısınız?
Ücretsiz başla

Blogdan daha fazlası

Tüm makaleler →
Internet Solutions

Ekibimizden diğer ürünler

Internet Solutions tarafından geliştirildi. Diğer ürünlerimizi de deneyin — her biri size farklı bir şekilde zaman kazandırır.

internet-solutions.net ↗
Site AI Audit
Gizlilik özeti

Bu web sitesi, size mümkün olan en iyi kullanıcı deneyimini sunabilmek için çerez kullanır. Çerez bilgileri tarayıcınızda saklanır ve sitemize geri döndüğünüzde sizi tanımak, ekibimizin sitenin hangi bölümlerini en ilginç ve faydalı bulduğunuzu anlamasına yardımcı olmak gibi işlevler görür.