Skip to main content
+44 7575 472931[email protected]
HostAccentKnowledge BaseHosting, websites, SEO, and growth

How to Fix 404 Not Found Error: Every Cause (2026)

Seeing a 404 Not Found error? Learn how to fix 404 not found problems fast — broken links, permalinks, DNS and server config, every cause covered here.

WordPressSecurityWeb Hosting
404 not found errors from broken links, permalinks and server config causes, for 2026

A 404 Not Found error means the page you requested isn't where the server expected it to be. Annoying — especially when it's your own site and real visitors are hitting it right now. Here's the reassuring part: knowing how to fix 404 not found almost always comes down to five root causes, and most take only a few minutes to clear once you've spotted the right one. This guide covers every cause, ranked by how often it happens, with the exact steps and file paths for each.

Quick Answer: A 404 Not Found error appears when a server can't locate the URL a browser requested. Fix it fast by checking the URL for typos, clearing your browser and site cache, then looking for a broken or moved link. On WordPress, re-save permalinks under Settings → Permalinks. If a whole site returns 404, the cause is usually server or DNS misconfiguration — not the page.

Quick Fix: How to Fix 404 Not Found in Under Five Minutes

Start here first. In the support tickets our team handles at Hostaccent, roughly 4 in 10 "urgent 404" reports get solved by one of these three checks — no code required.

  1. Re-check the exact URL. A single wrong character — a trailing slash, a capital letter, %20 where a hyphen should be — throws a 404. Copy the link and compare it against the real published address.
  2. Clear cache twice — browser and site. Hard-refresh with Ctrl+Shift+R (Cmd+Shift+R on Mac). Then purge your CDN or caching plugin. A stale cached path is one of the most common false alarms we see.
  3. Re-save WordPress permalinks. Go to Settings → Permalinks and click Save Changes without editing anything. This regenerates the rewrite rules and fixes most "every post 404s" cases instantly.

If the page loads after that, you're done. If not, keep reading — the cause is deeper, and the sections below walk through each one in order of likelihood.

Pro Tip: Test the failing URL in an incognito window before anything else. If it loads there but not in your normal browser, the problem is local cache or a browser extension — not your server. That 10-second check saves hours of chasing a server-side ghost.

What a 404 Not Found Error Actually Means

HTTP 404 is a client-side status code in the 4xx family. It tells the browser the server is reachable and working fine — it simply has no resource at the address you asked for. The MDN reference on the 404 status code is the canonical spec if you want the full definition.

That distinction matters, because a 404 is not the same as:

  • 500 Internal Server Error — the server broke while processing the request (a completely different fix; see our walkthrough on the 500 Internal Server Error in WordPress).
  • 403 Forbidden — the resource exists, but you don't have permission to see it.
  • 301/302 redirect — the page moved and the server is politely pointing you elsewhere.

One more variant to know: the "soft 404." The page returns a 200 OK status but shows a "not found" message. Google treats these as low quality, and they quietly waste crawl budget on your site.

The Real Causes of a 404 Error, Ranked by How Often We See Them

Across the sites we host, 404s fall into a predictable pattern. Here's the ranking straight from the tickets that actually land in our queue as of 2026:

  1. Broken or mistyped links (~35%) — a link points to a URL that no longer exists or was typed wrong.
  2. Changed permalinks or moved/renamed pages (~25%) — you edited a slug, switched permalink structure, or deleted a page with no redirect.
  3. Missing or misconfigured .htaccess / rewrite rules (~20%) — the rules that route pretty URLs got wiped or never generated.
  4. Post-migration path mismatches (~12%) — files moved to a new server but the URLs or document root didn't line up.
  5. DNS or server-level misconfiguration (~8%) — the whole domain or a subfolder 404s because of a routing or virtual-host error.

Notice the top two causes account for more than half of all cases — and both live entirely inside your CMS. You rarely need to touch the server for those.

Insider Insight: The single most common self-inflicted 404 we see is someone changing their WordPress permalink structure on a live site with hundreds of indexed URLs — and adding zero redirects. Every old link in Google's index 404s the instant they hit Save. If you must change permalinks, set up 301 redirects from the old pattern first. Always.

Step-by-Step Fixes for Each Cause

Work through these in order. Each one maps to a cause above, and the fastest 404 error fix is usually the one matched to the right cause — not the most complicated one.

Find them first. Crawl your site with a tool like Screaming Frog (its free tier covers 500 URLs) or check Search Console's Pages report for "Not found (404)" entries.

For each broken internal link:

  • Edit the linking page and point the URL at the correct, live address.
  • If the target page is genuinely gone, either restore it or 301-redirect the old URL to the closest relevant page.

Don't leave broken internal links sitting — they leak link equity and frustrate readers. Broken links fix work is tedious, but it's usually the highest-impact hour you'll spend all week.

On WordPress:

  1. Go to Settings → Permalinks.
  2. Click Save Changes (no edits needed). This rewrites the rules in .htaccess.
  3. If specific posts still 404, check whether their slug changed. Add a 301 redirect from the old slug to the new one using a redirect plugin or your .htaccess.

The official WordPress permalinks documentation covers the edge cases if a custom structure refuses to stick.

Fix 3: Rebuild .htaccess or rewrite rules

If permalinks won't save or every pretty URL 404s, your .htaccess (Apache) or rewrite block (Nginx) is missing or broken.

On Apache, the default WordPress .htaccess in your site root should contain:

apache
## BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
## END WordPress

Make sure the file is readable (permissions 644) and that mod_rewrite is enabled. On our Nginx → Apache + NVMe stack, the typical bottleneck here is a try_files directive in the Nginx layer that doesn't fall through to index.php — the Nginx try_files documentation shows the correct pattern.

