You can block access to a directory with a password using the "IP Blocked" cPanel.

1. Sign in to your cPanel account.

2. In the "Security" section, click the "IP Blocker" icon.

![](http://34.207.224.239:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdkpOIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--63043d2896e03482569b23b27f4eb87f0fb09698/image%20(17).png)

3. In "Add an IP or range" you must enter the IP address you want to block.

![](http://34.207.224.239:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdlJOIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--0ca3d2796f58c4d6cce790bc8c96bdbf712f2071/image%20(18).png)

**Then click the "Add" button.**

**Examples of use:**

**Unique IP address: 192.168.0.1**

**Range: 192.168.0.1-192.168.0.40**

**Default range: 192.168.0.1-40**

**CIDR format: 192.168.0.1/32**

*Implies 10..*. — 192.*

I hope I have helped!