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

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

  • Web Hosting
    Web Hosting
    Reliable and fast hosting
    Web Design
    Hire LDR Design Agency to build your website

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

  • Extras
    Website Security
    Keep your website safe & secure
    SEO Tools
    SEO report with optimization steps
    Professional Email
    Powerful email and productivity
    SocialBee
    Manage your social media
    LDR PBX
    A professional phone system

    Enhance your website with these extras including our website backup & security services.

  • Company
    LDR Web Hosting
    Learn more about LDR Web Hosting
    Announcements
    Get up to date with the latest news

    Learn more about what makes LDR 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 Block Any IP Address via an htaccess Rule

  Categories

Backup/Restore
4
cPanel - Control Panel
24
Databases
11
DNS - Nameservers
6
Domain Management
10
Email
17
FTP
9
Mail Filters & SPAM
8
Mobile
11
Others
3
PayPal
7
Security
10
Softaculous
69
SSL
5
WordPress
17

  Categories

  Support

My Support Tickets
Announcements
Knowledgebase
Downloads
Network Status
Open Ticket

How to Block Any IP Address via an htaccess Rule Print

  • 0

If you want to block an IP Address, you can add the below lines to your htaccess file.

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

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


Was this answer helpful?

Related Articles

How to Password Protect a Directory in cPanel You can lock a directory with a password using the cPanel's Directory Privacy. 1. Log in to your... How to Disable Directory Browsing Using the htaccess Rule For security purposes, you should disable directory browsing on your website so no one can see... How to Protect the htaccess File You can prevent unauthorized access to your htaccess file by adding this rule to the file: #... How to Restrict Access to Directories by IP Address To secure your admin area from hackers, you should only allow access to your admin directory from... How to Block an IP Address to Deny Access to Your Website You can blacklist an IP Address to deny access to your website.1. Log in to your cPanel account....
« Back

Powered by WHMCompleteSolution

  Support

My Support Tickets
Announcements
Knowledgebase
Downloads
Network Status
Open Ticket
People trust LDR Web Hosting
Join them today
Services
  • Web Hosting
  • Web Design
Extras
  • Website Security
  • SEO Tools
  • Professional Email
Domains
  • Register Domain
  • Transfer Domain
Company
  • LDR Web Hosting
  • Announcements
Support
  • Contact Form
  • Submit Ticket
  • Knowledgebase
9624 Cincinnati Columbus Rd Suite 210
sales@ldrwebsites.com
+1-513-926-9560
Follow LDR Web Hosting
LDR Web Hosting Facebook
LDR Web Hosting Twitter
LDR Web Hosting Google
LDR Web Hosting LinkedIn
LDR Web Hosting © 2025 | All rights reserved

Loading...
Loading...

Generate Password

Please enter a number between 8 and 64 for the password length
LDR Web Hosting Facebook
LDR Web Hosting Twitter
LDR Web Hosting Google
LDR Web Hosting LinkedIn