Shopify - Can I use subdomains for each language?

In this article, you’ll learn how to configure subdomains for the translated versions of your Shopify website.


⚠️ Note: You don’t need the Weglot App for the subdomain-based integration. If you already have it installed, you can safely delete it from your Shopify dashboard > Apps.

1) Create your Weglot account

Go to https://dashboard.weglot.com/register and create your account with your email and password.

2) Create your first project

Enter a name for your project (for example, the name of your website) and choose Shopify as the technology.

3) Choose your languages

Select your original website language and the languages you want to translate your website into.

4) Configure your subdomains

In this step, you’ll connect Weglot to your website using your DNS records.

  1. Enter your domain URL.
  2. Choose the publish destination.
  3. Select ”Subdomains” as the URL type.

  1. Add one DNS record per translated language and click ”Check DNS”.
  • If your domain is managed by Shopify: follow this Shopify tutorial
  • If your domain is managed by a third-party provider (Cloudflare, GoDaddy, 1&1, etc.), log in to your provider’s DNS settings and add your entries there.

⚠️ Note: Weglot doesn’t manage the DNS propagation time. The subdomain-based integration configuration can take up to 24 hours, although it's usually much less. During this time, the translated versions of your website may not be available.

5) [Important] Add the JS code to your theme.liquid file

Adding the JS code into your theme.liquid file will display a language switcher on your website, so your visitors will just have to select the language to switch between your subdomains.

This will also add your hreflang tags to improve the SEO of your translated pages and the way they will be indexed.

How to add it:

  1. Go to your Weglot Dashboard > Project > Setup settings
    • Copy the JavaScript snippet provided (it should look similar to the one displayed there)

  1. In Shopify Admin:
    • Navigate to Online Store > Theme > Actions > Edit code
    • Select your theme.liquid file
    • Paste the JS code right before the closing </head> tag
    • Click Save
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us