# Create Redirect Rule

Please follow the steps below to create a redirection rule based on a visitor's country:

* Open the **GeoIP app**
* On the Dashboard - click on **Create Rule - Country Redirect**&#x20;

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

### Step 1: General Settings

* **Rule Name**: Enter a name for your rule.
* **Countries**: Select the countries to which the rule should apply.

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

### Step 2: Redirect Settings

* **Destination URL**: Enter the URL where visitors should be redirected.
* **Store Name**: Provide the name of the destination store.
* [**Relative Redirect**](/geoip-country-redirect/country-redirect/relative-redirect.md) (Optional):

  Enable this if you want to retain the same path/URL structure during redirection.

  [Learn more about Relative Redirect and Language Consideration](/geoip-country-redirect/country-redirect/relative-redirect/language-consideration-with-relative-redirect.md)

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

{% hint style="info" %}
**Note**: If you are redirecting to a **subfolder or the same domain URL**, the redirection will occur **only once per browser session**.\
**Example**: If you redirect U.S. visitors to `/en-us` (Subfolder), redirect will trigger only once per session.
{% endhint %}

### Step 3: Redirect Type

Choose one of the following redirection types:

* **Display-Based Redirection**:\
  Shows a popup/banner allowing visitors to choose whether to stay or redirect.
* **Auto Redirection**:\
  Automatically redirects visitors to the destination without any prompt.

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

{% hint style="info" %}
If you choose **Display-Based Redirection**, you can:

* Choose from existing templates, or
* Create a new one.

[How to create, clone and delete a template?](/geoip-country-redirect/country-redirect/create-clone-and-delete-template.md)
{% endhint %}

## Step 4: Whitelist

Exclude specific IP addresses (only [Public IPv4 supported](https://whatismyipaddress.com/)) or URLs from redirection.&#x20;

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

[Click here to learn more about rule-based whitelisting](/geoip-country-redirect/country-redirect/rule-based-whitelisting.md)

{% hint style="info" %}
If you want to whitelist for all rules, you need to enable the global whitelist setting and add the required IP addresses or URLs in the global whitelist setting

Go to **Settings** → [**Global Whitelist Settings**](/geoip-country-redirect/general-settings/global-whitelist-settings.md)
{% endhint %}

## Step 5: Advanced Settings

This setting consists of 3 functionalities:

* [**UTM Parameters**](/geoip-country-redirect/country-redirect/utm-parameters-in-the-geoip-country-redirect.md): You can add the parameters manually in the app for tracking or activate the Enable UTM Forward to forward existing custom parameters (e.g., tracking parameters from ads) to the destination store.
* [**Page Specific Redirection**](/geoip-country-redirect/country-redirect/page-specific-redirection.md): With this feature, you can activate the page-specific redirection to trigger redirection from specific pages in the store.
* [**URL Mapping**](/geoip-country-redirect/country-redirect/url-mapping.md): With this feature, you can redirect users from an old URL to a New URL, if the old URL page is not available in the store.

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

The rule is now created in the app and is ready for use.

<figure><img src="/files/6BSxCnT4cNET1wa4kp1C" alt=""><figcaption></figcaption></figure>

In case of any queries, please feel free to reach out to <help@spicegems.com>


---

# 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-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.
