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 domain

You can update the MX and TXT records for a domain purchased through Wix, and connect it to an external (non-Wix) site.

To update the DNS records for a domain:

  1. Prompt the site owner for the relevant domain name, DNS record type, and host name of the registered domain.
  2. Call Update DNS Zone to change the MX and TXT records in Google's Cloud DNS.
  3. 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:

  1. If the relevant site is a free Wix site, call Resellers Create Package v2 to assign a Premium plan to it.
  2. Register the domain through an external provider.
  3. Call Create Connected Domain to start the connection process. Make sure to use {"connectionType": "NAMESERVERS"}.
  4. Call Get Connected Domain Setup Info to retrieve the new DNS record values. You find them in connectedDomainSetupInfo.pointingRecords.aRecord.values and connectedDomainSetupInfo.pointingRecords.cnameRecord.value.
  5. Call Update DNS Zone to change the A and CNAME records in Google's Cloud DNS.
  6. Call Get Connected Domain to monitor the connected domain's dnsPropagationStatus and confirm that it changes to "COMPLETED".
Did this help?