Afiahost Since 2008
Hosting Pricing Crypto Countries Guides Resources
0 Shopping Cart
  • Home
  • Store
    • Browse All
    • Shared Hosting For Website
    • Register a New Domain
  • Announcements
  • Knowledgebase
  • Network Status
  • Affiliates
  • Contact Us
  • More
  • Account
    • Login
    • Forgot Password?
  1. Portal Home
  2. Knowledgebase
  3. Security
  4. How to ban any IP Address via .htaccess?

  Categories

E-mail
4
Backup/Restore
4
Control Panel (Cpanel)
1
DNS - Nameserver
6
Databases
11
Domain Management
10
Domains
20
Email
11
FTP
9
Hosting
4
Installing a Control Panel
6
Mail Filters & SPAM
8
Mobile
11
Others
3
SSL
5
Security
10
SiteWorx (Control Panel)
60
Softaculous
79
SolusVM
19
Wordpress
17
cPanel - Control Panel
24

  Categories

  Support

My Support Tickets
Announcements
Knowledgebase
Downloads
Network Status
Open Ticket

How to ban any IP Address via .htaccess? Print

  • 0

If someone is trying to hack your website or you want to block their IP Address, you can add this line to your .htaccess file.


order allow,deny
deny from IP-ADDRESS
allow from all


Replace "IP-ADDRESS" with the IP Address you want to block.


Was this answer helpful?

Related Articles

How to protect your website's images from an external website? External Website can use < img /> tag to display an image from your site somewhere else on... How to disable directory browsing using .htaccess? For security purposes, we recommend that you to disable directory browsing on your website so no... How to protect your .htaccess file? For security purpose we recommended you to prevent access to your .htaccess file from... How to restrict directory access by IP address? In order to secure your admin area from hackers, we recommended you to allow access only from... How to blacklist an IP Address to deny it access to your website? You can lock directory with a password by using cpanel "Password Protected Directories" option.1....
« Back

  Support

My Support Tickets
Announcements
Knowledgebase
Downloads
Network Status
Open Ticket
Afiahost

Crypto-first web hosting for developers and founders. Pay with Bitcoin, USDT, USDC, ETH or Litecoin and get cPanel, free SSL and a 99.9% uptime SLA.

Hosting

  • Shared Hosting Plans
  • Compare Plans
  • Start an Order

Crypto

  • All Crypto Pages
  • Bitcoin Hosting
  • USDT Hosting
  • USDC Hosting

Client Area

  • My Services
  • My Invoices
  • Open Ticket
  • Knowledgebase
  • Contact Us

Company

  • Countries
  • Guides
  • Resources
  • Terms of Service
PAY WITH: ₿ ₮ $ Ξ Ł Β ◎

© 2026 Afiahost.com. All rights reserved. · support@afiahost.com


Loading...
Loading...
Choose language
العربية
Azerbaijani
Català
中文
Hrvatski
Čeština
Dansk
Nederlands
English
Estonian
Persian
Français
Deutsch
עברית
Magyar
Italiano
Macedonian
Norwegian
Português
Português
Română
Русский
Español
Svenska
Türkçe
Українська

Choose Currency

$ USD
Rs. INR

Generate Password

Enter a number between 12 and 64 for the password length.