Custom Domain
By default, the Allegro SDK loads from the tenant subdomain:
https://acme.allegrocdp.com/client.js
A custom domain lets you serve the SDK and its API endpoints from a domain you control instead:
https://cdn.acme.com/client.js
This keeps SDK traffic on your own brand and origin, which is useful when you want the embed and its API requests to appear first-party to the browser.
A custom domain must be configured by an Allegro administrator, who maps the domain to your tenant and points DNS at the Allegro instance. You cannot set it from the SDK or the browser. Once it is in place, the steps below describe how the SDK uses it. For the setup and hosting details, see Custom Domain (Platform).
How the SDK Uses It
The SDK determines its API base URL from the src attribute of the <script>
tag that loads client.js. Load the script from your custom domain and every
API call the SDK makes — authentication, event tracking, interactions, checkout
— goes to that domain automatically. No extra SDK configuration is required:
<!-- All SDK API requests go to cdn.acme.com -->
<script src="https://cdn.acme.com/client.js" data-tenant="acme"></script>
CORS and Return URLs
When a custom domain is configured, Allegro automatically includes it in the list of allowed browser origins alongside the subdomain — you do not need to add it manually. That same list validates the return URLs used by magic link and checkout flows, so those redirects work on the custom domain out of the box.
Related
- Browser Settings — Allowed origins and cookie scope
- Custom Domain (Platform) — DNS, routing, and hosting configuration
- Script Tag — Embedding the SDK on your site