Blocking an IP from your Website: Difference between revisions
Docs admin (talk | contribs) (test) |
Docs admin (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This demo will show you how to block an IP from your Website through your cPanel. The ability to deny an IP address access to your site allows webmasters greater control over the security of their site. IP blocking could be useful for: | |||
* Blocking IPs where past security attacks have originated from | |||
* Banning unwanted visitors | |||
* Blocking email harvesters | |||
Once blocked, visitors (or robots) originating from a blocked IP will not be sent any pages, images, or files from your account. | |||
Once blocked, visitors (or robots) originating from a blocked IP will not be sent any pages, images, or files from your account. | |||
[1] Locate and click the "IP Deny Manager" icon under the "Security" section of your cPanel | {{video|/swffiles/cPanel/blockip/blockip.html}} | ||
[2] Enter the IP address you wish to block in the "IP Address or Domain" field | [1] Locate and click the "IP Deny Manager" icon under the "Security" section of your cPanel | ||
[3] Click the "Add" button to block the IP address from accessing your website | [2] Enter the IP address you wish to block in the "IP Address or Domain" field | ||
==== | [3] Click the "Add" button to block the IP address from accessing your website | ||
== How it Works == | |||
< | |||
deny from | cPanel allows you to block IP addresses by adding the following line to the .htaccess files located within your directory: | ||
replacing | <syntaxhighlight lang="bash">deny from IPADDRESS</syntaxhighlight> | ||
< | |||
deny from 255.255.255.255< | replacing IPADDRESS with the actual IP address you specified in the "IP Address or Domain" field. We blocked the IP 255.255.255.255 in the video demo, so the line that was added to the .htaccess files located in our example account's directory was: | ||
<syntaxhighlight lang="bash">deny from 255.255.255.255</syntaxhighlight> | |||
[[Category:cPanel]] |
Latest revision as of 14:38, 3 October 2012
This demo will show you how to block an IP from your Website through your cPanel. The ability to deny an IP address access to your site allows webmasters greater control over the security of their site. IP blocking could be useful for:
- Blocking IPs where past security attacks have originated from
- Banning unwanted visitors
- Blocking email harvesters
Once blocked, visitors (or robots) originating from a blocked IP will not be sent any pages, images, or files from your account.
[1] Locate and click the "IP Deny Manager" icon under the "Security" section of your cPanel
[2] Enter the IP address you wish to block in the "IP Address or Domain" field
[3] Click the "Add" button to block the IP address from accessing your website
How it Works
cPanel allows you to block IP addresses by adding the following line to the .htaccess files located within your directory:
<syntaxhighlight lang="bash">deny from IPADDRESS</syntaxhighlight>
replacing IPADDRESS with the actual IP address you specified in the "IP Address or Domain" field. We blocked the IP 255.255.255.255 in the video demo, so the line that was added to the .htaccess files located in our example account's directory was:
<syntaxhighlight lang="bash">deny from 255.255.255.255</syntaxhighlight>