The connect domain widget: drop-in domain onboarding for your product
One component in your product. Your customers connect their own domain in it.
Your customers want your product on their own domain. What most products give them is a settings page with a table of DNS records, a link to a registrar they have not logged into since 2019, and a verify button that fails for reasons neither side can see. The connect domain widget replaces that page. It is an embeddable component that takes a customer from typing a domain to a domain that is live, without your team building DNS tooling.
The widget is the front door to the same platform that powers custom domains for SaaS: a control plane that writes and checks records, and an edge that terminates TLS for connected domains on Growth and up. You embed the flow.
What the connect domain widget is
It is a prebuilt domain connection flow that drops into your dashboard, onboarding wizard, or settings page. A customer types a domain. The widget finds which provider hosts its DNS, asks the customer to approve access where the provider allows it, writes the records or shows them, checks each one until the domain is live, and reports status back to your application. You receive a callback in the page and a webhook on your server. Your customer receives a working domain. If you are weighing the broader build, our guide to adding custom domains to your SaaS covers the whole picture.
The CustomDomain™ census lists 189 DNS providers as of October 2026. 73 have an automatic path (66 with a scoped API key, 6 by signing in with the provider, 1 by one-click setup), and the other 116 get the exact records with that provider's own steps. The widget picks the path for each customer, so you do not maintain provider documentation.
How embedding works
There are two ways in: a script tag or the SDK.
With the script tag, add the hosted script and call customdomain.open with your application id and a short lived token that your backend requests from the API. The token scopes the widget to a single customer, so a tenant can only ever see and connect their own domains.
Widget embed, copied from the CustomDomain™ docs quickstart (step 5, read October 30, 2026). The server mints the token. Only the token reaches the browser.
<button id="connect">Connect a domain</button>
<script src="https://app.customdomain.ai/widget-assets/customdomain-sdk.js"></script>
<script>
document.getElementById("connect").addEventListener("click", () => {
customdomain.open({
applicationId: "app_...",
token: "eyJ...", // from the call above
domain: "shop.acme.test",
onSuccess: ({ domain }) => console.log(`${domain} is live`),
});
});
</script>
The SDK wraps the same flow in typed configuration and events, and it is React friendly: render the component, pass the token, and subscribe to connection events the way you would with any controlled component. It behaves well in Next.js and other server rendered apps because the widget only initializes in the browser. Current options, event names and framework notes live in the docs.
What the widget handles
Provider detection
As the customer types, the widget finds where the domain's DNS is hosted and selects the shortest path that provider allows. The customer does not pick a registrar from a list.
Authorization
Where the provider has an automatic path, the customer approves the change by signing in with the provider, through one-click setup, or with a scoped API key. We never see or keep a registrar password.
Record writing
Once authorized, the platform writes the required records itself: the right types, the right values, at the right host. Where the records are added by hand, it shows exactly what to add and nothing more.
Verification
A domain goes live when every record resolves to its expected value. There is no extra TXT record to add. The widget checks as records propagate and updates on its own, so customers are not stuck refreshing a page or filing a ticket to ask if it worked.
TLS status
On the edge (Growth and up), the certificate is issued on the first HTTPS request and renewed about 30 days before expiry. The widget shows certificate progress in plain language, and your server gets webhooks when a domain goes live and when its certificate is issued.
A DNS configuration widget, not a DNS tutorial
Most domain settings pages quietly become DNS lessons: what a CNAME is, why the apex is different, which TTL to pick. A good DNS configuration widget absorbs all of that. Ours handles subdomains with CNAME records and apex domains with whatever each provider actually supports, and it applies the correct approach without asking the customer to choose. If you want the background, see apex domain vs CNAME in the glossary. After connection, every live domain is checked once an hour, and the console shows its drift state.
Styling and white label
The widget renders inside your page, not a popup or a redirect, and it is meant to disappear into your product. You control colors, typography, spacing, and the copy at each step, so "Connect your domain" can read the way your product speaks. On Enterprise, it can run white label: your logo, colors and copy, with the Powered by CustomDomain™ line hidden. Sign-in windows at the DNS provider still show the provider and our app’s name. That matters most when the domain flow is itself part of what you sell, as it is for agencies and white label platforms.
The domain onboarding widget, placed where it counts
Where you put the widget shapes activation. A domain onboarding widget works hardest inside the first run experience: the moment a customer publishes their first site, store, or page is the moment they most want it on their own name. Site builders put it at publish time, ecommerce platforms at store launch, and creator platforms at the upgrade step, where a custom domain is often the reason to pay. Because customers bring their own domain without leaving your product, the step can sit inside onboarding instead of being deferred to a settings page nobody revisits. Planning the launch? The custom domain onboarding checklist lists what to check, with the docs page for each step.
Embeddable domain connection for SaaS: what sits underneath
An embeddable domain connection is only as good as the infrastructure behind it. On Growth and up, domains connected through the widget are served by the CustomDomain™ edge, which terminates TLS for each domain with its own certificate (multi-tenant TLS). A domain another account serves is never connected to yours. Certificates are issued and renewed without anyone touching DNS again. The mechanics are covered in automatic certificates for customer domains and the on-demand TLS glossary entry. We run the provider integrations, the checks, the certificates and the edge. You embed a component and do not run a certificate fleet.
When to use the API instead
The same platform is exposed as a full REST API, and some situations call for it:
- A fully custom UI. If your design system demands a bespoke flow, drive connections, records, verification, and TLS state directly from the API.
- Backoffice and bulk work. Migrating hundreds of existing customer domains is a script against the API, not a widget session.
- Agent driven flows. An MCP server lets AI agents connect domains with the same checks. See CustomDomain™ for AI agents and the guide to connecting domains with AI agents.
- Domain search. The API searches for available names. Buying a new domain is live in the console, and it arrives connected.
Widget and API are not either or. Many platforms embed the widget for self serve customers and use the API for migrations and support tooling. Both write to the same control plane, described in how it works.
Try it on your own page
Starter includes the widget, and with the 14 day free trial you can embed it and connect a real domain before you talk to anyone. Start a free trial, follow the docs, and compare plans on the pricing page. To see it run first, book a call.
Frequently asked questions
What does it take to integrate the widget?
The script tag version needs the hosted script, a button and a short lived token minted by your backend. The SDK adds typed events and a React friendly component. The full reference is at docs.customdomain.ai/docs.
Does the widget support apex domains as well as subdomains?
Yes. Subdomains such as www connect with CNAME records, and apex domains use the record types each DNS provider actually supports. Your customer sees the same short flow either way. The widget selects the correct records.
Can I make the widget look like part of my product?
Yes. It renders inside your page rather than a popup or redirect, and you control colors, typography, spacing, and step copy. On Enterprise it can also run white label, with your logo and no Powered by CustomDomain™ line. Sign-in windows at the DNS provider still show our app’s name.
What if a customer's DNS provider is not supported for one-click authorization?
The widget shows the exact records with that provider's steps and checks each one as it lands. As of October 2026, 73 of the 189 providers in the census have an automatic path.