> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.omegatheme.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Auto-detect location & Zipcode validity

![](https://storage.crisp.chat/users/helpdesk/website/-/8/3/8/3/8383e5404a31c000/image_md9f8l.png)

This guide explains how to configure the **Geolocation and Validity** settings in the General Settings tab to optimize the behavior of rules based on the visitor’s location.
## **Auto-detect Zipcode/Country**
* **Purpose**: Automatically detects the zipcode or country of your website visitors to apply rules with location-based conditions.
* **Behavior:**
    * **Toggle On**: Enable this feature to allow the system to identify and use the visitor’s location automatically.
    * **Toggle Off**: If disabled, location detection will not occur, and location-based rules may show for all visitors.
### **Only Display Rules for the Detected Location**
* **Purpose**: Restricts the display of rules to only those that match the visitor’s detected location.
* **Behavior**:
    * When **Enabled**, only rules matching the visitor’s location will be shown, ensuring relevance. Rules without location conditions will still be displayed globally.
    * When **Disabled**, display all rules regardless of the visitor’s location.
## **Require Valid Zipcode to Add to Cart**
* **Purpose**: Enforces zipcode validation before customers can add products to their cart.
* **Behavior**:
    * When **Enabled**, customers must enter a valid zipcode if the product is associated with location-based rules. Invalid zipcodes will prevent products from being added to the cart.
    * When **Disabled**, the cart does not validate the zipcode, and products can be added without location restrictions.