This is a HTTP error occurred due to denied access to any particular file or folder that trying to access.And in other way,it is an HTTP status code,(i.e) that accessing the page or resource you were trying to reach is absolutely forbidden due to some reason.
HTTP 403 forbidden Error is a general issue indicating that the web server received and understood your request, but cannot take a further action to response it.It’s common to meet this problem when surfing on the Internet or running a website 403 Forbidden is a simple HTTP status code appeared when you cannot successfully access a web page. It shows that you don’t have the permission to access on the server.

Appearance of 403 Error:

Different web browsers will display 403 Forbidden Error in different ways.

The following are the few common browser errors.

“403 Forbidden”

“Forbidden: You don't have permission to access file/folder on this server.

“HTTP 403”

 

Forbidden

Causes for 403 forbidden error:

The forbidden error 403 is caused by corrupt of .htaccess file.

Permissions of files or directory.

Fixing the HTTP 403 Forbidden Error:

The 403 Forbidden Error indicates that your website files have incorrect permissions. Every file/directory of your website have an individual settings that controls who is allowed to read, write,and execute specified file/directory.When you create new file or folder, default permissions are automatically applied which can be changed later on.

The HTTP 403 Forbidden error is caused by limited access to a web domain or directory. Administrators can limit access to a web domain's directory by removing the anonymous user or requiring a password to view the content of the location.

Once permissions are set, browsers to the domain will be able to access and read files normally again.

The following steps will fix the above 403 HTTP forbidden error,

  • Fix the Corrupted .htaccess File.
  • Check and Modify the File Permissions.
  • Clear Cache and Cookies.
  • Deactivate Your Plugins and Themes.

Allow/Deny Access to Your Website Files using .htaccess.

Web pages are nothing but the files which you are hosted in your web server. There are many possibilities to restrict the users to access the URL'S of your website. You can also restrict the end user from accessing the website and can limit access to few files/folders instead of giving full permissions.

There are few options which can be done using .htaccess

  • Need to deny from everywhere expect from where you access your website files. It will shoot 403 forbidden error when anyone access the website from other IP's.
  • Deny all the IPS with a few exceptions from viewing your website and website files. Here you can allow few IP's and gives permission to access.
  • Allow all IPS to view your website and website files. This is the default action for every website.
  • Deny all IP's from viewing ".jpeg" files on a website. It disallows .jpeg files to access from elsewhere.

Few websites which were authenticated by default and any end user try to access with no password it will throw 403 Forbidden Error. Basically, these settings can be updated in .htaccess or else you can set this from your cPanel too.

Updates in .htaccess file.

Deny access to entire website from all IP’s except from one (1.1.1.1)

Allow from 1.1.1.1
Deny from all

Deny access to all .html files from all IPS except 1.1.1.1 

<FilesMatch ".html$">
Allow from 1.1.1.1
Deny from all
</FilesMatch>

Deny access to all .html, .htm, .txt, .jpg, .jpeg files from all IPS except 1.1.1.1

<FilesMatch ".(html|htm|txt|jpg|jpeg)$">
Allow from 1.1.1.1
Deny from all
</FilesMatch>

Allow access from everywhere except from one IP

Deny from 1.1.1.1

We can done by using this in control panel and the image is shown below,
In that control panel go to the file manager and click public_html  there we can find the folder named .htaccess.
By editing the file (follow the above steps) we can solve the error.

 

Permissions of Files or Directory:

Check and Modify the File Permissions.

There are three types of permissions
Read
Write
Execute
File permissions can be determined and set through FTP client or from cPanel. At cPanel, you would see file permissions in the form of numbers as follows.

7 ==> Read + Write + Execute
6 ==> Read + Write
5 ==> Read + Execute
4 ==> Read Only
3 ==> Write + Execute
2 ==> Write Only
1 ==> Execute Only
0 ==> Access Denied

Permissions Explanation

777 (Not Recommended)

Owner :: READ(4) + WRITE(2) + EXECUTE(1) ==>7
Group :: READ(4) + WRITE(2) + EXECUTE(1) ==>7
World :: READ(4) + WRITE(2) + EXECUTE(1) ==>7

755 (Subfolders)

Owner :: READ(4) + WRITE(2) + EXECUTE(1) ==>7
Group :: READ(4) + EXECUTE(1) ==>5
World :: READ(4) + EXECUTE(1) ==>5

750 (Public_html)

Owner :: READ(4) + WRITE(2) + EXECUTE(1) ==>7
Group :: READ(4) + EXECUTE(1) ==>5
World :: 0

644 (All files)

Owner :: READ(4) + WRITE(2)==>6
Group :: READ(4)==>4
World :: READ(4)==>4

444 (Read Only)

Owner :: READ(4)==>4
Group :: READ(4)==>4
World :: READ(4)==>4

Clear Cache and Cookies:

If we have already fixed this 403 error. However, the error may still exist due to the browser cookies and cache data. In this case, you need to clear them to make sure that your method truly takes effects.

In addition, if your website is powered by a cache plug-in for the performance improvement, you’d better delete all the cached pages and turn off the caching function for a while.

Deactivate Your Plugins and Themes:

Here, you need to know that some compatibility issues and the faulty settings of your plug-ins and themes may also cause the 403 error. In this case, you should deactivate all of them to figure out whether this error lays on this aspect. If the 403 error disappears, you can start the boring task of picking up the real trouble maker.

Here, to deactivate your plug-ins and themes altogether, you simply need to locate your plug-in folder and theme folder using the File Manager or the FTP. After that, you can change their names to anything you like. This way, Word Press cannot find your plug-ins and templates so as to result in the deactivation.

By follow all the above steps we can easily fix the 403 forbidden error.

Thanks for viewed the article.To know more about troubleshoot common Apache issues click here.