We provide premium cPanel hosting!
  • Contact
  • View Cart (0)
  • Client Area
Company Logo
  • Domains
    Register Domain
    Your very own website address
    Transfer Domain
    Move your domain to TNG Web Hosting

    Hundreds of customer's around the world trust TNG Web Hosting to manage their domain. We provide freedom and control including full access & the ability to move/sell your domains.

  • Web Hosting
    Shared Hosting
    Premium cPanel web hosting

    We provide a wide range of services for your business including Web Hosting, Dedicated Servers, VPNs & more.

  • Company
    Company
    Learn more about TNG Web Hosting
    Why Choose Us
    The reasons why to choose us
    Testimonials
    Lots of feedback from our customer's
    Announcements
    Get up to date with the latest news

    Learn more about what makes TNG Web Hosting the best choice for web hosting services.

  • Support
    Contact Form
    Contact our pre-sales department
    Submit Ticket
    Contact our support via ticket
    Knowledgebase
    View our vast documentation

    If you have a pre-sale question or issue with your website we are here to help.

  • Order

Knowledgebase

Portal Home > Knowledgebase > Security > How to ban any IP Address via .htaccess?

  Categories

Backup/Restore
4
Cloudflare (cPanel)
9
CloudLinux (cPanel)
10
cPanel - Control Panel
24
Databases
11
DirectAdmin
48
DNS - Nameservers
6
Domain Management
10
Email
17
FTP
9
Installing a Control Panel
6
Mail Filters & SPAM
8
Mobile
11
Others
3
PayPal
7
Plesk
47
Security
10
SiteWorx (Control Panel)
61
Softaculous
76
SolusVM
19
SSL
5
Virtualizor
19
WHM
18
WordPress
17

  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 disable directory browsing using .htaccess? For security purposes, we recommend that you disable directory browsing on your website so no one... How to protect your .htaccess file? For security purposes, we recommend you to prevent access to your .htaccess file from... How to restrict directory access by IP address? To secure your admin area from hackers, we recommend that you allow access only from a selected... How to protect a folder with username and password in cPanel? You can lock a directory with a password by using the cPanel Password Protected Directories... How to blacklist an IP Address to deny it access to your website? You can lock directory with a password by using the cPanel Password Protected Directories...
« Back

Powered by WHMCompleteSolution

  Support

My Support Tickets
Announcements
Knowledgebase
Downloads
Network Status
Open Ticket
900+ people trust us!
Join them today
Our Partners
Services
  • Shared Hosting
Domains
  • Register Domain
  • Transfer Domain
Company
  • Company
  • Why Choose Us
  • Testimonials
  • Announcements
Support
  • Contact Form
  • Submit Ticket
  • Knowledgebase
About Us
TNG Web Hosting provides premium web hosting, domain registration & security services to businesses and people around the world.more
HQ: Ledyard, CT USA
sales@tngweb.host
LEI: 9845009ER7E4FEF4EC17
TNG Web Hosting © 2025 | All rights reserved
  • Terms Of Service
  • Acceptable Usage Policy
  • Privacy Policy
PayPal logo
Credit Card logo
GoGetSSL logo

Loading...
Loading...

Generate Password

Please enter a number between 8 and 64 for the password length
 
Live Help