Skip to main content

How to Troubleshoot a 404 Not Found Error on a cPanel Website

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...

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.

  1. Log in to cPanel.

  2. Open the File Manager.

  3. Navigate to the public_html directory (or the specific directory for your domain).

  4. Verify that the file exists and that the name matches the URL exactly.

  5. Check for common issues:

    • Case Sensitivity: Linux servers are case-sensitive. A request for example.com/Page.html will fail if the file is named page.html.

    • File Extensions: Ensure the file has the correct extension (e.g., .html or .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.

  1. In the File Manager, ensure that "Show Hidden Files" is enabled in the Settings menu.

  2. Locate the .htaccess file in your website's root directory.

  3. Rename the file to .htaccess_old to temporarily disable it.

  4. Test the URL that was previously failing.

  5. If the page loads correctly, the issue is with the rules inside the .htaccess file. You can then restore the original file and update the rules or reinstall your CMS's default .htaccess configuration.

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.

  1. Log in to cPanel.

  2. Open the Zone Editor.

  3. Locate the domain or subdomain in question.

  4. Verify that the record (e.g., an A record or CNAME) points to the correct IP address or destination.

  5. 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.

  1. Log in to cPanel.

  2. Navigate to the Domains or Addon Domains section.

  3. 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.

Did this answer your question?