> ## Documentation Index
> Fetch the complete documentation index at: https://perfgrid.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# GeoIP Blocking

> Challenge or block website visitors by country or ASN for a domain in hosting-panel.net.

**GeoIP Blocking** is a tab on **Domains**, next to **Domains**, **Subdomains**, **Redirects**, and **Password Protection**. Rules apply to website traffic (HTTP/HTTPS) only, not mail, FTP, or SSH.

Match visitors by **country** or **ASN** (the network behind their IP). Each rule has its own action:

* **Captcha (recommended)** — LiteSpeed shows a captcha (ALTCHA). The visitor can continue to the site after they pass it.
* **Block** — the request is refused with **403 Forbidden**.

Prefer **Captcha** unless you are sure you want to lock people out. Block can also catch customers on VPNs or mobile networks.

Selecting several countries or ASNs at once creates **one rule per value**.

## Exceptions

These requests skip Captcha and Block:

* Paths under `/.well-known/` (used for SSL issuance)
* Search-engine crawlers, including Googlebot, bingbot, DuckDuckBot, Pinterest, Applebot, facebookexternalhit, Twitterbot, LinkedInBot, Slurp, Baiduspider, and YandexBot

## Add GeoIP rules

<Steps>
  <Step title="Log in">
    Log in to your hosting panel at [hosting-panel.net](https://hosting-panel.net).
  </Step>

  <Step title="Open GeoIP Blocking">
    Go to **Domains**, then **GeoIP Blocking**.

    Filter by **Domain** (or leave **All domains**) and search by code if you already have rules, for example `NL` or `AS13335`.

    <Frame>
      <img src="https://perfgrid-guides.s3.eu-west-par.io.cloud.ovh.net/MJ9L9AuEUIU3AK3vRTMN0VCBm.png" alt="GeoIP Blocking tab with an empty rules table, Add GeoIP rules button, and Top countries" style={{ borderRadius: '0.5rem' }} />
    </Frame>
  </Step>

  <Step title="Open Add GeoIP rules">
    Click **Add GeoIP rules**.
  </Step>

  <Step title="Choose source, action, and match">
    Set **Source Domain**. **All domains** creates the same rules for every domain and subdomain **currently** on the account. Domains you add later are not included.

    Set **Action** to **Captcha (recommended)** or **Block**.

    Set **Match** to countries or ASNs. For countries, select one or more, or paste codes such as `CN, RU`. For a specific ASN that does not appear in search, enter it as `AS12345`.

    <Frame>
      <img src="https://perfgrid-guides.s3.eu-west-par.io.cloud.ovh.net/cOWdsPYjT4R6h77nUnPXEmBMx.png" alt="Add GeoIP rules form with All domains, Captcha recommended, and country Czechia selected" style={{ borderRadius: '0.5rem' }} />
    </Frame>
  </Step>

  <Step title="Create the rules">
    Click **Create GeoIP rules**. Each selected country or ASN becomes its own row.

    On the overview, switch a row between **Captcha** and **Block** without deleting it.

    <Frame>
      <img src="https://perfgrid-guides.s3.eu-west-par.io.cloud.ovh.net/SxOk1iLAzFxmJsJUJPwzWIn3Q.png" alt="GeoIP Blocking overview with a country rule for Czechia set to Captcha" style={{ borderRadius: '0.5rem' }} />
    </Frame>
  </Step>
</Steps>

## Top countries

Below the rules table, **Top countries** lists which countries sent the most requests. Results are cached for **one hour**. Choose a **Window** (for example **Last 24 hours**) and click **Show top 50**.

Use this list to decide which countries to challenge or block.

## Related articles

* [Password Protection](/docs/grid-hosting/domains/password-protection)
* [SSL certificate status](/docs/grid-hosting/domains/ssl-certificate-status)
* [How do I make a redirect?](/docs/grid-hosting/domains/how-do-i-make-a-redirect)
* [Access logs](/docs/grid-hosting/logs/access-logs)
