Sample Use Cases & Flows: Domain DNS
This article shares a possible use case your implementation could support, as well as a sample flow. You're not limited to this use case, but it can be a helpful jumping off point for your planning.
Update DNS records for a registered domain
You could purchase a domain through Wix and then update the MX and TXT records. This allows you to connect the domain to a website that isn't build on Wix.
To update the DNS records for a registered domain:
- Optional: In case the relevant site is a free Wix site, use the
Resellers API
to assign a Premium plan to it. Make sure to save the
productInstanceId
. - Use the Resellers API to create a product instance for the relevant domain TLD and privacy. Don't assign the product instance to a site, but keep it floating in the relevant account.
- Call Create Registered Domain to start the domain registration process through Wix.
- Use Get Registered Domain
to confirm that the
status
has changed to"PENDING_REGISTRATION"
. - Call Update Dns Zone to change the MX and TXT records in Google's Cloud DNS.
- Connect the domain to the external site.
Connect an external domain by nameservers to a Wix site
You could help Wix site owners connect an external domain by nameservers to their site. Note that you can't use Update DNS Zone for external domains that are connected by pointing.
To connect an external domain by nameservers to a Wix site:
- Optional: In case the relevant site is a free Wix site, use the Resellers API to assign a Premium plan to it.
- Register the domain through an external provider.
- Call Create Connected Domain
to start the connection process. Make sure to use
{"connectionType": "NAMESERVERS"}
. - Use Get Connected Domain Setup Info
to retrieve the new DNS record values. You find them in
connectedDomainSetupInfo.pointingRecords.aRecord.values
andconnectedDomainSetupInfo.pointingRecords.cnameRecord.value
. - Use Update Dns Zone to change the A and CNAME records in Google's Cloud DNS.
- Call Get Connected Domain
to monitor the connected domain's
dnsPropagationStatus
and confirm that it changes to"COMPLETED"
.
Was this helpful?
Yes
No