Skip to Content
StarsellDocs
Markets

Markets by URL and domain

How the address a visitor opens decides their market and language - market paths, language segments, a domain's default market, binding markets to domains, canonical links, and what the visitor's country does and doesn't change.

Starsell picks a visitor's market and language from the address they open, nothing else. The same link always opens the same market, for every visitor and every search engine. The visitor's country can only suggest another market.

How the address decides

For every page, Starsell reads the address in this order:

  1. A market's path. The first segment after the store's address names a market: /eu. It only counts on a domain that market is allowed on.
  2. The domain's default market. Without a market path, the domain's root opens in the market you set as its default on the Domains page.
  3. The primary market. Everything else: the free address's root, and domains without a default market.

Then the language:

  • The market's default language needs no segment: /eu opens in it.
  • Its other languages follow the market's path: /eu/de.
  • The market at an address's root takes them straight: /en.

Language segments are the language's code in lowercase: /de, /pt-br, /zh-cn.

An address that names a market or language this address doesn't have is a page not found. So is a language the market doesn't offer: /eu/it when Europe has no Italian.

An example

A store my-store with:

  • Israel, the primary market: Hebrew by default, English too.
  • Europe: euros, path eu, English by default, German and French too.
  • Two domains: shop.example.com (no default market) and example.de (default market: Europe).
AddressMarketLanguage
/s/my-storeIsraelHebrew
/s/my-store/enIsraelEnglish
/s/my-store/euEuropeEnglish
/s/my-store/eu/deEuropeGerman
shop.example.comIsraelHebrew
shop.example.com/eu/frEuropeFrench
example.deEuropeEnglish
example.de/deEuropeGerman
example.de/euEuropeEnglish

Israel has no path, so it doesn't answer on example.de. Give the primary market a path if you want it reachable on a domain that opens in another market.

The page's own path comes after: example.de/de/products/oil is the product page in Europe, in German.

Market paths

Set a market's path in its editor, under Address > Path:

  • Lowercase letters, digits and dashes, 1 to 30 characters, no dash at either end: eu, fr, wholesale.
  • Two markets can't share a path.
  • A path can't be one of the storefront's own pages: account, api, cart, checkout, checkouts, collections, orders, pages, policies, products, robots, s, search, sitemap.
  • A path answers on every domain the market is allowed on, and always on the free address.

Leave the path empty for a market that only answers at the root of a domain whose default it is.

Paths that look like languages

If one market's path is also the code of a language the root market offers (a market at /de while Israel offers German), the path wins: /de opens that market, and the root market's German only answers under its own path, if it has one. Pick paths that aren't language codes you use.

A domain's default market

A domain's default market is the market its root opens in. Set it on Domains: each address has a Default market picker once the store has more than one market. Options marked off can't be picked.

  • A domain without one opens in the primary market. Picking the primary is the same as picking none.
  • A domain always allows its default market, even if that market is limited to other domains.
  • Several domains can share a default market.
  • When a domain's default market is turned off, the domain opens in the primary market and the picker says Off: serves the primary. Deleting the market puts the domain back on the primary for good.

A typical setup is one domain per country: example.co.il for Israel, example.de for Germany, each opening in its own market at the root.

Binding a market to domains

By default a market answers on every domain. To keep it to some of them, open the market and under Address > Domains pick Only some domains, then tick the domains.

  • The free address always has every market.
  • The market's default domains stay ticked: a market always answers on a domain whose default it is.
  • Domains not connected yet are listed with "not connected yet".
  • Pick at least one domain, or let it answer on all of them.

The primary market always answers on every domain.

Removing a domain can widen a market

When you remove a domain, markets limited to it stop naming it. A market that was limited to only that domain then answers on every domain again.

What search engines see

Each market and language gets one canonical address, which every page names:

  1. The root of a connected domain whose default market it is (the primary domain first).
  2. Else its path on a connected domain (the primary domain first).
  3. Else the free address.

Pages also list every market and language as alternates (hreflang). A market's languages are tagged with each of its countries, such as de-DE and de-AT; the primary market's, and those of a market without countries, also get the bare language (de). The primary market's default language is x-default.

Search engines and link previews are never redirected and never see the market banner.

The visitor's country

When a visitor's country is in another market than the address put them in, Settings > Markets > Visitors from another market's country decides what happens:

OptionWhat visitors get
Suggest their market (the default)A small banner: "Looks like you're in Germany. Shop in the Europe store (EUR)?" Switch goes to that market's address on the same page, Stay keeps them where they are. Either way the choice is remembered and the banner doesn't come back.
Redirect automaticallyA visitor's first page view goes straight to their market's address, once, with a temporary redirect. After that the address they open decides. No banner.
Do nothingVisitors stay on the address they opened. The country picker in the store still lists every market.

The visitor's country comes from the hosting edge (the hosting panel's, Cloudflare's or Vercel's country header), else from the region in their browser's language settings (fr-FR is France). A redirect or a banner opens the market in the visitor's browser language when the market offers it, else in its default language.

Location only suggests

Unless Redirect automatically is on, a visitor's country never changes the market they get. A shopper in Germany who opens shop.example.com sees the Israel market, in shekels, with the banner offering Europe.

Rules for automatic redirection:

  • Only a person's first page view is redirected: never a search engine, a link preview, a prefetch or an API call.
  • Only without a remembered choice. The redirect itself remembers the market, so it happens once.
  • A country in no market, or in the market the address already opened, is never redirected.

The remembered choice

Switch, Stay, a redirect, and the storefront's Country or region picker remember the visitor's market in a cookie for a year, kept per store address. It stops the banner and the redirect. It doesn't move the visitor by itself: the address they open still decides.

The storefront's pickers

When a store has more than one market or language, the theme's header and footer show:

  • Country or region: every country of every active market, with the market's currency. A market without countries is listed by its name. Picking one goes to that market's address on the same page, on this domain, or on another of your domains when the market only answers there.
  • Language: the current market's languages. Picking one goes to that language's address.

Rules that matter

  • The address decides. Country, browser language and the remembered choice never override the market or language in the address.
  • No address, no market. A market with no path and no domain that defaults to it answers nowhere.
  • Off means the primary answers. The path of a market that is off, or deleted, serves the primary market (canonical on the primary's address), and its default domains open in the primary. Links people kept still open the store.
  • One country, one market. The banner and the redirect need that: a country can be in only one market.

On this page