How Can We Help?
Print

Blocking IP Addresses From Accessing Websites in Plesk

1. Log into your Plesk control panel

2. Go to the “Files” menu item on the left hand side

3. Go into the folder that holds the website files for the website you want to add the protection to

4. Go to “More” then “View Options”

5. Make sure that “Show system files and directories” is ticked

6. If a file named “.htaccess” doesn’t already exist, click on the “+” button and select “Create File” from the drop down.

7. Name the file .htaccess and leave the “Use the HTML template” unticked

8. Press OK

9. Click on the file and press “Edit in Code Editor” or “Edit in Text Editor”

10. If you want to block access to your entire website, add the following line of code:

Deny from 123.123.123.123

Replace the 123.123.123.123 with the IP address that you want to block

If you want to block access to a singular page, use the following lines of code:

<Files "page.php">
deny from 123.123.123.123
</Files>

Once again replacing the 123.123.123.123 with the IP address you wish to block

11. Press the OK button to save and close the file