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.
WordPress: All Pages 404 Except Homepage
If your WordPress homepage works but every other page shows 404, your .htaccess file is missing or broken. The fix takes 10 seconds:
- ✓ Go to WordPress Admin > Settings > Permalinks
- ✓ Don't change anything, just click "Save Changes"
- ✓ WordPress regenerates .htaccess and your pages come back
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.htmlis 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
.phpbut 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
- Go to Settings > Permalinks in your WordPress admin
- Click "Save Changes" without changing anything. WordPress regenerates the .htaccess rewrite rules
- 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
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_htmlfor your main domain. Check thatindex.htmlorindex.phpis directly insidepublic_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.
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.
05. Finding and Fixing Broken Links
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 TicketQuick Recap: Fix 404 Errors
If you only do 5 things from this guide, do these:
- WordPress pages 404? - Settings > Permalinks > Save Changes to regenerate .htaccess
- Single page 404? - verify the file exists and the URL spelling/case matches
- Entire site 404? - check that files are in public_html, not a subfolder
- Create a custom 404 page - help visitors find what they need instead of hitting a dead end
- 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
