# IP address keys

Locksmith supports permitting visitors based on their IP address.

## Setup

Start by opening the settings for a lock you've created. Then, follow the steps shown to add a key that permits "if the customer has a certain IP address", as shown below:

![](/files/neHoZ8M8Q3reNiuWSaSg)

![](/files/HQZFUJyWzOnSCxGgR92Q)

This key can be configured with a series of IP addresses, one given per line. It can also be configured with CIDR definitions, allowing you to specify entire subnet ranges.

## Notes

This key condition can be inverted, resulting in a condition that permits *unless* the visitor has a certain IP address. When used with a lock on your entire online store, this is a useful way to block certain visitors.

To accomplish this, invert the key condition, as shown below by clicking on the checkbox next to "invert". (To learn more about inverting conditions, see [Inverting keys in Locksmith](/keys/more/inverting-conditions-in-locksmith.md).)

![](/files/8hOP1QHkv9FJbCfPYZLn)

Because of the way IP address detection works, a IP address key on your entire store will show *everyone* a spinner graphic for a moment, before your store's content is loaded. This will only happen once, if the visitor has an accepted IP address.

{% hint style="danger" %}
**Important**: When used, this key condition has the potential to negatively affect the SEO of any content that is locked in this way. [More information on SEO and Locksmith here](/faqs/more/how-does-locksmith-affect-search-engines-and-seo.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.locksmith.guide/keys/more/ip-address-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
