What is 404 error in when we open a url?

Dani AI

Generated

Short answer: a 404 is the HTTP "Not Found" response — the server answered your request but there is no resource at that exact URL. , and are right in that respect, but the practical causes and fixes are wider than "page missing."

To diagnose quickly:

  • Check the HTTP status (browser DevTools Network tab or a quick curl):
    curl -I https://example.com/some/page
    # look for "HTTP/1.1 404 Not Found"
  • Inspect server access/error logs for the exact request and referrer. Look for common causes: wrong filename case on Linux, missing trailing slash vs directory, rewrite rules (.htaccess/nginx), file-permission problems, or deleted pages. Also confirm the server really returns 404 (not a "soft 404" that serves a 200 page saying "not found").

Common, safe fixes:

  • If the page moved permanently, serve a 301 redirect to the new location so users and search engines follow the link equity.
  • If the page no longer exists, keep a real 404 (or 410 for intentionally removed content) and provide a helpful custom 404 page with search/navigation. Example Apache directive:
    ErrorDocument 404 /404.html
    Redirect 301 /old-page.html /new-page/
  • Update internal links and your sitemap, and use analytics/Search Console to prioritize fixes for pages that still get traffic.

Cautions and best practice: don’t blanket-redirect all 404s to your homepage (confusing for users and search engines); avoid returning 200 for missing pages; monitor 404s regularly to catch broken links caused by content changes or migration. For SEO, isolated 404s are normal; persistent, high-volume 404s mean lost visitors and should be fixed.

Recommended Answers

All 5 Replies

It's a server response stating that the requested page does not exist.

It is server related errors, that particular web page not available on opened time, it is called 4o4 errors.

When web server unable to find the page you have requested it is called 404 error.

i agree with jobtardis.

404 error occurs when server host not present or occur while calling those functions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.