# Exception-Based Redirect Rule

An Exception-Based Redirect Rule allows you to redirect visitors from all countries except specific countries.&#x20;

For example, if you want to redirect all visitors to the global store except **Canadian visitors**, you can create an exception based rule with all other countries except Canada.

For an exception-based redirect rule, [create a redirect rule](/geoip-country-redirect/country-redirect/create-redirect-rule.md), and add all the visitor countries except the country that you don't want to redirect.

In the below snapshot, we have created a rule and added all countries in the "**Visitors Country**" except Canada.

### 1. Add all countries

<figure><img src="/files/lW3f43co6CRmPHolGJPb" alt=""><figcaption></figcaption></figure>

### 2. Remove countries that you don't want to redirect

Not added Canada

<figure><img src="/files/7PYsIcE2WcYd1sZ6ATua" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In the app, you can add alpha-2 codes to add multiple countries in bulk:

To add the countries in the rule, you need to add **alpha-2 country codes** in **comma-separated** (e.g., `US, UK, FR, DE`).

* You can find the [alpha-2 codes for all countries here](/geoip-country-redirect/general-settings/alpha-2-country-codes.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://help.spicegems.com/geoip-country-redirect/country-redirect/create-exception-based-redirect-rule.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.
