Hostinger 403 Forbidden Error & How to Fix It

 

1. Check the .htaccess File

You may not be familiar with the .htaccess file, as it often remains hidden in the site directory. However, if you use Hostinger File Manager, the file is available in your public_html directory by default. 

Follow these steps to locate it:

  1. Find the File Manager on the hPanel dashboard.
  2. Open the public_html directory to find the .htaccess file.
  3. If you use cPanel, follow these steps:

    1. Locate File Manager on cPanel.
    2. In the public_html directory, look for the .htaccess file.
    3. If you can’t find the file, click on Settings on the top-right corner of the screen and enable the Show Hidden Files (dotfiles) option.
    4. Try accessing your website. If it works fine, this indicates that the file was corrupted.
    5. To generate a fresh .htaccess file, log in to your WordPress dashboard and click on Settings -> Permalinks.
    6. Without making any changes, click the Save Changes button at the bottom of the page.
    7. Open up the file in your preferred text editor (such as TextEdit or Notepad). Change the name back to .htaccess, and replace all the text in the file with the following snippet:
    8. # BEGIN WordPress
      
      RewriteEngine On
      RewriteBase /
      RewriteRule ^index.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]
      
      # END WordPress
  4. link 1 -
  5. link2

Post a Comment

0 Comments