Sample Use Cases & Flows: Connected Domains

This article shares a possible use case your app could support, as well as an example flow. You're certainly not limited to this use case, but it can be a helpful jumping off point as you plan your app's implementation.

Connect an external domain using name servers

You could help site owners connect an external domain using name servers to their Wix site.

To connect an external domain using name servers 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. Contact the Wix B2B sales team for details about supported product IDs.
  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".

Connect an external domain by pointing

You could help site owners connect an external domain by pointing to their Wix site.

To connect an external domain by pointing to a Wix site:

  1. Call Create Package from the Resellers API to assign a Wix Premium plan to the Wix site. Contact the Wix B2B sales team for details about supported product IDs.
  2. Call Create Connected Domain.
  3. 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.
  4. Assist the site owners with setting up the new A and CNAME records. This can't be done using Wix APIs, you must use the infrastructure of the external domain registrar.
  5. Call Get Connected Domain to monitor the connected domain's dnsPropagationStatus and confirm that it changes to "COMPLETED".

Connect a subdomain

You could help site owners connect a subdomain to their Wix site.

To connect a subdomain to a Wix site:

  1. Call Create Package of the Resellers API to assign a Wix Premium plan to the Wix site. Contact the Wix B2B sales team for details about supported product IDs.
  2. Call Create Connected Domain.
  3. Call Get Connected Domain Setup Info to retrieve the new DNS record values. You find them in connectedDomainSetupInfo.subdomainRecords.cnameRecords.value.
  4. Assist the site owners with setting up the new CNAME records. This can't be done using Wix APIs, you must use the infrastructure of the external domain registrar.
  5. Call Get Connected Domain to monitor the connected domain's dnsPropagationStatus and confirm that it changes to "COMPLETED".
Did this help?