Skip to content
Cloudzyro
Troubleshooting

What is a 404 error? What it means and how to fix it

Kofi Agyem

, Founder and CEO, CloudzyroPublished · 6 min read

On this page
  1. 1. The short answer
  2. 2. What you'll see
  3. 3. Common causes
  4. 4. How to fix a 404 as a visitor
  5. 5. How to fix 404s on your own site
  6. 6. A worked example
  7. 7. Other 4xx errors you might see
  8. 8. 404s and SEO
  9. 9. How to check a page's status code
  10. 10. Sources

A 404 Not Found means the server is up but can't find the page you asked for. Why it happens, how to fix one as a visitor or site owner, and SEO effects.

1. The short answer

A 404 error, or "404 Not Found", means your browser reached the website's server, but the server couldn't find the page you asked for. The site itself is working; that one address isn't. It usually happens because a page was moved or deleted, a link is wrong, or the address was mistyped.

404 is an HTTP status code, a three-digit number a web server sends with every response. Codes in the 400s mean the problem is with the request (like asking for a page that doesn't exist); codes in the 500s, like a 502 Bad Gateway, mean the server failed.

2. What you'll see

It can look like a plain "404 Not Found", a branded page saying "Page not found", or a browser message. However it's dressed up, the status code underneath is the same. You can see it in your browser's developer tools (Network tab) or with curl (below).

3. Common causes

  • A typo in the address. One wrong letter, a missing hyphen or an extra slash.
  • The page moved without a redirect. A redesign changed /about-us to /about, and old links still use the first.
  • The page was deleted. A product sold out, a post was unpublished.
  • A broken link on your own site or someone else's.
  • Case sensitivity. Many servers treat /Menu.html and /menu.html as different files.
  • A missing file in a deploy. An image or page wasn't included in the upload, or the build put it somewhere else.
  • Single-page app routes. In React or Vue apps, the browser handles /dashboard, but loading it directly asks the server for a file that doesn't exist.
  • The wrong folder. The site was uploaded one folder too deep, so every page is at /site/page instead of /page.

4. How to fix a 404 as a visitor

  1. Check the address for typos and try again.
  2. Remove the end of the address, one part at a time, to go up a level (from /blog/2024/my-post to /blog).
  3. Use the site's own search or menu.
  4. Search for the page's title in a search engine.
  5. Try the Internet Archive's Wayback Machine for an old copy.
  6. Tell the site owner, especially if their own link is broken.

5. How to fix 404s on your own site

  • Moved pages: add a permanent (301) redirect from the old address to the new one. This keeps visitors, bookmarks and search rankings.
  • Deleted pages: if there's a close replacement, redirect to it. If not, let it return 404 (or 410 if it's gone for good). Don't redirect everything to the home page.
  • Broken internal links: fix the link itself rather than relying on a redirect.
  • Missing files after a deploy: check the build output contains them, at the paths you expect, with the same capitalization.
  • Single-page apps: set the server to return index.html for unknown paths, or prerender those routes, so refreshing a page doesn't 404. Your framework's deployment docs usually cover this.
  • A good 404 page: keep your site's header and menu, say plainly that the page isn't there, and offer search and links to popular pages. Make sure it still returns the 404 status code.

On Cloudzyro Sites & Apps, every deploy is kept as a version you can download or restore in one click, so if a release removed pages by mistake, restoring the previous version brings them back while you fix it.

6. A worked example

A café redesigns its site. The old menu page was /our-menu.html; the new one is /menu. A week later, the owner notices people still arriving at the old address from a local directory listing and getting 404s.

  1. She checks the old address with curl -I https://www.example.com/our-menu.html and sees 404.
  2. She adds a permanent redirect from /our-menu.html to /menu in the site's configuration (in Next.js, redirects() in next.config.js; on cPanel hosting, a rule in .htaccess).
  3. She deploys and checks again: now it's 301 (or 308) with location: /menu.
  4. She asks the directory to update its link too, but with the redirect in place it no longer matters if they don't.

7. Other 4xx errors you might see

  • 400 Bad Request: the server couldn't understand the request, often a malformed address or a broken cookie.
  • 401 Unauthorized: you need to sign in.
  • 403 Forbidden: the server understood, but you're not allowed to see it. Some sites return 404 instead of 403 so they don't reveal that a private page exists.
  • 410 Gone: the page was removed on purpose and won't come back.
  • 429 Too Many Requests: you've sent too many requests in a short time. Wait and try again.

8. 404s and SEO

Google says 404s are a normal part of the web and don't harm a site's rankings on their own. Missing pages eventually drop out of search results. Two things are worth your time:

  • Redirect pages that mattered. A page that had traffic or links from other sites should redirect to its closest replacement, so that value isn't lost.
  • Avoid soft 404s. A "not found" page that returns 200 OK, or a redirect of everything to the home page, gets flagged as a soft 404 in Google Search Console. Return a real 404 status.

Google Search Console's Pages report lists URLs it found returning 404, which is a good place to spot broken links you didn't know about.

9. How to check a page's status code

# Show just the headers, including the status code
curl -I https://www.example.com/some-page

# Follow redirects and show each step
curl -IL https://www.example.com/old-page

The first line tells you the answer: HTTP/2 404 means not found, HTTP/2 200 means it's there, and 301 or 308 means it redirects (the location: header says where). In a browser, open developer tools, go to the Network tab and reload: the Status column shows the code.

If your whole site, not just one page, fails on a custom domain, it's probably DNS rather than a missing page. See What is DNS? and Domain not working. If a new version didn't go live at all, see Fix a failed deploy.

10. Sources

Questions

What does 404 mean?
404 Not Found is an HTTP status code. It means your browser reached the website, but the server couldn't find the page at that address.
Is a 404 error my fault?
Sometimes. A typo in the address causes one. More often the page was moved or deleted, or a link pointing to it is wrong.
Do 404 errors hurt SEO?
Not on their own. Google expects pages to disappear. It becomes a problem when important pages, or pages with lots of links, return 404, so redirect those to their new home.
What's the difference between 404 and 410?
404 means not found, with no promise about the future. 410 Gone says the page was removed on purpose and won't return.
What is a soft 404?
A page that says it's not found but returns a 200 OK status code, or a near-empty page that search engines treat as missing. Return a real 404 status for missing pages.
Why does my app show 404 when I refresh a page?
In single-page apps, the browser handles routes like /about, but the server has no file there. The server must return the app's index.html for those routes, or the routes must be prerendered.
Should I redirect all 404s to my home page?
No. Search engines treat that as a soft 404, and it confuses visitors. Redirect only pages that have a clear replacement, and let the rest return a helpful 404 page.

Put your site online free

From your AI tool, Git or a zip, with every version kept.