# Auto-Redirect

## 1. Enable Auto-Redirect

**Redirect visitors to relevant markets according to their country**

* When enabled, visitors are automatically redirected to the appropriate Shopify Market based on their **IP address**.
* The redirect also applies the **local currency and language** configured for that market.

**Use case:**\
Ideal for stores operating multiple regional markets with different languages or currencies.

## 2. Include or Exclude Countries for Auto-Redirection

You can control which countries should trigger auto-redirection.

#### Options

* **Include**\
  Redirects will apply **only** to the countries listed.
* **Exclude**\
  Redirects will apply to **all countries except** those listed.

#### Country Input Field

* Enter one or more country names.
* **If left empty,** auto-redirect applies to **all countries**.

## 3. Language-Based Redirection

Choose how the visitor's language is determined.

* **Always redirect to the market’s default language:**: Redirects to the market’s default language, regardless of browser settings.
* **Automatically switch the visitor’s language according to the browser’s preferred language**: Redirects based on the browser’s language preference and the visitor's location (for individual markets).
* If no matching Shopify market (locale) exists, redirection will not occur.

<figure><img src="https://2119731643-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lo5KC5Ta6Fs1-alV4Av%2Fuploads%2FEMfZ6EYugSDOtt4q2jQU%2FAR-1.png?alt=media&#x26;token=a9d98cd7-b349-45ec-9653-1cf2319f4572" alt=""><figcaption></figcaption></figure>

## **4. Redirect Behavior:**

Define when redirection occurs.

* **Redirect when necessary**: Redirects only if the visitor lands on an incorrect market (language/currency).
* **Force redirect every time**: Always redirects to the correct market, even if the visitor tries to switch markets.
* **Redirect once**: Redirects only on the first visit.

<figure><img src="https://2119731643-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lo5KC5Ta6Fs1-alV4Av%2Fuploads%2Fj2pkrxafGUxycNReHA1m%2FAR-2.png?alt=media&#x26;token=6357d5bd-5588-4474-89c1-c347f4592de4" alt=""><figcaption></figcaption></figure>

### **Filter By URLs**

Apply auto-redirects to specific URLs.

* **Include**: Trigger redirection only on the listed URLs.
* **Exclude**: Do not trigger redirection on the listed URLs.

<figure><img src="https://2119731643-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lo5KC5Ta6Fs1-alV4Av%2Fuploads%2FvXIauTBIZzsGo0AXHOCM%2FAR-3.png?alt=media&#x26;token=85cc6963-c4d4-4972-97f5-5dc709cf6cb6" alt=""><figcaption></figcaption></figure>

### **Filter by Params:**

Apply auto-redirects based on URL parameters.

* **Include**: Trigger redirection only for the listed parameters.
* **Exclude**: Do not trigger redirection for the listed parameters.

### **Retain Behaviour:**

Retains included or excluded parameter settings in browser cookies for **24 hours**

<figure><img src="https://2119731643-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lo5KC5Ta6Fs1-alV4Av%2Fuploads%2F6x3rf53szi9JU7mH3vfz%2FAR-4.png?alt=media&#x26;token=d8e9cef3-b2a8-42fb-b7ec-8ae1f0d23cb1" alt=""><figcaption></figcaption></figure>

**Need Help?**\
For assistance, contact us at **<help@spicegems.com>**.
