How To Allow or Block Visitors From Specific Countries on Your Shopify Store Without App
I’ve written an article to list all the best Shopify Country Blocker apps. And I’ve also written another article to guide you on how to use one of these best apps to prevent visitors from certain countries from entering your Shopify store. But if you don’t want to use the Shopify app to build this feature, then this article is for you.
This article will guide you on how to allow or block visitors from specific countries on your Shopify store manually.
Follow these steps to build the country blocker feature for your Shopify store:
Step 1: Go to the page via URL: https://www.huratips.com/tools/index.php?page=country-blocker
Step 2: If you want to block any country, you only need to click the country name from the Allowed Countries collum to switch it to the Blocked Countries column. Next, you fill out blocked messages in the fields below.
Step 3: Click on to Get Code button to generate the embed code.
Step 4: Embed the code received in step 3 to your Shopify store.
- Copy the above codes.
- From your Shopify admin, go to Online Store > Theme.
- Find the theme you want to edit and then click Action > Edit code.
- In the Layout section, click theme.liquid to open the file in the online code editor.
</head>and paste code just above it.
- Save and you’re done!
I hope this article is helpful to you.