Blocking an IP from your Website: Difference between revisions
Docs admin (talk | contribs) |
Docs admin (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 19: | Line 19: | ||
== How it Works == | == How it Works == | ||
cPanel allows you to block IP addresses by adding the following line to | 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> | <syntaxhighlight lang="bash">deny from IPADDRESS</syntaxhighlight> | ||
replacing IPADDRESS with the actual | 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> | <syntaxhighlight lang="bash">deny from 255.255.255.255</syntaxhighlight> | ||
[[Category:cPanel]] | [[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>