---
title: "Blocking an IP address on your Joomla website "
date: 2020-04-26
description: "If you want to block an IP address, you can do so in the .htaccess file or with a security extension such as Akeeba Admin Tools PRO."
author: "Jeroen Moolenschot"
---

# Blocking an IP address on your Joomla website 

It is, of course, possible to deny a particular IP address access to your Joomla website.

 Reasons could be:

 
- Someone is trying to hack your website.
- Someone is copying content from your website.
- Someone links to images or other media on your website.
- Someone attacks your website with many requests.
- Someone continuously spamming your website.

 You can address this in several ways.

 
## Blocking an IP address with Akeeba Admin Tools PRO

 You can block an IP address using an extension such as the PRO version of [Akeeba Admin Tools](https://www.akeebabackup.com/products/admin-tools.html).

 Using the Web Application Firewall, you can also automate things. For example, you can have a particular IP address blocked after X number of failed login attempts. (Note that you could potentially also be blocked yourself if you don't add your IP address to the Whitelist).

 
## Blocking an IP address in the .htaccess file

 You can block an IP address by adding it to the .htaccess file.

 - Connect to your website via FTP  
- Download the file named .htaccess  
- Add the following lines to the .htaccess file:

 `order allow,deny`  
`deny from 12.34.567.890`  
`allow from all`

 If you are being attacked by multiple IP addresses, you can add as follows

 `order allow,deny`  
`deny from 12.34.567.890`  
`deny from 12.34.567.891`  
`allow from all`

 Now let's assume you are being attacked by a range of IPs, for example all IPs starting with 12.34.567, here is what you need to do:

 `order allow,deny`  
`deny from 12.34.567`  
`allow from all`

 Now the question remains: how do you know what the IPs are that are spamming you? You check your logs and see if there are repeated requests from the same IP address.


## Custom Fields

**Call2Action Titel:** Need professional security?

**Call2Action Tekst:** Are you unsure about which IPs to block, or do you find editing server files too technical? I would be happy to take care of the security of your Joomla site for you.

