A 404 error means the server is working but cannot find anything at that address. The fix depends on how many pages are affected:
- Every page except the homepage gives a 404: your WordPress permalinks or
.htaccessfile need resetting (Fixes 1 and 2). - One page or a few old links give a 404: the page was moved, renamed or deleted, so add a 301 redirect (Fix 3).
- The whole site, homepage included, gives a 404 or the wrong site: check the domain and the files (Fix 4).
Before you start
You need your WordPress admin login and your cPanel login. See how to log in to cPanel. Copy the exact URL that gives the 404, including any trailing slash.
Fix 1: Resave your permalinks
This fixes most cases where posts and pages give a 404 but the homepage works, for example after a migration or a restore.
- Log in to WordPress at
yourdomain.co.za/wp-admin. - Go to Settings > Permalinks.
- Do not change anything. Click Save Changes at the bottom.
- Open the broken page again in a private browser window.
WordPress rebuilds its rewrite rules and, if it can, rewrites .htaccess.
Fix 2: Restore the .htaccess file
If resaving did not help, the .htaccess file may be missing or damaged.
- Log in to cPanel and open File Manager (in the Files section).
- Click Settings (top right), tick Show Hidden Files (dotfiles) and click Save.
- Open
public_html(or the domain’s own folder for an addon domain). - If
.htaccessexists, right-click it and choose Edit. If not, click + File and create it. - Make sure it contains the standard WordPress block:
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
- Click Save Changes and test the page again.
If WordPress is installed in a subfolder, RewriteBase and the last line need that folder name, for example /blog/ and /blog/index.php. A broken .htaccess can also cause a 500 error, see how to fix a 500 Internal Server Error.
Fix 3: Redirect moved or deleted pages
When you rename a page, change its slug or delete it, old links from Google, social media and other websites still point at the old address. Send them to the closest live page with a 301 (permanent) redirect.
In WordPress (recommended for WordPress sites):
- Go to Plugins > Add New Plugin, search for Redirection and click Install Now, then Activate.
- Go to Tools > Redirection and finish the short setup.
- Under Add new redirection, enter the old path in Source URL (for example
/old-services/) and the new page in Target URL. - Click Add Redirect and test the old link.
The plugin also has a 404s log that lists the missing addresses people actually visit.
In cPanel (any site):
- In the Domains section, click Redirects.
- Choose Permanent (301), pick your domain and enter the old path after the slash.
- Enter the full new address in Redirects to and click Add.
Avoid redirecting every missing page to the homepage. Pick the page that best matches what the visitor wanted. If nothing matches, a 404 is fine.
Fix 4: When the whole site gives a 404
- Check the files are there. In File Manager, open
public_html(or the addon domain’s folder) and confirmindex.phporindex.htmlexists. - Check the domain points to your hosting. If you recently changed nameservers or DNS, some networks may still see the old server for a few hours, up to 24 to 48 hours. See DNS propagation explained and how to update your nameservers.
- Check the WordPress address. In wp-admin under Settings > General, both WordPress Address (URL) and Site Address (URL) should be your real domain with
https://, not a temporary or old address.
Find your 404s before visitors do
- Google Search Console: the Pages report under Indexing lists URLs that return “Not found (404)”. See Google’s Page indexing report help.
- The Redirection plugin’s 404s log (Fix 3) shows missing addresses real visitors hit.
- After a redesign, check your old menu links and popular blog posts still work.
Frequently Asked Questions
Do 404 errors hurt SEO?
A 404 for a page that genuinely no longer exists is normal and does not harm the rest of your site. The loss comes when a page with links or traffic disappears without a redirect, so redirect those.
Why does my page work for me but give a 404 for others?
Usually caching. Clear your caching plugin (for example LiteSpeed Cache > Toolbox > Purge All) and test in a private window.
Should I make a custom 404 page?
Yes. Most WordPress themes include one. A good 404 page has a search box and links to your main pages, so visitors do not leave.
What is the difference between a 404 and a 410?
A 404 means “not found”. A 410 means “gone for good”. Both tell Google to drop the page in time. For most small business sites a 404 or a 301 redirect is enough.
Related guides
- How to use the File Manager in cPanel
- How to install WordPress plugins
- How to force HTTPS on your website
- Website redesign: we 301-redirect every changed URL when we rebuild a site
Need help?
Open a support ticket with the broken URL and where you found the link, and we will take a look. You can also WhatsApp us, see contact us.