Skip to main content

How to Troubleshoot a 404 Not Found Error on a Website

A 404 Not Found error indicates that the web server was able to communicate with the browser, but it could not find the specific page or file requested. This guide helps you identify and resolve 404 errors on your website.

A 404 Not Found error indicates that the web server was able to communicate with the browser, but it could not find the specific page or file requested. This guide helps you identify and resolve 404 errors on your website.

Before you begin

You will need:

  • Access to your website's administrative dashboard (such as WordPress) or a file manager.

  • Access to your domain's DNS settings or hosting control panel.

Check the URL for typos

The most common cause of a 404 error is a mistyped URL.

  1. Verify the URL in the browser's address bar.

  2. Check for common errors, such as:

    • Misspelled words.

    • Incorrect file extensions (e.g., .html vs .php).

    • Extra characters at the end of the URL.

  3. Attempt to navigate to the page again using the correct spelling.

Check for broken internal links

If a link on your website leads to a 404 page, the internal link may be configured incorrectly.

  1. Identify the page containing the broken link.

  2. Locate the link in your website's editor or content management system.

  3. Update the link to the correct destination URL.

  4. Save the changes and test the link.

Verify file existence and paths

If a specific page is missing, the file may not be in the correct directory on the server.

  1. Log in to your hosting control panel (such as cPanel or Windows Control Panel).

  2. Open the File Manager.

  3. Navigate to the directory where your website's files are stored (typically public_html or a specific folder for your domain).

  4. Verify that the file or folder exists and is named correctly.

  5. Ensure the file is in the correct directory relative to the root of your domain.

Check .htaccess or web.config rules

Incorrect rewrite rules in your server configuration file can cause the server to look in the wrong place for a file.

Warning: Incorrectly editing your .htaccess or web.config file can cause your entire website to become inaccessible. Always create a backup of the file before making changes.

  1. Access your site's root directory via a File Manager or FTP client.

  2. Locate the .htaccess (for Apache) or web.config (for IIS) file.

  3. Download a copy of the file as a backup.

  4. Check for any recent changes or incorrect rewrite rules.

  5. If using a CMS like WordPress, you can often reset the default .htaccess rules through the "Settings" > "Permalinks" section by clicking Save Changes.

Check for missing redirects

If you recently changed a page's URL or moved a page to a new location, you must implement a 301 redirect to point the old URL to the new one.

  1. Identify the old URL that is currently returning a 404 error.

  2. Identify the new destination URL.

  3. Use a redirection plugin or your hosting control panel's redirect tool to create a 301 redirect from the old URL to the new one.

Confirm the result

  • The requested page loads successfully in your browser.

  • Internal links on your site point to the correct pages without triggering a 404 error.

If the error persists after checking the above

If you have verified the file exists and the URL is correct, but the page still returns a 404 error, the issue may be related to a specific plugin conflict or a server-side configuration that requires technical investigation.

Contact Hostek support and provide the following information:

  • The specific URL(s) that are returning the 404 error.

  • A description of the changes made recently (e.g., installing a new plugin, changing a permalink, or moving a file).

  • The results of your checks regarding the file's existence in the File Manager.

Did this answer your question?