A 404 Not Found error indicates that the web server was able to communicate with the requested URL, but the server could not find the specific page or file requested. This guide helps cPanel account users identify and resolve common causes of 404 errors on their websites.
Before you begin
You will need:
A cPanel account with access to the File Manager and the Zone Editor.
The specific URL that is returning the 404 error.
Check the file path and naming
A 404 error often occurs because the file does not exist in the directory where the server expects it to be.
Log in to cPanel.
Open the File Manager.
Navigate to the
public_htmldirectory (or the specific directory for your domain).Verify that the file exists and that the name matches the URL exactly.
Check for common issues:
Case Sensitivity: Linux servers are case-sensitive. A request for
example.com/Page.htmlwill fail if the file is namedpage.html.File Extensions: Ensure the file has the correct extension (e.g.,
.htmlor.php).Missing Files: If a page was recently moved or deleted, ensure the correct file was placed in the correct folder.
Check the .htaccess file
If the file exists but still returns a 404, the issue may be caused by incorrect rewrite rules in the .htaccess file, which is commonly used by CMS platforms like WordPress.
In the File Manager, ensure that "Show Hidden Files" is enabled in the Settings menu.
Locate the
.htaccessfile in your website's root directory.Rename the file to
.htaccess_oldto temporarily disable it.Test the URL that was previously failing.
If the page loads correctly, the issue is with the rules inside the
.htaccessfile. You can then restore the original file and update the rules or reinstall your CMS's default.htaccessconfiguration.
Check the DNS and Zone Editor
If the 404 error occurs for a subdomain or a newly added page that is not resolving correctly, the issue may lie in the DNS configuration.
Log in to cPanel.
Open the Zone Editor.
Locate the domain or subdomain in question.
Verify that the record (e.g., an A record or CNAME) points to the correct IP address or destination.
If you recently added a new subdomain, ensure the DNS has propagated.
Check the Document Root
If your entire website or a specific subdirectory is returning a 404, the "Document Root" may be incorrectly configured.
Log in to cPanel.
Navigate to the Domains or Addon Domains section.
Verify that the Document Root path for the domain matches the actual folder where your website files are located.
Confirm the result
The requested URL loads the intended page or content.
The 404 error message no longer appears in the browser.
Troubleshooting common scenarios
The error only occurs on a specific page
If only one page is failing, the issue is likely a typo in the URL, a case-sensitivity error in the filename, or a missing file in the File Manager.
The error occurs on all pages of a subdomain
If a subdomain is returning 404 errors, check the Zone Editor to ensure the subdomain points to the correct IP address and that the Document Root in cPanel is correct.
The error occurs after installing a CMS (like WordPress)
If the site works on the homepage but 404s on internal links, the .htaccess file is likely missing the standard rewrite rules. You can often resolve this by visiting the "Settings" or "Permalinks" section of your CMS dashboard and saving the settings to regenerate the .htaccess file.
Limitations
This article does not cover 404 errors caused by external factors, such as a DNS provider's failure or a typo in the URL entered by the user. It also does not cover 404 errors caused by a missing file that was intentionally excluded from the server.
