Is it possible in Shopify to have URL redirects based on geolocation? I’m not talking about redirecting browsers to a local store. I’m talking about having a MyStore.com/Link redirect to different products based on where the browser is at.
Topic summary
Geolocation-based redirects within a single Shopify store—sending one URL to different products/pages depending on visitor location—are feasible. The request is specifically to route MyStore.com/Link to different products by geography, not just switch to a local storefront.
Implementation options:
- Shopify built-in: Uses Markets/multi-currency to auto-route by IP to market-specific URLs. Best for localized storefront versions, not fine-grained per-product redirects.
- Third-party apps: Offer granular rules by country/state/city and page.
• GeoIP Country Redirect: Automatic redirects with complex rule sets.
• Geolocation Express Redirect: Redirects or suggests alternate URLs.
• MOD: GeoLocation Redirect: Country-based redirects, can append/preserve URL paths. - Custom coding: Theme JavaScript plus geolocation/IP APIs for maximum control; requires development effort.
Key takeaways: Third-party apps are the easiest path for page/product-level redirects; built-in features are limited to market localization; custom code suits complex needs.
Status: Question answered with actionable approaches; no disagreements or unresolved issues noted.
Hi @JonathanDun
Yes, it is possible to set up URL redirects based on geolocation in Shopify, even for redirecting to different products or pages within the same store based on the visitor’s location.
There are a few ways to achieve this:
- Using Shopify’s built-in geolocation features:
Shopify provides some basic geolocation capabilities as part of its multi-currency features. You can set up market-specific URLs for different countries/regions and Shopify will automatically redirect visitors to the appropriate URL based on their IP address. However, this is more suited for redirecting to localized versions of your store.
- Using third-party Shopify apps:
There are several apps in the Shopify App Store that specialize in geolocation-based redirects, such as:
-
GeoIP Country Redirect: Allows automatically redirecting customers to specific pages based on their location. Supports complex redirect rules.
-
Geolocation Express Redirect: Enables redirecting traffic to specific URLs based on geographic location. Provides options to automatically redirect or suggest URLs to visitors.
-
MOD: GeoLocation Redirect: Lets you redirect users to a specific URL based on their country location. Allows appending URL paths after the redirect.
These apps provide more flexibility in setting up custom redirect rules for different pages, products or collections based on the visitor’s country, state or city.
- Custom coding:
If you have access to edit your Shopify theme code, you can implement geolocation-based redirects programmatically using JavaScript and geolocation APIs. This provides the most control but requires development knowledge.
In summary, while Shopify’s built-in features are more suited for multi-regional stores, using third-party apps is the easiest way to set up granular URL redirects to different pages/products within the same store based on visitor location.
Custom coding is also an option for more complex implementations.