My website shows an error code, how to fix it?

Error codes are shown because of internal configuration issues within your account. The first step is to check the "Logs" section in your Plesk panel and it should show the reason for returning an error code.

403 Forbidden
The server will not allow the visitor to access the requested file. If a visitor sees this code in error, check the file's permission settings and your .htaccess file. In some cases, you will have to check your .htaccess file to see it contains anything specific to cPanel. If you see something like below, it has to be removed from your .htaccess file.

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
 
404 Not Found
The server could not find the file that the visitor requested. This error commonly occurs when a URL is mistyped. This can also happen due to issues in your .htaccess file. Please make sure you have a valid .htaccess file and it has the required rewrite rules. If you do not have an .htaccess file in your public directory, you just have to visit "Settings" > "Permalink" and save. It will re-generate the .htaccess file. The other option is to manually create your .htaccess file - https://wordpress.org/support/article/htaccess/#basic-wp
 
ModSecurity Errors
ModSecurity is a web application firewall (WAF) that helps to protect your website from various attacks. Any website that calls a string forbidden by a ModSecurity rule will give a 4XX (i.e. 403, 404, etc.) error instead of displaying the page.
 
Step 1:
The first step is to check the "Logs" section in your Plesk panel to understand if the error page is due to a ModSecurity rule. If it is due to a ModSecurity rule, you have to check the triggered script path to ensure it is;
  • Not compromised/infected by Malware
  • From an authentic theme/plugin
  • Using the latest version

Step 2:

If you use an uncommon/unauthentic/nulled/poorly developed plugin or a theme, ModSecurity rules can be triggered due to vulnerabilities of it which is common to poorly developed scripts/themes/plugins. You have to remove the vulnerable script/theme/plugin. You should also make sure to clean up any unused/test themes and plugins without leaving them installed.

Step 3:

If the issue remains the same, you have to revert the change that you have introduced just before started seeing the errors.

If none of the above steps help to resolve the issue, please open a technical support ticket with;

  • the exact error/s shown in logs
  • the actions (above steps) that you have done to resolve the issue
  • the change that you have introduced just before started seeing the error codes
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to get the full advantage of Managed WordPress Hosting offered by Provider.lk?

Provider.lk uses centralized management tools to optimize, manage, secure multiple WordPress...

How to install WordPress?

Your package comes with "WordPress Toolkit" extension that allows you to instantly install...

How to install a free SSL for my website?

Provider.lk offers free SSLs with Plesk based Managed WordPress hosting packages powered by Let's...

How to find settings to configure an email client?

It's highly recommended to the webmail service (webmail.yourdomain.com) that comes with your...