Why am I seeing this page?
A 404 response means the requested file could not be located. If you have already uploaded it, the filename may be misspelled or the file may sit in a different directory.
Other Possible Causes
Images can also return a 404 error when Hot Link Protection is enabled and the requesting domain is not included in the list of authorized domains.
If the same error appears when you visit your temporary URL (http://ip/~username/), the rule set inside an .htaccess file may be the cause. Try renaming that file to .htaccess-backup and reloading the site to see whether the problem clears up.
Another possibility is that your document root was accidentally deleted, or your account may need to be recreated. In either case, contact your web host right away.
Running WordPress? Check the section below on 404 errors that appear after clicking a link in WordPress.
How to find the correct spelling and folder
Missing or Broken Files
Whenever a 404 error appears, check the URL you are trying to open in your browser. That URL tells the server which resource it should try to request.
http://example.com/example/Example/help.html
In this example, the file needs to be located in public_html/example/Example/
Note that CaSe matters in this example. On platforms that enforce case-sensitivity, example and Example point to different locations.
With addon domains, the file must live in public_html/addondomain.com/example/Example/, and the names are case-sensitive.
Broken Image
If an image is missing from your site, you may see a box with a red X in its place. Right-click that X and select Properties. The properties will reveal the path and filename that cannot be found.
This differs from browser to browser. If no box with a red X appears, right-click the page, choose View Page Info, and open the Media tab.
http://example.com/cgi-sys/images/banner.PNG
In this example, the image file must be placed in public_html/cgi-sys/images/
Again, CaSe matters here. On platforms that enforce case-sensitivity, PNG and png refer to different locations.
404 Errors After Clicking WordPress Links
In WordPress, 404 Page Not Found errors often appear after a new theme is activated or after the rewrite rules in the .htaccess file have been changed.
If a 404 error shows up in WordPress, you have two ways to correct it.
Option 1: Correct the Permalinks
- Log in to WordPress.
- From the left-hand navigation menu in WordPress, click Settings > Permalinks (Note the current setting. If you are using a custom structure, copy or save the custom structure somewhere.)
- Select Default.
- Click Save Settings.
- Change the settings back to the previous configuration (before you selected Default). Put the custom structure back if you had one.
- Click Save Settings.
This resets the permalinks and resolves the issue in many cases. If it does not work, you may need to edit your .htaccess file directly.
Option 2: Modify the .htaccess File
Place the following code snippet at the top of your .htaccess file:
# 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 your blog shows the wrong domain name in links, redirects to another site, or is missing images and styling, these issues usually share one cause: the wrong domain name is configured in your WordPress blog.
How to modify your .htaccess file
The .htaccess file holds directives (instructions) that tell the server how to behave in certain situations and directly affect how your website works.
Redirects and URL rewriting are two of the most common directives in a .htaccess file, and many scripts such as WordPress, Drupal, Joomla and Magento add their own directives so those scripts can function.
At some point you may need to edit the .htaccess file for various reasons. This section explains how to edit the file in cPanel, but not what should be changed. (You may need to consult other articles and resources for that information.)
There are Many Ways to Edit a .htaccess File
- Edit the file on your computer and upload it to the server via FTP
- Use an FTP program's Edit Mode
- Use SSH and a text editor
- Use the File Manager in cPanel
For most people, the simplest way to edit a .htaccess file is through the File Manager in cPanel.
How to Edit .htaccess files in cPanel's File Manager
Before making any changes, back up your website so you can revert to a previous version if something goes wrong.
Open the File Manager
- Log into cPanel.
- In the Files section, click on the File Manager icon.
- Check the box for Document Root for and select the domain name you wish to access from the drop-down menu.
- Make sure Show Hidden Files (dotfiles)" is checked.
- Click Go. The File Manager will open in a new tab or window.
- Look for the .htaccess file in the list of files. You may need to scroll to find it.
To Edit the .htaccess File
- Right click on the .htaccess file and click Code Edit from the menu. Alternatively, you can click on the icon for the .htaccess file and then click on the Code Editor icon at the top of the page.
- A dialogue box may appear asking you about encoding. Just click Edit to continue. The editor will open in a new window.
- Edit the file as needed.
- Click Save Changes in the upper right hand corner when done. The changes will be saved.
- Test your website to make sure your changes were successfully saved. If not, correct the error or revert back to the previous version until your site works again.
- Once complete, you can click Close to close the File Manager window.