Articles in this section

Is it possible to block access to website for specific locations through .htaccess file in Plesk?

kb: how-to Plesk for Linux ABT: Group A

Applicable to:

  • Plesk for Linux

Question

Is it possible to block access to website for specific locations through .htaccess file in Plesk?

Answer

It only possible to limit access for specific IP addresses added item by item to the .htaccess file, but not to the whole country.

  1. Get list of IP addresses that are needed to be blocked.
  2. Create .htaccess file through Plesk > Domains > example.com > File Manager > New > Create File:
    12.JPG
  3. Open the created file and add the following lines:

    CONFIG_TEXT: order deny,allow
    deny from <IP address from the list>
    deny from <IP address from the list>
    deny from <IP address from the list>
    allow from all

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.