Introduction
A “404 Not Found” error frustrates visitors when they try to access a page that doesn’t exist, potentially driving them away. This client-side HTTP status code often results from broken links, misconfigured permalink settings, or missing files. It is a common error that can affect any website including sites built with WordPress, Joomla, or a custom framework. This guide provides step-by-step solutions using your hosting control panel, File Manager, or SSH to help you diagnose and fix this error. Let’s eliminate those 404 errors now!
What Causes a 404 Not Found Error?
A 404 Not Found error occurs when a web server receives a request for a resource (like a webpage or file) that doesn’t exist at the specified URL. Common causes include:
- Broken Permalinks: URL structures in content management systems like WordPress change, but links aren’t updated.
- Misconfigured .htaccess: Faulty rewrite rules (e.g., missing WordPress rules) or syntax errors.
- Missing Files: Deleted or moved pages/files (e.g., /about-us.php renamed to /about.php).
- Incorrect Redirects: Faulty 301/302 redirects in .htaccess or plugins (e.g., redirecting to a non-existent page).
- Server Misconfiguration: Apache/Nginx rules blocking valid URLs or missing index files.
- Domain Issues: Recent domain migrations or DNS changes causing unresolved URLs.
- Plugin Conflicts: CMS plugins (e.g., Yoast SEO) generating invalid URLs or redirects.
- Case Sensitivity: URLs failing on case-sensitive servers (e.g., /Page.php vs. /page.php).
Step-by-Step Fix
Follow these steps to resolve 404 errors, starting with common causes:
1. Check the URL and Permalinks
- Verify the URL for typos (e.g., yourdomain.com/abuot vs. yourdomain.com/about).
- In WordPress, go to Settings > Permalinks and re-select your structure (e.g., “Post name”), then click Save Changes to regenerate
.htaccess
rules. - Test the affected page. If wp-admin is inaccessible, proceed to
.htaccess
fixes.
If permalinks don’t resolve the issue, check .htaccess
.
2. Fix .htaccess File
- In cPanel’s File Manager, navigate to public_html.
- Locate
.htaccess
. Rename it to.htaccess_old
to disable it temporarily. - For WordPress: Create a new
.htaccess
file with the following rules:# 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
- Set permissions to 644 (right-click > Change Permissions).
- Alternatively, via SSH: Run
nano .htaccess
, paste the rules, save it using Ctrl/Cmd + O, and usechmod 644 .htaccess
to set correct file permissions. - Test your site.
3. Check for Missing Files or Redirects
- In File Manager, verify the requested file/page exists (e.g., public_html/about.php).
- If missing, restore from backups via your control panel’s Backup tool or create a fresh one.
- Check
.htaccess
or plugins (e.g., Redirection) for faulty redirects (e.g., redirecting/old-page
to/non-existent-page-or-path
). - Paste redirect rules into a Generative AI tool like Grok, ChatGPT, etc. to identify errors.
4. Resolve Server or Plugin Issues
- Review error logs in your control panel (e.g., Logs > Errors in cPanel) for clues.
- To disable problematic plugins: Navigate to
wp-content/plugins
. Then rename the suspected plugin folder (e.g.,yoast-seo
toyoast-seo_old
). - Contact your hosting provider to verify server configurations (e.g., Apache’s DirectoryIndex).
5. Verify Domain and Case Sensitivity
- If recently migrated, check DNS settings in your registrar or DNS provider (e.g., Cloudflare) for correct A records.
- Ensure URLs match server case sensitivity (e.g., rename
Page.php
topage.php
if needed).
6. Verify and Finalize
- Reload your site to confirm the error is resolved.
- If persistent, contact your hosting provider for server-side issues.
Preventing Future 404 Errors
- Test Links: Use tools like Broken Link Checker to verify URLs.
- Backup Regularly: Save site backups via your control panel.
- Validate .htaccess: Test rules with htaccesscheck.com or check with AI like Grok or ChatGPT.
- Run on Autopilot: with FREE Migration: To ensure your site runs smoothly and fast, migrate to VeeroTech with our FREE migration service. Let our team handle migration for you. Also get insights into your website’s performance with our FREE WordPress Performance Evaluation when you switch to VeeroTech.
Conclusion
Fixing 404 Not Found errors is easily achievable with this guide. By correcting permalinks, .htaccess, and server settings, “Not Found” pages on your site will be accessible again.
Take advantage of our risk-free trial plans starting at $0.99 & with a 30-day money-back guarantee to experience our service. Choose VeeroTech’s managed hosting for a hassle-free hosting experience that comes with 24/7/365 support, proactive monitoring, and free migration services that ensure reliability and hassle-free hosting.
Related Posts and Resources
FAQs
The server can’t find the requested resource, often due to broken links or misconfigurations.
Changing permalinks without updating .htaccess breaks URLs.
Yes, plugins like Yoast SEO may create faulty redirects.
Use your hosting control panel’s Backup tool to recover deleted files.
Verify DNS A records and allow propagation time.
If you have any web hosting questions please feel free to reach out to us. We're happy to help.
Our Guiding Principles