Geolocation Redirect from Shopify to non-Shopify Website

Geolocation Redirect from Shopify to non-Shopify Website

1 0 0

We are looking to redirect users from our Shopify website to a third-party non-Shopify website based on their location, using the appropriate domain for that location. 


As an example: 

We saw third party apps that could somehow do this, but will these work from Shopify to non Shopify website?

  1. GeoIP Country Redirect - Redirect and Block Visitors based on Geolocation. | Shopify App Store
  2. MOD: GeoLocation Redirect


Reply 1 (1)

Shopify Partner
551 17 39



Geolocation API with JavaScript to Shopify theme (theme.liquid) may help


Example of javascript code



    // Replace with your chosen geolocation API endpoint and API key
    const geoApiUrl = '';

        .then(response => response.json())
        .then(data => {
            const userCountry = data.country_code2; // Get the country code from the response
            if (userCountry === 'AU') {
                window.location.href = '';
            } else if (userCountry === 'NZ') {
                window.location.href = '';
            // Add more conditions for other countries as needed
        .catch(error => {
            console.error('Error fetching the geolocation data:', error);


Hope this will help or if you still need help you can contact us 

Click here to Contact and Get Shopify Store Help
E-mail -
We are Shopify Experts in India
Google My Business - Ecommerce Small Task