Fix 4: Resolve post-migration 404s

When we migrate customer sites, we repeatedly see the same two culprits: the document root points at the wrong folder, or the database still holds the old domain inside its URLs.

  • Confirm the web root matches where the files actually live.
  • Run a search-replace on the database for the old domain (with WP-CLI: wp search-replace 'olddomain.com' 'newdomain.com').
  • Flush any object cache after the swap.

A slow site can also masquerade as a 404 problem when it's really a performance one — if pages hang for 5–10 seconds before failing, our WordPress slow diagnosis guide helps you tell the two apart.

Fix 5: Fix DNS and server-level 404s

If the entire domain 404s, the issue sits above the CMS.

  • Confirm DNS resolves to the right IP (dig yourdomain.com +short).
  • Check the virtual host or server block points to the correct document root.
  • If you're behind a CDN, verify the origin is reachable. Cloudflare's guide to HTTP status codes separates edge 404s from origin 404s — a critical distinction when a CDN sits in front of your site.

On the servers we run at Hostaccent, a full-site 404 almost always points to a virtual-host error, not a missing page. When server resources get starved, though, odd intermittent errors creep in too — related reading: Shared Hosting Resource Limit Exceeded.

How to Confirm the Fix and Stop 404s Coming Back

Fixed it? Verify properly before you move on.

  • Check the status code, not just the page. Run curl -I https://yoursite.com/page and confirm it returns HTTP/2 200, not 404.
  • Re-crawl the affected section so search engines pick up the correction.
  • Build a custom 404 page so the inevitable stray link sends visitors somewhere useful instead of a dead end — this alone recovers a chunk of otherwise-lost traffic.

Prevention is mostly discipline:

  • Add 301 redirects every single time you change a URL. No exceptions.
  • Run a monthly broken-link scan.
  • Keep automated backups so a bad edit is a one-click rollback instead of a 2 a.m. emergency.

Intermittent 404s — pages that work sometimes and fail others — often trace back to an overloaded server dropping requests under load, which is closer to a performance issue than a routing one. If that's your pattern, our guide to fixing high TTFB in WordPress covers the underlying causes.

When Reliable Hosting Is the Real Fix

Before you close the tab, the short version — knowing how to fix 404 not found errors is mostly about matching the fix to the cause:

  • Broken links and moved pages cause most 404s — fix them in your CMS with redirects.
  • "Every URL 404s" means permalinks or .htaccess — re-save permalinks first.
  • A whole-site 404 is a server, DNS, or migration problem, not a page problem.
  • Always verify with the real HTTP status code, and add 301 redirects whenever a URL changes.

Most of that is yours to fix in the CMS. But a meaningful slice — the whole-site drops, the intermittent failures under load, the post-migration path chaos — comes down to how well your server is configured and how much headroom it has.

That's the part we handle. Hostaccent has run hosting since 2012 as a UK-registered company serving customers worldwide, on a WHMCS-billed, Cloudflare-fronted Nginx → Apache stack with NVMe SSD storage and UK-based human support. If you'd rather not babysit config files and virtual hosts yourself, our Linux shared hosting starts at $1.99/mo on the Economy plan — with the automated backups and stable rewrite configs that quietly prevent most server-side 404s. It won't fix a bad internal link (that's still on you), but it removes the server from your list of suspects.

Frequently Asked Questions

How to fix 404 not found errors on any website?

Confirm the URL is correct, then clear your browser and site cache. On WordPress, re-save permalinks under Settings → Permalinks. If individual pages moved, add 301 redirects. If the whole site 404s, check your .htaccess, server config, and DNS — that points to a server-level issue rather than a single missing page.

What causes an http 404 page not found error?

An http 404 page not found error means the server is reachable but has no resource at the requested URL. The usual causes are a mistyped or broken link, a changed permalink, a deleted page with no redirect, a wiped .htaccess, or a server misconfiguration after a migration or DNS change.

Why am I getting a 404 error on my website after migrating?

A 404 error on my website after migration usually means the document root points to the wrong folder, or the database still stores the old domain in its URLs. Fix the web root, run a database search-replace for the old domain, then flush your cache and re-check the affected pages.

Does a 404 error hurt my SEO?

A few 404s won't tank your rankings — Google expects some. But large numbers of 404s on previously indexed URLs waste crawl budget and lose link equity. The real damage is to users, who bounce. Redirect valuable old URLs with 301s and fix broken internal links promptly.

For a broken links fix at scale, crawl the whole site with a tool like Screaming Frog or Ahrefs, export every 404, then batch them: update wrong internal links, 301-redirect moved pages, and restore or replace anything genuinely missing. Re-crawl afterward to confirm each one now returns a 200 status.

Can my hosting cause 404 errors?

Yes. Whole-site or intermittent 404s often stem from server misconfiguration, a broken virtual host, or resources maxing out under load. A well-configured stack with automated backups — the kind Hostaccent runs — prevents most server-side 404s, though it can't fix a bad link or a mistyped URL inside your own content.

Reviewed by

HostAccent Editorial Team · Editorial Team

Last updated

Jul 5, 2026

HostAccent Editorial Team publishes practical hosting guides, operations checklists, and SEO-focused tutorials for businesses building international web presence.

Discussion

Have a question or tip about this topic? Share it below — your comment will appear after review.

Your email stays private and is only used for moderation.

Write for the Community

Have a tutorial, tip, or insight to share? Get published on the HostAccent Blog with your name, bio, and website link.

Become a Contributor

Need a faster setup for this workflow?