CityHost.UA
Help and support

What is a 403 site error?

 21629
26.04.2019
article

403 Forbidden is one of the most common errors that occurs on almost all sites, regardless of what engine they run on or what technologies they use. If you've been running a blog, online store, or portal for at least a few months, it's very likely that you've encountered such a problem. Read on to find out what 403 Forbidden is, how to fix this error, and what are the three main reasons why it appears.

What does a 403 error mean on a website? Error 403 Forbidden is an HTTP status code indicating that the server has received the request but refuses to allow access due to a lack of necessary permissions.

This error occurs when a user tries to access a resource with restricted access. It can result from server configuration settings, IP address blocking, or missing authorization if the resource is password-protected. It may also appear if the server prevents directory content from being viewed without an index file.

Reasons for the appearance of error 403 on the site

The 403 Forbidden error occurs when access to a resource is restricted due to permission issues. This can happen if files or directories are configured incorrectly or if the server blocks users based on their IP address or region. Often, this error arises when access requires authorization, but the user has not provided or has entered incorrect credentials. Access can also be restricted due to web server settings or the .htaccess file. If there is no index file present, the server may prevent viewing the contents of a directory. In some cases, the administrator temporarily restricts access during maintenance or due to server overload. Another reason may be malfunctions of plugins and add-ons of your CMS.

How to fix 403 error on WordPress

So now you know what 403 forbidden means and to fix this error, first connect to the website via FTP using FileZilla. And then...

Re-create .htaccess

This file, which is located in the root directory of the site, specifies the Apache server settings. For example, rules for 301 redirects, forwarding from http to https and many others. .htaccess has its own syntax, errors in which can cause a 403 Forbidden Error to appear.

To recreate this file, do the following:

  1. In the lower left window of the FTP client, select the place on the computer where you want to download .htaccess, and in the lower right - click on this file with the right mouse button (right mouse button) and select "Download". You have backed up .htaccess and can now safely proceed with the next steps.
  2. Delete .htaccess from the server by clicking on it in the right window of the PCM FTP client and selecting "Delete".
  3. Go to WordPress Workshop and select Settings > Permalinks. Click the Save Changes button at the bottom of the page.

If the 403 error is gone after doing these steps, the problem was a corrupted .htaccess. If the problem is not solved, read on.

Change access rights

Another common reason why 403 Forbidden appears is incorrectly defined access to files and folders on the site. This can happen for various reasons and does not depend on which type of site hosting is chosen - a virtual server or shared hosting. To resolve this issue, follow these steps:

  1. Right-click on the root directory in the upper right window of the FTP client and select "File Attributes...".
  2. In the "Numeric value" line, write 755 or 750, select the "Project to subdirectories" checkbox, select the "Apply to directories only" radio button, and click "OK".
  3. Repeat point 1.
  4. In the "Numeric value" line, write 644 or 640, select the "Project to subdirectories" checkbox, select the "Apply to files only" radio button, and click "OK".
  5. Right-click on the wp-config.php file (located in the root directory) in the lower right window of the FTP client, select "File permissions...", enter 440 or 400 in the "Numeric value" field and click OK.

If the problem has not disappeared, it may be due to incorrect operation of WordPress plugins.

Read also : What are keywords and how to choose them .

Deactivate plugins

Bugs in WordPress plugins or their incompatibility with the current version of the engine can cause Error 403 to appear. Here's how to fix a 403 site error caused by problems with engine plugins:

  1. Navigate to the wp-content directory using an FTP client and rename the plugins directory to plugins-stop. By renaming this folder, you will disable all WordPress plugins.
  2. Go to the site and check if the 403 error has disappeared. If so, the problem was really hidden in one of the plugins. To determine which one, follow these steps.
  3. Rename the plugins-stop directory to plugins and change to it. In this directory, you will see a list of all installed WordPress plugins. Rename the first one by adding -stop to the end of the folder name, go to the site and check if the 403 error is gone. If not, rename the directory of the second plugin in the list in the same way. Check again if the error is showing on the site. Repeat the renaming process until the 403 Forbidden disappears.
  4. Delete the last renamed directory with the plugin files by right-clicking on it and selecting Delete.
  5. Revert to the original plugin directory names by removing the -stop prefix.

Was the publication informative? Then share it on social networks and join our Telegram channel. We remind you that the hosting company CityHost provides inexpensive hosting services for sites of any complexity. For technical questions, contact us via online chat or by phone ?? 0 800 219 220.


Like the article? Tell your friends about it:

Author: Bohdana Haivoronska

Journalist (since 2003), IT copywriter (since 2013), content marketer at Cityhost.ua. Specializes in articles about technology, creation and promotion of sites.