Domain Connect template
A JSON document hosted by a SaaS app that lists DNS records to apply at the customer's DNS provider. The contract for a Domain Connect integration.
A Domain Connect template is the JSON document a SaaS app publishes to describe the DNS changes it wants the customer's DNS provider to make. When the customer triggers the Domain Connect flow, the DNS provider fetches this template, applies it (after consent), and the records go live.
The template is hosted at a stable URL: https://yoursaas.com/dns/templates/v1.json or wherever you choose. The Domain Connect signing/verification system checks that the URL matches what was registered with the DNS provider.
What the template looks like
{
"providerId": "yoursaas.com",
"providerName": "Your SaaS",
"serviceId": "custom-domain",
"serviceName": "Custom Domain",
"version": 1,
"logoUrl": "https://yoursaas.com/logo.png",
"description": "Connect your domain to Your SaaS",
"syncBlock": true,
"records": [
{
"type": "CNAME",
"host": "@",
"pointsTo": "%apex-cname%",
"ttl": 1800
},
{
"type": "CNAME",
"host": "www",
"pointsTo": "%cname-target%",
"ttl": 1800
},
{
"type": "TXT",
"host": "_acme-challenge",
"data": "%acme-token%",
"ttl": 60
}
]
}
Template variables
The %...% placeholders are variables resolved at apply-time. Your SaaS passes the values in the redirect URL:
https://gd-domainconnect.com/v2/domainTemplates/providers/yoursaas.com/services/custom-domain/apply
?domain=customer.com
&apex-cname=apex.yoursaas-edge.com
&cname-target=customer.yoursaas-edge.com
&acme-token=BkLi9X...
The DNS provider substitutes the variables and writes the resulting records.
Sync vs async
syncBlock: true— synchronous template. User approves, records are applied during the redirect, then user returns to your app. Best for one-shot setup.- Without sync — async template via OAuth. Your app gets a long-lived token and can push template applications over time without user re-consent. Best for ongoing operations like cert renewal.
Registering the template
You can't just host a template and expect DNS providers to honor it. Each provider has its own registration process:
- GoDaddy: form-based application, manual review.
- Cloudflare: requires a Cloudflare Apps partner agreement.
- Network Solutions: contract.
- IONOS: form.
The friction of registering with each provider is the main reason small SaaS apps don't bother with Domain Connect. The flow is great, the rollout is painful.
In a SaaS
For a custom-domain platform, you write one template per "service offering" (apex+www, just www, with-ACME, without-ACME). Most platforms get away with 2-4 distinct templates total.