---
title: How to Ban Any IP Address via htaccess
description: "If you want to block an IP Address, you can add the below lines to your htaccess file. ```markup order allow, deny deny from IP-ADDRESS allow from all ``` Replace **IP-ADDRESS** with the IP you want to block."
url: "https://www.aeserver.com/support/how-to-ban-any-ip-address-via-htaccess/"
updated: "2025-01-05"
category: htaccess Tutorials
---

# How to Ban Any IP Address via htaccess

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

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

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