Fixing 403, 404, and 500 Errors: Common File and Folder Causes in cPanel
If your website suddenly displays an error like 403 Forbidden, 404 Not Found, or 500 Internal Server Error, the cause is often related to files, folders, permissions, redirects, or a corrupted .htaccess file. Not every error means the entire website is broken. Often, a targeted check in the cPanel File Manager is sufficient.
This article explains the most common file and folder causes of these error messages and shows you how to systematically check what happened.
Always make changes carefully. Create a backup copy before making adjustments to
.htaccess, PHP files, startup files, or permissions.403 Forbidden: Access Denied
A 403 Forbidden error means that the server understood the request but refuses to grant access. In the context of files and folders, permissions, missing startup files, or access protection rules are frequently responsible.
Common Causes
- Incorrect file permissions,
- Incorrect folder permissions,
- No
index.phporindex.htmlin the directory, - Directory listing is disabled,
.htaccessrules are blocking access,- Directory protection is active,
- IP address has been blocked.
Checking in cPanel
- Open the File Manager.
- Navigate to the affected folder.
- Check if a startup file like
index.phporindex.htmlexists. - Check the permissions: usually
755for folders and644for files. - Enable hidden files and check the
.htaccessfile. - Check if directory protection is active.
404 Not Found: File or Page Not Found
A 404 Not Found error means that the server could not find the requested file or URL. This can happen if files have been deleted, moved, or renamed, or if redirects and permalinks are not functioning correctly.
Common Causes
- File was deleted or moved,
- File name or path is incorrect,
- Case sensitivity does not match,
- ZIP file was extracted into an additional subfolder,
- Incorrect document root for the domain,
- Faulty redirect,
- For WordPress: Permalinks or
.htaccessrules are corrupted.
Checking in cPanel
- Check in the File Manager to see if the file actually exists.
- Compare the file name, extension, and case sensitivity.
- Check if the file is in the correct web directory.
- Check the
.htaccessfile for redirects or rewrite rules. - For WordPress: Resave the permalink structure in the admin area.
500 Internal Server Error: Server Error
A 500 Internal Server Error is a generic error message. The server was unable to successfully process the request. In a file context, faulty .htaccess rules, PHP errors, incorrect permissions, or broken scripts are often responsible.
Common Causes
- Syntax error in the
.htaccessfile, - Unsupported Apache directive,
- PHP error in a file,
- Broken plugin or theme,
- Incorrect file permissions,
- Exhausted storage space,
- Faulty redirect loop.
Quick Test if .htaccess is Suspected
- Open the File Manager.
- Enable hidden files.
- Locate the
.htaccessfile in the affected directory. - Rename it as a test, for example to
.htaccess-test. - Try accessing the website again.
- If the website works again, the error is likely within the
.htaccessfile.
For WordPress, you can then resave the permalink structure in the admin area under Settings > Permalinks, so that WordPress recreates the required rules.
Checking Error Logs
If the cause is not obvious, error logs can help. There are often files named error_log in the affected directory or in subfolders.
- Open the File Manager.
- Search for
error_log. - Open the file if it is not too large.
- Check the most recent entries.
- Look for file paths, plugin names, theme names, or PHP error messages.
If an error_log file is very large, it can also cause storage space issues. It can generally be deleted, but it will be recreated if the error persists.
Quick Overview
| Error | Meaning | Common File/Folder Cause |
|---|---|---|
| 403 | Access denied. | Permissions, missing startup file, access protection. |
| 404 | File or URL not found. | Missing file, incorrect path, faulty redirect. |
| 500 | Internal server error. | .htaccess, PHP errors, permissions, storage space. |
Safe Diagnostic Workflow
- Note when the error first started occurring.
- Check if files were modified, deleted, or uploaded shortly before.
- Check the affected folder in the File Manager.
- Verify startup files, file paths, and permissions.
- Enable hidden files and check the
.htaccessfile. - Check
error_logfiles. - If necessary, restore a backup.
When Should a Backup be Used?
If a file was accidentally deleted or a configuration was corrupted, restoring from a backup can be useful. Especially in the following cases:
.htaccesswas incorrectly modified,index.phpwas overwritten,- A theme or plugin folder was corrupted,
- Files were accidentally deleted,
- The website stops working after an upload.
If possible, restore only the specific affected file or folder rather than the entire account unnecessarily.
Best Practices for Prevention
- Always create a backup copy before making changes.
- Modify
.htaccessrules only step-by-step. - Upload files to the correct document root.
- Ensure correct startup files are in place.
- Avoid insecure permissions such as
777. - Do not delete unknown system or CMS files.
- Check the website in your browser after every upload.
403, 404, and 500 errors often have causes related to files and folders: missing files, incorrect paths, broken
.htaccess rules, wrong permissions, or PHP errors. With the cPanel File Manager, disk space checks, error logs, and backup restoration, many causes can be targeted and narrowed down.If you cannot safely find the cause or if a file needs to be restored, CURIAWEB support will be happy to assist you with the error analysis.
Create Support Request