What-does-ERROR-403-Forbidden-Mean-and-how-to-Fix-it-

What does Error 403 mean and how to fix it

If you are visiting this article, it means you have come across this error and probably wondering what is error 403 and how to fix it? There are multiple reasons why a webpage throws an error 403. 

What-does-ERROR-403-Forbidden-Mean-and-how-to-Fix-it

When you see this error, it means the webpage or content you are trying to access is forbidden for you because:

  1. The website owner does not want you or anyone at your access level to see this content.
  2. The website owner unknowingly set up this content restricted because of incorrect settings.

Before we dive deeper into their solutions, we need to know what is “error 403 forbidden”, what does an “error 403” look like, the technical causes of error 403, and how can you fix it?

What does error 403 mean

Error 403 means that the content or the webpage you are trying to access is forbidden for you because the website owner did not permit you to access it. 

NOTE: IF YOU ARE NOT THE WEBSITE OWNER, THERE IS PRETTY MUCH NOTHING YOU CAN DO ABOUT IT. TRY REFRESHING YOUR PAGE. SOMETIMES IT FIXES THE PROBLEM BUT IF IT DOES NOT, CONTACT THE WEBSITE OWNER.

How does an error 403 look like

Web servers like Apache, Nginx, Lightspeed, etc have their way or displaying an error message.

Below are some examples:

  1. Error 403
  2. Forbidden 403
  3. Error 403 – Forbidden
  4. Forbidden – You don’t have permission to access “/” on this server
  5. 403 Forbidden – Access to this resource on this webserver is denied!
  6. 403 Forbidden – You don’t have permission to access on this webserver

Technical causes of Error 403 and their fix

A browser throws an error 403 because of these issues

  1. Incorrect .htaccess file setup
  2. Incorrect file permission
  3. Plugin error (for WordPress)
  4. Missing index.html or index.php file

These are some common issues that throw a 403 -forbidden error. Now let’s how can you fix them

Incorrect .htaccess file Setup

Sometimes when updating or changing the .htaccess file can cause problems and your website displays an error 403 error. It is important to backup your .htaccess file before making any changes to prevent unnecessary web errors.

If you have made in changes in your .htaccess file, restore the file from the backup you took. If you do not have a backed-up file, delete the .htaccess file from your FTP client or cPanel. It doesn’t matter which one you choose.

# Error 404 Redirection Begins 
ErrorDocument 404     /error1.php
# Error 404 Redirection Ends

# HTTPS redirection Begins
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://server99s.com/$1 [R=301,L,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"
# HTTPS Redirection Ends

Method 2:

Don’t have any .htaccess file backup? Don’t worry, you can just delete the .htaccess file from your website and leave it as it is. It fixes the problems but can remove the settings like page redirection, and HTTP to HTTPS redirection, etc.

Simply look for the file and delete it. If you want to recreate the file using WordPress follow the steps below

  1. Go to WordPress Dashboard
  1. Open WordPress Permalinks
  1. Don’t change anything unless you have to
  2. Click on submit button

It will recreate the .htaccess file for you with WordPress settings. 

Cannot find the .htaccess file? Here’s how you can do it

Incorrect file permissions

Incorrect file permissions can lead your finely working website to an error 403. Every file and folder has a set of permission that you can adjust according to your needs.

There are some files that only you or other admins should see, you have to set the website permission in a way that it does not restrict you and the other admins but visitors are other users are forbidden.

In some cases, admins set the public file permissions to private and your website throws an error to the website users.

To fix it, set the permissions like this.

For admin-only files

$chmod 644 .htaccess

For Public Audience

$chmod 777 index.php

This setup follows a certain chmod permission code system. Read more about chmod permission codes here.

Plugin Error (WordPress users)

If you are using WordPress to manage your website, it can cause a lot of trouble to find and fix the 403 error if it is caused by a plugin.

In any case, you can manually disable the plugins or follow this step to disable them all at once.

  1. Go to the website file manager
  2. Look for the directory where you have saved your WordPress folder
  3. Navigate to wp-content/plugins and change the name of the folder plugin to something else. (ex. disabled-plugins)
  1. Now open your browser and try to open your website again. If it works then you can manually enable every plugin one by one and remove the faulty one.

Missing index.html or index.php file

When an index.html or index.php (depends on your website framework) page is removed or changed, your browser throws an error 403 forbidden. 

It is caused by the permission of that directory. If you do not want to display the data inside of that directory, you can change the permission and keep the index.php or index.html file for others to visit.

If you want others to see this data without any front-end page, you can change the permissions of the files to the public.

Final Words

Multiple simple issues can cause Error 403 forbidden and the fix is even easier. You must know what does error 403 mean and how can you fix it if you are running a website because nobody likes interruptions especially your visitors. Hope this tutorial worked for you. Let me know in the comments. Good Luck.

Help us Grow | Share on your social Media

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *