Skip to main content

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.

Set by your platform administrator

A custom domain is provisioned and assigned by a platform administrator from the Allegro Admin — as the tenant's own domain, or to one of its properties — and DNS is pointed at the Allegro instance as part of that setup. 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 how domains are provisioned and assigned, 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.