Error 404 - File Not Found

Errors & Troubleshooting | Updated March 2026

A 404 error means the server can't find the file or page you requested. Unlike a 403 (access denied) or 500 (server error), a 404 tells you the URL itself is wrong or the content has been moved or deleted. This guide covers the most common causes and how to fix them, whether it's a single page or your entire site showing 404s.

01. Single Page Returns 404

If only one page or URL gives a 404 while the rest of the site works fine:

  • Check the URL - is it spelled correctly? URLs are case-sensitive on Linux. /About.html is a different file from /about.html
  • Check the file exists - use cPanel File Manager or FTP to verify the file is actually in the expected directory. If you just uploaded it, confirm it's in public_html (or the correct subdirectory)
  • Check the file extension - if your server expects .php but the URL says .html (or vice versa), it won't be found
  • Recently deleted or renamed? - if you renamed a page, old links and bookmarks will now 404. Set up a redirect in .htaccess. See our redirect guide

02. All Pages Except Homepage Return 404

This is the most common WordPress 404 pattern. The homepage loads fine but clicking any link returns a 404. The cause is almost always a missing or corrupt .htaccess file.

Fix for WordPress

  1. Go to Settings > Permalinks in your WordPress admin
  2. Click "Save Changes" without changing anything. WordPress regenerates the .htaccess rewrite rules
  3. Test your pages - they should work now

If that doesn't work, check that .htaccess exists in your public_html directory and is writable (644 permissions). If the file doesn't exist, create one with this 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
Note

If WordPress is installed in a subdirectory (e.g., /blog/), change RewriteBase / to RewriteBase /blog/.

Fix for Other CMS

Joomla, Drupal, and other CMS platforms also use .htaccess for URL routing. Check that the CMS's .htaccess file is present and hasn't been accidentally deleted or renamed. Each CMS has a specific .htaccess format - check their documentation for the default contents.

03. Entire Site Returns 404

If every page including the homepage returns 404:

  • Files in wrong directory - your website files need to be in public_html for your main domain. Check that index.html or index.php is directly inside public_html, not in a subfolder within it
  • Addon domain path - if this is an addon domain, files go in the directory assigned to that domain (usually public_html/domainname). Check cPanel > Domains to see the document root path
  • DNS not pointed - if the domain's DNS doesn't point to your server, visitors see 404 or a default page. Check your nameservers or A record
  • Account suspended - log into your client area and check if your hosting service is Active

04. Creating a Custom 404 Page

Instead of showing a generic "Not Found" page, create a custom 404 that helps visitors find what they were looking for.

Using .htaccess

Create your custom 404 page (e.g., 404.html) in public_html, then add this to .htaccess:

ErrorDocument 404 /404.html

WordPress

WordPress themes have a built-in 404.php template that handles 404 pages automatically. Most themes include a search box and links to popular content. You can customize it by editing your theme's 404.php file or using a plugin like "404page" to assign any page as your 404 template.

Tip

A good custom 404 page includes: a clear "page not found" message, a search box, links to your most popular pages or categories, and a link to your homepage. It should use your site's normal header and footer so visitors know they're still on your site.

If your site has been around for a while, you probably have broken internal links pointing to pages that no longer exist. These hurt SEO and frustrate visitors.

  • Google Search Console - the Coverage report shows which of your URLs return 404. Free and comprehensive
  • Broken Link Checker plugin (WordPress) - scans your posts and pages for links that return errors
  • Screaming Frog - desktop tool that crawls your site and reports all 404s (free for up to 500 URLs)

For old URLs that still get traffic, set up 301 redirects in .htaccess to send visitors to the correct page instead of showing a 404. See our .htaccess guide.

Need Help With 404 Errors?

If your site has widespread 404s that you can't resolve, open a ticket with the affected URLs and what you've tried.

Open a Support Ticket

Quick Recap: Fix 404 Errors

If you only do 5 things from this guide, do these:

  1. WordPress pages 404? - Settings > Permalinks > Save Changes to regenerate .htaccess
  2. Single page 404? - verify the file exists and the URL spelling/case matches
  3. Entire site 404? - check that files are in public_html, not a subfolder
  4. Create a custom 404 page - help visitors find what they need instead of hitting a dead end
  5. Set up redirects for old URLs - 301 redirect deleted pages to their replacements

Last updated March 2026 · Browse all Troubleshooting articles · See also: 403 Errors | 500 Errors

  • 781 Users Found This Useful

Was this answer helpful?

Related Articles

How do I hide my domain WHOIS information?

General | Updated 2026 When you register a domain name, your contact information (name,...

What are some tools are available to optimize my website?

There are many great tools to optimize your website. There is an optimize tool in your hosting...

CGI Scripts - History Security and Modern Alternatives

General | Updated March 2026 CGI (Common Gateway Interface) was one of the earliest...

How do I cancel my account?

General | Updated 2026 If you need to cancel your hosting account with Ultra Web Hosting, you...

How to Remove a Web Disk Account

General | Updated March 2026 Web Disk (WebDAV) is a cPanel feature that lets you manage your...



Save 30% on web hosting - Use coupon code Hosting30