Auth: X-Agent-Key: sq_agt_*. Scopes: store:read, store:publish.A store can have many domains attached, but only one primary domain. The
primary is the address customers see, and the one every generated URL is built
from — canonical tags, order emails, SMS links, shared links, and ad-pixel event
URLs. Every other domain is in one of two modes.
traffic_mode
What a visitor gets
Use it for
primary
The storefront. This is the canonical address.
Exactly one domain per store.
redirect
301 to the primary, keeping the path and query.
Old brand names, misspellings, www, domains you have consolidated.
serve
The storefront, on this address.
Ad landing pages and per-region domains that must stay on their own host.
redirect is the default for newly attached domains, so every visitor lands on
one address. Domains attached before this feature shipped stay
on serve until you change them, so nothing started redirecting on its own.
Two domains both serving the same store are two copies of it as far as a search
engine is concerned, and ranking is split between them rather than accumulated
by either. Redirecting the aliases consolidates that into one address.The exception is deliberate: if a domain exists to be an ad landing page or a
regional storefront, serve is correct and redirecting it would take it offline.
Nothing changes a domain’s mode without you asking.
PATCH /domains/{store_domain_id}/set-primary — promote a domain
POST /projects/{project_id}/domains — attach a new domain (provisions SSL)
Only verified domains can be promoted or change mode — an unverified domain
has no certificate and therefore cannot answer at all.
# What is each domain doing right now?curl -s https://api.platformdtc.com/api/v1/agent/v1/domains \ -H "X-Agent-Key: sq_agt_*" | jq '.data.domains[] | {domain, status_label}'
The promoted domain’s www/apex twin always switches to redirecting at it — a
store serving both acme.com and www.acme.com as separate storefronts is
never what anyone wants.redirect_others (default false) also folds every other attached domain into
the new primary. Leave it off if any of them are standalone landing pages;
turning it on is how you consolidate a store that has drifted into several
copies of itself.
Changing the primary domain moves your store’s search identity to a new address.
Rankings take weeks to follow. Redirects are kept in place so existing links,
emails and ads keep working, but expect movement in search results.
Status 301 by default; 302, 307 and 308 are accepted for a temporary
move.
Path and query are preserved: old.com/products/x?utm=a →
new.com/products/x?utm=a. Set preserve_path: false to send everything to
the root instead.
Redirects are answered at the edge, before any request reaches your
storefront, so a redirecting domain costs nothing to serve.
Certificate validation (/.well-known/) and email tracking pixels are never
redirected — a redirecting domain still needs a working certificate, and a
pixel must still render for someone who opens an old email.
Chains are rejected. A domain may redirect to the primary or to a serving
domain, never to another redirect.
Every store keeps its platform subdomain, and it keeps working. Once you have a
primary domain, the storefront tells search engines that the primary is the real
address, so the subdomain does not compete with it.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"PlatformDTC","description":"Build agent-native commerce. The PlatformDTC Agent Gateway lets autonomous agents (OpenClaw and others) run every capability of your store — build, catalog, ads, marketing, analytics, orders — over one scoped, idempotent, job-aware API.","colors":{"primary":"#111111","light":"#111111","dark":"#e5e5e5"},"logo":{"light":"/assets/logo.svg","dark":"/assets/logo-dark.svg"},"favicon":"/assets/logo.svg","appearance":{"default":"light","strict":false},"background":{"color":{"light":"#ffffff","dark":"#0b0b0c"}},"navbar":{"links":[{"icon":"layout-dashboard","href":"https://platformdtc.com/agents/connect","label":"Dashboard"},{"icon":"newspaper","href":"https://platformdtc.com/blog","label":"Blog"},{"icon":"activity","href":"https://status.platformdtc.com","label":"Status"}],"primary":{"type":"button","label":"Get an API key","href":"https://platformdtc.com/agents/access/api-keys"}},"footer":{"socials":{"x":"https://x.com/platformdtc","linkedin":"https://www.linkedin.com/company/platformdtc"}},"fonts":{"heading":{"family":"Inter","weight":500},"body":{"family":"Inter"}},"icons":{"library":"lucide"},"styling":{"codeblocks":{"theme":{"light":"github-dark","dark":"github-dark"}}},"integrations":{"telemetry":{"enabled":false}},"navigation":{"languages":[{"language":"en","href":""}]}},"deployment":{"deploymentMetadataValue":{"hasAudioNarration":false,"customDomains":[],"gitSource":{"type":"github","owner":"local","repo":"local","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"local","isBase":true},"buildId":"local","clientVersion":"0.0.4070"},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false,"isLoggedInCli":false,"mintExport":{}},"customCss":[{"filePath":"style.css","content":":root{--dtc-mono: \"JetBrains Mono\", ui-monospace, SFMono-Regular, \"SF Mono\", Menlo,\n Consolas, monospace;--dtc-border: rgba(17, 17, 17, 0.08);--dtc-muted: #6a737d}.dark{--dtc-border: rgba(255, 255, 255, 0.1);--dtc-muted: #9aa4af}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}h1{letter-spacing:-0.02em;font-weight:600}h2,h3{letter-spacing:-0.015em}main article{max-width:46rem}#sidebar a,nav#sidebar a{font-size:0.875rem;line-height:1.5}#sidebar .group-label,#sidebar [class*=\"uppercase\"]{font-size:0.6875rem;letter-spacing:0.08em;color:var(--dtc-muted)}#table-of-contents a,[id*=\"toc\"] a{color:var(--dtc-muted);font-size:0.8125rem}pre,pre code,code{font-family:var(--dtc-mono);font-size:0.85em}.prose pre,pre{border:1px solid var(--dtc-border);border-radius:10px}:not(pre)>code{background:rgba(17, 17, 17, 0.05);border:1px solid var(--dtc-border);border-radius:5px;padding:0.1em 0.35em;font-weight:450}.dark :not(pre)>code{background:rgba(255, 255, 255, 0.06)}a[class*=\"card\"],.card{border:1px solid var(--dtc-border);border-radius:12px;transition:transform 0.12s ease, border-color 0.12s ease,\n box-shadow 0.12s ease}a[class*=\"card\"]:hover,.card:hover{transform:translateY(-2px);border-color:rgba(17, 17, 17, 0.16);box-shadow:0 6px 24px rgba(17, 17, 17, 0.06)}.dark a[class*=\"card\"]:hover,.dark .card:hover{border-color:rgba(255, 255, 255, 0.2);box-shadow:0 6px 24px rgba(0, 0, 0, 0.4)}#content-area:has(#dtc-hero) #header{display:none!important}#dtc-hero{display:grid;grid-template-columns:minmax(0, 1.15fr) minmax(0, 1fr);gap:44px;align-items:center;background:#f9f8f6;border:1px solid rgba(17, 17, 17, 0.06);border-radius:24px;padding:40px;margin:4px 0 8px}.dark #dtc-hero{background:#111214;border-color:rgba(255, 255, 255, 0.08)}@media (max-width: 900px){#dtc-hero{grid-template-columns:1fr;gap:28px;padding:28px}}.dtc-hero-eyebrow{margin:0 0 14px;font-size:0.8125rem;font-weight:600;letter-spacing:0.04em;color:var(--dtc-muted)}.dtc-hero-title{margin:0 0 16px;font-size:44px;line-height:1.1;font-weight:500;letter-spacing:-0.88px;color:#0a0a0a;hyphens:none;overflow-wrap:normal;word-break:keep-all;text-wrap:balance}.dark .dtc-hero-title{color:#f5f5f5}@media (max-width: 600px){.dtc-hero-title{font-size:36px;letter-spacing:-0.7px}}.dtc-hero-sub{margin:0 0 28px;font-size:1.0625rem;line-height:1.6;color:#4a5056;max-width:30rem}.dark .dtc-hero-sub{color:#b3b9c0}.dtc-hero-actions{display:flex;gap:12px;flex-wrap:wrap}.dtc-btn{display:inline-flex;align-items:center;height:44px;padding:0 20px;border-radius:9999px;font-size:14px;font-weight:500;text-decoration:none!important;transition:transform 0.12s ease, opacity 0.12s ease, background 0.12s ease}.dtc-btn:hover{transform:translateY(-1px)}.dtc-btn-primary{background:#0a0a0a;color:#f9f8f6!important}.dtc-btn-primary:hover{background:#232323}.dark .dtc-btn-primary{background:#f5f5f5;color:#0a0a0a!important}.dtc-btn-secondary{background:transparent;color:#0a0a0a!important;border:1px solid rgba(10, 10, 10, 0.15)}.dtc-btn-secondary:hover{background:rgba(10, 10, 10, 0.04)}.dark .dtc-btn-secondary{color:#f5f5f5!important;border-color:rgba(255, 255, 255, 0.18)}#dtc-hero .dtc-hero-code{min-width:0}#dtc-hero .dtc-hero-code>div,#dtc-hero .dtc-hero-code pre{margin:0!important}#dtc-hero .dtc-hero-code pre{border-radius:12px}a[href$=\"/agents/access/api-keys\"]{background:#0a0a0a!important;color:#f9f8f6!important;border-radius:9999px!important}a[href$=\"/agents/access/api-keys\"]:hover{background:#232323!important}a[href$=\"/agents/access/api-keys\"] *{color:#f9f8f6!important}.dark a[href$=\"/agents/access/api-keys\"]{background:#f5f5f5!important}.dark a[href$=\"/agents/access/api-keys\"],.dark a[href$=\"/agents/access/api-keys\"] *{color:#0a0a0a!important}#dtc-hero .dtc-hero-code pre{min-height:168px}a[href$=\"/agents/access/api-keys\"]>*{background:transparent!important;border-color:transparent!important}"}],"page":{"pagePath":"commerce/domains","slug":"/commerce/domains","pageMetadata":{"title":"Domains","summary":"One primary domain per store; every other domain either redirects to it or serves the storefront on its own address.","href":"/commerce/domains"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://api.platformdtc.com/api/v1/agent/v1/domains`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Auth: `,_jsx(_components.code,{children:`X-Agent-Key: sq_agt_*`}),`. Scopes: `,_jsx(_components.code,{children:`store:read`}),`, `,_jsx(_components.code,{children:`store:publish`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A store can have many domains attached, but only one `,_jsx(_components.strong,{children:`primary domain`}),`. The\nprimary is the address customers see, and the one every generated URL is built\nfrom — canonical tags, order emails, SMS links, shared links, and ad-pixel event\nURLs. Every other domain is in one of two modes.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`traffic_mode`})}),_jsx(_components.th,{children:`What a visitor gets`}),_jsx(_components.th,{children:`Use it for`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`primary`})}),_jsx(_components.td,{children:`The storefront. This is the canonical address.`}),_jsx(_components.td,{children:`Exactly one domain per store.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`redirect`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`301`}),` to the primary, keeping the path and query.`]}),_jsxs(_components.td,{children:[`Old brand names, misspellings, `,_jsx(_components.code,{children:`www`}),`, domains you have consolidated.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`serve`})}),_jsx(_components.td,{children:`The storefront, on this address.`}),_jsx(_components.td,{children:`Ad landing pages and per-region domains that must stay on their own host.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`redirect`}),` is the default for newly attached domains, so every visitor lands on\none address. Domains attached before this feature shipped stay\non `,_jsx(_components.code,{children:`serve`}),` until you change them, so nothing started redirecting on its own.`]}),`\n`,_jsx(Heading,{level:`2`,id:`why-the-mode-matters`,children:`Why the mode matters`}),`\n`,_jsx(_components.p,{children:`Two domains both serving the same store are two copies of it as far as a search\nengine is concerned, and ranking is split between them rather than accumulated\nby either. Redirecting the aliases consolidates that into one address.`}),`\n`,_jsxs(_components.p,{children:[`The exception is deliberate: if a domain exists to be an ad landing page or a\nregional storefront, `,_jsx(_components.code,{children:`serve`}),` is correct and redirecting it would take it offline.\nNothing changes a domain’s mode without you asking.`]}),`\n`,_jsx(Heading,{level:`2`,id:`endpoints`,children:`Endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GET /domains`}),` — every attached domain with its mode, status and effective\nredirect target`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PATCH /domains/{store_domain_id}`}),` — `,_jsx(_components.code,{children:`{\"traffic_mode\": \"redirect\" | \"serve\"}`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PATCH /domains/{store_domain_id}/set-primary`}),` — promote a domain`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /projects/{project_id}/domains`}),` — attach a new domain (provisions SSL)`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Only `,_jsx(_components.strong,{children:`verified`}),` domains can be promoted or change mode — an unverified domain\nhas no certificate and therefore cannot answer at all.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# What is each domain doing right now?`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` -s`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` https://api.platformdtc.com/api/v1/agent/v1/domains`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` \"X-Agent-Key: sq_agt_*\"`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` |`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:` jq`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` '.data.domains[] | {domain, status_label}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`[`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`\"domain\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"acme.com\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`\"status_label\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"Primary\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`\"domain\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"www.acme.com\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`\"status_label\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"Redirects to acme.com\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`\"domain\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"acme-store.co\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`\"status_label\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"Redirects to acme.com\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`\"domain\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"summer.acme.net\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`\"status_label\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`\"Serving separately\"`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`]`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`changing-the-primary-domain`,children:`Changing the primary domain`}),`\n`,_jsx(CodeBlock,{numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` -s`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` PATCH`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` https://api.platformdtc.com/api/v1/agent/v1/domains/{id}/set-primary`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` \"X-Agent-Key: sq_agt_*\"`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`)\"`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` '{\"redirect_others\": false}'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The promoted domain’s `,_jsx(_components.code,{children:`www`}),`/apex twin always switches to redirecting at it — a\nstore serving both `,_jsx(_components.code,{children:`acme.com`}),` and `,_jsx(_components.code,{children:`www.acme.com`}),` as separate storefronts is\nnever what anyone wants.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`redirect_others`}),` (default `,_jsx(_components.code,{children:`false`}),`) also folds every `,_jsx(_components.em,{children:`other`}),` attached domain into\nthe new primary. Leave it off if any of them are standalone landing pages;\nturning it on is how you consolidate a store that has drifted into several\ncopies of itself.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Changing the primary domain moves your store’s search identity to a new address.\nRankings take weeks to follow. Redirects are kept in place so existing links,\nemails and ads keep working, but expect movement in search results.`})}),`\n`,_jsx(Heading,{level:`2`,id:`redirect-behaviour`,children:`Redirect behaviour`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Status `,_jsx(_components.code,{children:`301`}),` by default; `,_jsx(_components.code,{children:`302`}),`, `,_jsx(_components.code,{children:`307`}),` and `,_jsx(_components.code,{children:`308`}),` are accepted for a temporary\nmove.`]}),`\n`,_jsxs(_components.li,{children:[`Path and query are preserved: `,_jsx(_components.code,{children:`old.com/products/x?utm=a`}),` →\n`,_jsx(_components.code,{children:`new.com/products/x?utm=a`}),`. Set `,_jsx(_components.code,{children:`preserve_path: false`}),` to send everything to\nthe root instead.`]}),`\n`,_jsx(_components.li,{children:`Redirects are answered at the edge, before any request reaches your\nstorefront, so a redirecting domain costs nothing to serve.`}),`\n`,_jsxs(_components.li,{children:[`Certificate validation (`,_jsx(_components.code,{children:`/.well-known/`}),`) and email tracking pixels are never\nredirected — a redirecting domain still needs a working certificate, and a\npixel must still render for someone who opens an old email.`]}),`\n`,_jsx(_components.li,{children:`Chains are rejected. A domain may redirect to the primary or to a serving\ndomain, never to another redirect.`}),`\n`]}),`\n`,_jsxs(Heading,{level:`2`,id:`your-myshopquantum-ai-address`,children:[`Your `,_jsx(_components.code,{children:`.myshopquantum.ai`}),` address`]}),`\n`,_jsx(_components.p,{children:`Every store keeps its platform subdomain, and it keeps working. Once you have a\nprimary domain, the storefront tells search engines that the primary is the real\naddress, so the subdomain does not compete with it.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-dark","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Domains","summary":"One primary domain per store; every other domain either redirects to it or serves the storefront on its own address.","href":"/commerce/domains"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Why the mode matters","slug":"why-the-mode-matters","depth":2,"children":[]},{"title":"Endpoints","slug":"endpoints","depth":2,"children":[]},{"title":"Changing the primary domain","slug":"changing-the-primary-domain","depth":2,"children":[]},{"title":"Redirect behaviour","slug":"redirect-behaviour","depth":2,"children":[]},{"title":"Your .myshopquantum.ai address","slug":"your-myshopquantum-ai-address","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"localhost","siteName":"PlatformDTC","title":"Domains - PlatformDTC","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/commerce/domains","matchLevel":0}}},"originalFileLocation":"commerce/domains.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"PlatformDTC\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/favicons/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicons/favicon-32x32.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicons/favicon-16x16.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicons/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Domains - PlatformDTC\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PlatformDTC\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://local./commerce/domains\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Domains - PlatformDTC\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/favicons/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PlatformDTC\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#111111\">\u003clink data-mint-head rel=\"canonical\" href=\"https://local./commerce/domains\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/commerce/domains.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"PlatformDTC\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"PlatformDTC","nav":{"languages":[{"language":"en","tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":""}]},{"tab":"Agents","pages":[{"title":"Agents","href":"/agents/playbook"}]},{"tab":"Themes","pages":[{"title":"Themes","href":"/themes/overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"Fulfillment","pages":[{"title":"Fulfillment","href":"/fulfillment/overview"}]},{"tab":"Commerce","groups":[{"group":"Resource APIs","pages":[{"title":"Products","href":"/commerce/products"},{"title":"Inventory \u0026 Locations","href":"/commerce/inventory"},{"title":"Discounts","href":"/commerce/discounts"},{"title":"Gift Cards \u0026 Store Credit","href":"/commerce/gift-cards"},{"title":"Draft Orders","href":"/commerce/draft-orders"},{"title":"Metafields","href":"/commerce/metafields"},{"title":"Online Store content","href":"/commerce/online-store"},{"title":"Script tags","href":"/commerce/script-tags"},{"title":"Returns","href":"/commerce/returns"},{"title":"Domains","href":"/commerce/domains"},{"title":"Checkout URLs","href":"/commerce/checkout-urls"}]}]},{"tab":"Recipes","pages":[{"title":"Recipes","href":"/recipes/build-a-store"}]},{"tab":"Partner Apps","pages":[{"title":"Partner Apps","href":"/partners/getting-started"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/v1"}]}]}]},"basePath":"","title":"Domains - PlatformDTC","buildId":"128077a71cae","dynamics":[],"chunks":[]}