A 404 Not Found error means the web server couldn't find the page or file a visitor, or a search engine, tried to reach. The server itself is working fine: it's just that nothing exists at that specific URL anymore. Here's how to track down why it's happening and fix it.
Common causes of a 404 error
- The page was deleted, renamed, or moved without a redirect being set up.
- The link or bookmark has a typo in the URL, or is missing part of the path.
- A visitor is using an old cached version of a page, a search result, or a bookmark that pointed to a URL that no longer exists.
- Your site's rewrite rules, commonly stored in a .htaccess file, are missing or misconfigured, so the server can't match the URL to the right page.
How to find out what's broken
- Try the exact URL in your browser and check carefully for typos, extra slashes, or the wrong file extension.
- Check your site's menu, sitemap, or admin panel to confirm the page still exists, possibly under a different URL.
- If the 404 is showing for many pages at once rather than just one, it's more likely to be a rewrite rule or .htaccess problem than a single missing page.
How to fix it
If the page was moved or renamed
Set up a redirect from the old URL to the new one so visitors and search engines land on the right page automatically instead of hitting a dead end.
In cPanel
- Log in to cPanel and open Redirects under the Domains section.
- Choose the domain, enter the old page's path, and enter the new destination URL.
- Click Add to save the redirect.
In DirectAdmin
- Log in to DirectAdmin and open Domain Setup, then select your domain.
- Use the redirection option to point the old path to the new URL, or add the redirect rule directly to your .htaccess file through File Manager.
- Save your changes.
If your .htaccess file is missing or broken
- Open File Manager in cPanel or DirectAdmin and go to your site's root folder, usually public_html.
- Make sure Show Hidden Files is turned on, since .htaccess starts with a dot and is hidden by default.
- Rename the current .htaccess file (for example to .htaccess_old) so you keep a copy, then let your website platform regenerate a fresh one and check whether the error clears.
If you're on WordPress and only posts or pages return a 404 while the homepage loads fine, it's almost always a permalinks issue rather than a missing file. See How to Fix WordPress Posts and Pages Returning a 404 Error for the exact steps.
Give visitors a better experience while you fix it
Even after you've found the cause, it's worth having a proper custom 404 page so anyone who does hit a dead link can still find their way around your site instead of seeing a blank error. See How to Create a Custom 404 Error Page for Your Website for how to set one up.