> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.ex2.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to ban any IP address via htaccess?

# Here's how to ban any IP address via htaccess

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.](https://help.ex2.com/en/article/what-is-the-htaccess-file-and-what-is-it-used-for-1mgswq0/?bust=1784826921560)

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


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