Monitors are live: get a webhook when any Shopify store changes a price, sells out, or starts a promo

[ BLOG ]

All posts

Research ·

How to Find a Shopify Store's myshopify.com Domain

Every Shopify store keeps a permanent myshopify.com address behind its custom domain. Three ways to find it, and what you can do with it once you have it.

Every Shopify store has a permanent address that ends in .myshopify.com, assigned when the store is created. To find it for a store with a custom domain, open the store in a desktop browser, open the developer console and type Shopify.shop. The console prints the myshopify address, for example example-store.myshopify.com. If the console is blocked, search the page source for myshopify.com and you'll find the same value.

Why the myshopify domain is useful

Custom domains change. A brand rebrands, moves from .co to .com, or opens a new country site, and its old domain starts redirecting somewhere else. The myshopify address is set when the store is created and stays with the store for its whole life, even if the merchant changes every custom domain they own.

That makes it the best key for a store in your own data:

  • Deduplicating lists. Two rows with different custom domains that share one myshopify address are the same store.
  • Following a store through a rebrand. When a domain stops resolving, the myshopify address still identifies the store.
  • Telling separate stores apart. A brand with country sites on Shopify Plus often runs a separate store per country, each with its own myshopify address. Same brand, different stores, different catalogs.

What you need

  • A desktop browser with developer tools.
  • The store's public address.
  • For a list of stores, a script or an API key.

Steps to find it

  1. Open the store's home page in your browser.
  2. Open the developer console (F12, or Cmd+Option+J in Chrome on a Mac).
  3. Type Shopify.shop and press Enter.
  4. Copy the value it prints. That is the myshopify domain.
  5. If the console shows an error, view the page source (Ctrl+U or Cmd+Option+U) and search for .myshopify.com.
  6. Confirm the result by opening https://<value> in a new tab. It should redirect to the store's main domain.

Step 1: use the Shopify object

Every Shopify storefront page defines a global Shopify object. Its shop property holds the myshopify address.

javascript
// In the browser console, on any page of the store
Shopify.shop
// "example-store.myshopify.com"

This is the quickest and most reliable method, because the value comes from Shopify itself rather than from something a theme developer wrote.

Step 2: search the page source

When an extension or a content security policy stops you from using the console, the same value is in the HTML. View the source and search for myshopify.com. You'll usually find it in an inline script that sets Shopify.shop = "example-store.myshopify.com", and sometimes in links to the store's checkout or in app scripts that pass the shop name as a parameter.

If you find more than one myshopify address in the source, the first one inside the Shopify object is the store's own. Others can belong to apps or to an embedded product from a different store.

Step 3: confirm it

Open the myshopify address in a new tab. A live store with a custom domain redirects you to that domain. That confirms the two addresses belong to the same store. A password page means the store exists but isn't open to the public, and an error page that says the store is unavailable usually means it has closed.

Doing it for many stores

The manual method takes about a minute per store. With hundreds of domains, fetch each home page and extract the value with a regular expression, or use an API that already resolves it.

ShopLens returns myshopifyDomain on every store profile, next to the primary domain. You can send either the custom domain or the myshopify address to look a store up.

typescript
const domains = ["example-store.com", "example-store.co.uk"];

for (const domain of domains) {
  const response = await fetch(
    `https://data.shoplens.dev/api/v1/shops/${domain}`,
    { headers: { Authorization: `Bearer ${process.env.SHOPLENS_API_KEY}` } },
  );
  if (response.status !== 200) {
    console.log(domain, response.status);
    continue;
  }
  const shop = await response.json();
  console.log(domain, "->", shop.myshopifyDomain, shop.domain);
}

If a domain redirects to another store's main domain, the API returns that store, so you can spot old domains in your list. A 202 means the store hasn't been looked up yet and the request should be repeated after the Retry-After delay. Each successful lookup costs one credit; the docs describe every status.

Storing it in your CRM or database

Once you have the address, a few conventions save trouble later:

  • Normalize it. Store it in lowercase, without https:// and without a trailing slash, so Example-Store.myshopify.com/ and example-store.myshopify.com match.
  • Make it unique. Put a unique constraint on the column. Imports that would create a duplicate store then fail loudly instead of quietly adding a second row.
  • Keep the history of custom domains. When a store changes its domain, add the new one and keep the old one in a separate table with dates. Emails and links in your records that point at the old domain still make sense later.
  • Re-check closed stores. If the myshopify address starts showing an "unavailable" page, mark the store as closed and stop sending it to sales.

These rules matter most when several tools feed the same database, such as a scraper, a CRM import and an enrichment API, because each one tends to write the domain in a slightly different form.

What the myshopify domain doesn't tell you

The address is an identifier, not a description. It doesn't reveal the plan, the size or the owner. The subdomain is often the store's original name, which can be a useful clue when a brand has since renamed itself, but it can also be a random string or the name of a project that was abandoned. For the plan, see how to tell if a store is on Shopify Plus. To make sure a site is on Shopify before you go looking for its myshopify address, see how to check if a website is built on Shopify.

Finding it for a password-protected store

A store that hasn't launched shows a password page, but the page is still served by Shopify and still defines the Shopify object. The console method works the same way. That's useful for spotting brands before they open: a new custom domain that answers with a Shopify password page is a store being built.

Common mistakes

  • Taking the address from an embedded product. Blogs and marketplaces that embed Buy Buttons include the selling store's myshopify address, which belongs to that store and not to the page you're on.
  • Assuming one brand has one store. Brands with separate country stores have one myshopify address per store. Check each country site.
  • Storing only the custom domain. If you keep one column in your CRM, make it the myshopify domain. Keep the custom domain as a second column for display.

How to check it worked

You have the right address when opening https://<myshopify domain> redirects to the store you started from, and Shopify.shop on that store prints the same value. Save it next to the custom domain and the date you checked, and you have a key that will still match the store after its next rebrand.

[ GET STARTED ]

Start building on Shopify data

Get an API key and make your first store lookup in a few minutes.