404 Page Not Found — How to Fix

A 404 'Page Not Found' error appears when a visitor (or you) tries to access a URL that does not exist on your server. Here is how to fix it.

Fix 1: WordPress Permalink Issue (Most Common for WordPress Sites)

This is the most frequent cause of 404 errors on WordPress sites — especially after a migration or server change.

  1. Log in to your WordPress admin (yourdomain.com/wp-admin).
  2. Click Settings > Permalinks.
  3. Click Save Changes (without changing anything).
  4. WordPress will regenerate your .htaccess file with the correct rewrite rules.
  5. Test the URL that was giving the 404 error.

Fix 2: The File Does Not Exist on the Server

If the URL points to a specific file that used to exist (e.g., yourdomain.com/portfolio/project1.html):

  1. Log in to cPanel File Manager.
  2. Navigate to public_html and look for the file.
  3. If the file is missing, re-upload it or update the link to point to the correct URL.

Fix 3: Broken Internal Links

If your WordPress site has internal links pointing to pages that were deleted or renamed:

  • Install the Broken Link Checker plugin (free) — it scans your site and lists all broken links
  • Update or remove the broken links from your content
  • Set up 301 redirects for any old URLs that have changed to new ones (see .htaccess redirect in WH-12)

Fix 4: .htaccess File Missing or Corrupted

  1. In cPanel File Manager, check that .htaccess exists in public_html (enable Show Hidden Files).
  2. If it is missing, create a new file named .htaccess in public_html.
  3. For WordPress, paste in the default WordPress .htaccess content:

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress

Creating a Custom 404 Page

A custom 404 page improves user experience by helping visitors find what they were looking for instead of showing a generic error.

  • In WordPress: install the 404page plugin or configure a custom 404 page in your theme settings
  • In cPanel: go to Error Pages, select 404, and design a custom HTML message

 

  • 404 error, page not found, broken link, htaccess, WordPress 404, permalink
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

My Website is Down — First Steps to Diagnose

If your website is not loading, here is a quick checklist to diagnose the problem before...

500 Internal Server Error — Causes and Fixes

A 500 Internal Server Error is a generic message that means your web server encountered a problem...

Accepted Payment Methods at Hordanso

Here is a complete list of all the payment methods Hordanso accepts, for both Nigerian and...

ERR_TOO_MANY_REDIRECTS — How to Fix

The ERR_TOO_MANY_REDIRECTS error means your website is redirecting back and forth between URLs...

Email Not Receiving — Troubleshooting Guide

If emails sent to your domain are bouncing or not arriving, here is a structured guide to...

Powered by WHMCompleteSolution