How to fix a 404 Not Found error
The server looked and found nothing there — here is how to work out whether the page moved, was deleted, or was never really at that address.
A 404 Not Found error means the server received your request and searched for something at that exact address, and there was nothing there. It's the simplest of the common HTTP errors to understand and, most of the time, the simplest to fix — nothing is corrupted, the server itself is working correctly, and the fix is almost always about the path rather than the platform.
The useful question isn't "why is it broken" so much as "did this URL ever work, and what changed since it did". That single question rules out most of the causes below in seconds.
The causes, in the order worth checking
1. WordPress permalinks or rewrite rules have broken
If every page 404s except the homepage, this is almost certainly your cause. WordPress translates a friendly URL like /blog/my-post/ into an actual query behind the scenes, using rewrite rules stored in .htaccess. If that file is missing, was overwritten, or lost its WordPress block during an update or a migration, every URL that depends on translation stops resolving while the homepage — which needs no translation — keeps working.
The fix: in wp-admin, go to Settings > Permalinks and click Save, without changing anything. WordPress rewrites the rules into .htaccess automatically. If wp-admin itself 404s, you can add the rules by hand — the default WordPress block starts with # BEGIN WordPress and can be found in any fresh WordPress install for reference.
2. The file was moved, renamed, or genuinely deleted
Check the exact path being requested against what actually exists in your file manager. Two details catch people out constantly:
- Case sensitivity. Linux servers treat
Contact.phpandcontact.phpas two different files. A link built during development on Windows or macOS, where case is usually ignored, will 404 the moment it's live on Linux hosting if the case doesn't match exactly. - Trailing content. A URL like
/products/widgetand/products/widget/are not always interchangeable, depending on how the folder and rewrite rules are set up. If one works and the other doesn't, that's the clue rather than a mystery.
3. Files were uploaded to the wrong folder
Every domain and subdomain is tied to a specific folder on the server — usually public_html for the main domain. If a site was uploaded into a subfolder inside it by mistake, the domain's root will show whatever default page exists there (often a 404, sometimes a placeholder), while the actual site sits one level down, unreachable at the address anyone would type. Confirm in your control panel which folder the domain actually points at, and check the files are directly inside it rather than nested in an extra folder from an unzipped upload.
4. A CDN or cache is serving a stale 404
If a page used to exist, was deleted, then a new page was published at the same address, a caching layer in front of the site can keep serving the old 404 response for a period after the new page went live. Purge the cache for that specific URL, or test in a private browsing window with caching bypassed, before concluding the fix on the server didn't take effect.
5. The domain is pointing somewhere unexpected
Less common, but worth ruling out if 404s appeared suddenly across an entire site with no changes on your end: confirm the domain's DNS is still pointing at your hosting and hasn't been changed at the registrar. A domain pointed at the wrong server can return that other server's own 404 page, which looks identical to your own going missing.
A generic 404 loses a visitor outright. A custom one with a search box and a link back to the homepage keeps them on the site. Most control panels let you set a custom error page without touching code.
Finding the pattern across multiple 404s
If you're seeing 404s reported in analytics or search console for pages that should exist, check whether they share something in common — the same folder, the same URL structure, or all created around the same date. A shared pattern points at a single rewrite rule or a single migration step rather than dozens of individual missing files, and fixing the one rule clears all of them at once.
If the page is genuinely gone
The correct fix for content that has permanently moved is a 301 redirect from the old address to the new one, added either in .htaccess or through your control panel's redirect tool. That preserves any search ranking and stops visitors and search engines alike hitting a dead end. If you're not sure whether the address should exist at all, support can check what's actually on the server against what you expect to be there.
Frequently asked questions
Does a 404 mean my content was deleted?
Not necessarily. It means nothing answers at that exact address right now. The far more common cause is that the URL structure changed, the file moved, or a rewrite rule that used to translate the old address into the right file has stopped working — the underlying content is usually still there.
Why does every page 404 except the homepage?
This is the classic sign of a permalink or rewrite rule problem rather than missing files. The homepage is served directly, so it works; every other URL depends on a rewrite rule translating it into an actual file, and if that rule is broken, everything except the one page that needs no translation fails.
Related reading
The server saw your request and refused it on purpose — here is how to find out which rule is doing the refusing.
Why your site shows a list of filesA plain list of filenames where your homepage should be means the server has nothing to show instead — here is the fix.
How to point a domain to your hostingThe two ways to connect a domain to a hosting account, when to use each, and how to tell the change has actually taken effect.
How to fix "Error establishing a database connection"A blank page with one line of text, and five possible causes. Here is how to tell which one you have, in the order worth checking.