Troubleshooting 403 / 404 / 500 errors

Marc

Last Update 23 days ago

If you own or manage a website, you've likely encountered errors such as 403, 404, or 500. 


Here’s a quick explanation of each, along with troubleshooting tips to help resolve these common issues.


403 Error (Forbidden)

A 403 error means that the server is blocking access to a page or resource on your website. The web server is essentially saying, "Sorry, you're not allowed to do that or look at that".

This often happens because the permissions or access settings are incorrect.

THINGS TO CHECK:


  • File Permissions
  • the site's 'htaccess' file


FILE PERMISSIONS
Ensure that your files and directories have the correct permissions. Typically, directories should be set to '755' and files should be set to '644'.


1. Login to cPanel.


2.
Navigate to your 'File Manager'
(see here for if you're not sure how to access your File Manager)


3.
 Select the file by right-clicking, and then click 'Change Permissions'

4. If the file permission is not set to 644, you can adjust it by selecting the correct checkboxes as shown in the screenshot. After making the necessary changes, click 'Change Permissions' to save them.

5. If multiple folders and files are affected, you can open a support ticket, and we'll be happy to assist you in fixing the issue.

6. If the file and folder permissions are now correct, try opening your website again to see if the issue is resolved.


CHECKING THE HTACCESS FILE

A misconfigured .htaccess file may be blocking access. You can reset it by renaming it to something like .htaccess.bak and then checking if the issue is resolved.


1. Login to cPanel.

2. Navigate to your 'File Manager'
(see here for if you're not sure how to access your File Manager)

3. If the .htaccess file is not visible in your file manager dashboard, check the 'Settings' located in the upper right corner of the screen. (Skip this step if the .htaccess file is already visible.)

4. After clicking 'Settings' a preference pop-up window will appear. Ensure the 'Show Hidden Files' checkbox is checked, then click 'Save'.  (Skip this step if the .htaccess file is already visible.)

5. Right-click on the file, then select 'Rename'.

6. You can now rename your .htaccess file to .htaccess2 or any name you prefer.

7. You can now test your site again to see if the issue is resolved. Alternatively, create a new .htaccess file in your file manager, right-click on it, and select 'Edit.' Copy and paste the default WordPress .htaccess content below. Once done, check your site again to see if the issue has been resolved.


404 Error (Not Found)

A 404 error happens when your web browser tries to visit a page but can't find it on the website. This might occur if the page has been deleted, if there's a mistake in the web address, or if a link on a website points to the wrong page.

THINGS TO CHECK:

  • Check the URL
    Ensure the URL is typed correctly and points to the correct file/page.

  • Check for missing Files
    Navigate to your 'File Manager(see here if you're not sure how to access your File Managerto check if the page exists in the right directory. If not, upload the missing files.

  • Check for any redirects
    If the page has been moved, ensure your .htaccess file includes proper redirects to the new location. You can set up redirects in cPanel under Redirects. Follow this guide to set up your redirect: How to redirect a domain.


500 Error (server side)

A 500 error means something went wrong on the server side, preventing it from handling the request.

IMPORTANT NOTE:

This does not necessarily mean there is an error or something wrong with your server, simply that the server was not able to complete the task that was asked of it.


Possible causes include; exceeding resource limits, server overload, script issues, or incorrect configurations


THINGS TO CHECK:


  • Check the site's 'htaccess' file
  • PHP version / settings
  • File Permissions


CHECK THE HTACCESS FILE


A misconfigured .htaccess file may be blocking access. You can reset it by renaming it to something like .htaccess.bak and then checking if the issue is resolved.


1. Login to cPanel.

2. Navigate to your 'File Manager'
(see here for if you're not sure how to access your File Manager)

3. If the .htaccess file is not visible in your file manager dashboard, check the 'Settings' located in the upper right corner of the screen. (Skip this step if the .htaccess file is already visible.)

4. After clicking 'Settings,' a preference pop-up window will appear. Ensure the 'Show Hidden Files' checkbox is checked, then click 'Save'.  (Skip this step if the .htaccess file is already visible.)

5. Right-click on the file, then select 'Rename'.

6. You can now rename your .htaccess file to .htaccess2 or any name you prefer.

7. You can now test your site again to see if the issue is resolved. Alternatively, create a new .htaccess file in your file manager, right-click on it, and select 'Edit.' Copy and paste the default WordPress .htaccess content below. Once done, check your site again to see if the issue has been resolved.


PHP VERSION / SETTINGS


Ensure that your website is running on a compatible version of PHP.  Follow this guide to learn how to change your PHP versionHow to change the active PHP Version

FILE PERMISSIONS


Ensure that your files and directories have the correct permissions. Typically, directories should be set to 755 and files should be set to 644.

1. Login to cPanel.

2. Navigate to your 'File Manager'
(see here for if you're not sure how to access your File Manager)

3. Right-click the file or folder, and select Change Permissions.

4. If the file permission is not set to 644, you can adjust it by selecting the correct checkboxes as shown in the screenshot. After making the necessary changes, click 'Change Permissions' to save them.

5. If multiple folders and files are affected, you can open a support ticket, and we'll be happy to assist you in fixing the issue.

6. If the file and folder permissions are now correct, try opening your website again to see if the issue is resolved.

Still need help? Message Us