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:

  1. 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.
  2. 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.
  3. Call Create Registered Domain to start the domain registration process through Wix.
  4. Use Get Registered Domain to confirm that the status has changed to "PENDING_REGISTRATION".
  5. Call Update Dns Zone to change the MX and TXT records in Google's Cloud DNS.
  6. 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. Optional: In case the relevant site is a free Wix site, use the Resellers API 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. Use 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. Use 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".
Was this helpful?
Yes
No