Changes the records in a domain's Wix DNS zone. It writes to a live domain, so it asks before any change that can break the site or the mail, and acts straight away only when nothing existing can break (see step 4). It is only for a domain already in the user's account. It does not connect, assign or buy a domain (a domain bought elsewhere that isn't in the account yet is Connect External Domain or Sub Domain's), and it cannot change records kept at another DNS provider. A question about the settings, or a request to find out what is wrong, with no change asked for, is Analyse Domain DNS's: it only reads.
Every call runs in the user's own context: as the signed-in user, never as an app, and never with an API key or an integration token. Never use a call that is only for apps.
Use the user's words. Most users never say "DNS" or "record". They say "my site moved to a new host", "verify my domain with Google", "send my email to Gmail". Work out the record from the request, and describe the change as "where the domain points", "a verification code" or "the mail settings", with the technical name in brackets once. Say "DNS" only if they did. Never name an endpoint, a field or an enum value.
http://, https:// and any path. Keep
every label the user typed, www. included.www). Offering a choice is not making it: when you offer options, send
nothing and leave every other record alone until the user picks, then show the table and ask.
Stop after asking. The turn that shows the table sends nothing.Run every call silently. If the read returns no propagation status, or a write fails, say "Something went wrong on our end. Please try again in a moment." and, for a write, that nothing was changed. Never retry a write.
Read the propagation status, the zone and the zone preview with the one-call read in Analyse Domain
DNS: same script, same results. It writes nothing. Its
result { "failed": true, "httpStatus": 403 } means the domain isn't in the account; a zone of
{ "failed": true, "httpStatus": 404 } means that zone doesn't exist (for a subdomain, run the call again for
the root domain); any other failed result is "Something went wrong on our end." If you cannot run a
script, make the three reads below as separate calls, in this order. Do not retry anything yourself and do
not search the docs.
The first read of the call above:
dnsResolverIncludesWixNs: true → Wix serves the settings, continue. false → stop as above. Field absent
→ "I can't tell where this domain's settings are kept, so I haven't changed anything." and stop. 403
DOMAINS_PERMISSION_DENIED → "{domain} isn't in your Wix account." and stop.
The second read of the call above:
Use the domain exactly as typed for the zone name. For a subdomain whose own zone answers 404, read the
root domain's zone instead and work on the subdomain's host names inside it (shop.example.com).
| The user wants | Change |
|---|---|
| Point the website at another host | Replace the apex A record with the new host's IPv4 address. Change the www CNAME only if the user gave a host for it: ask "Should www go there too?" in the confirmation, and until they answer leave www as it is. Never put a CNAME on the apex: if the user only has a host name for the bare domain, ask for its IP address, or offer to point www at the name and leave the bare domain as it is. |
| A verification code (Google, Microsoft, …) | When the provider asks for a text record, or the code looks like google-site-verification=… or MS=…, add a TXT record on the host the provider names (the bare domain when it names none). If a TXT record already exists on that host, keep its values and add the new one. Do not put it in the site's SEO or marketing settings. A code the provider says goes in a page's HTML (a meta tag or a file) is not a domain setting: say so, and make no change here. |
| Make a name an alias of another | The bare domain can't be an alias, so change nothing yet. Say so in plain words, and offer one of two things: ask for that host's IPv4 address and use it for the bare domain's A record, or make www the alias of the name and leave the bare domain as it is. Send nothing and touch no record (www included) until the user picks; then show the before/after table and ask for a yes. For any other host (shop.example.com), set the host's CNAME to the name, first checking that no other record sits on that host. |
| Email setup | Add the MX records the mail provider gave, on the apex. Get the values from the user or the provider's setup page, never from memory. For SPF, merge into the existing v=spf1 TXT value instead of adding a second one. |
| Apply the fix Analyse Domain DNS proposed | Replace the records it named with the values it gave; the preview below gives what Wix expects for the apex A and the www CNAME. Change nothing else. This skill does not diagnose: when the user asks to fix a site that isn't loading and no fix was proposed yet, hand over to Analyse Domain DNS first. |
| Change or remove a record | Delete it exactly as read; add the new one if it is a change. |
| Switch DNSSEC | Send the flag alone, and show it in the table. |
| Start the zone over, or delete it | Only when the user asks. See Create or delete the whole zone. |
Read what Wix expects (the zone preview):
It returns the same dnsZone shape, with the records Wix needs for the domain. Use these values, never ones
from memory.
Rules for any change:
example.com); www.example.com and
blog.example.com are not. It can't hold a CNAME, so it needs an A record.pki.goog or letsencrypt.org for the certificate.MX change is refused,
say so and when to retry.NS and SOA: leave them alone. Edit the zone's NS or SOA record only when the user names that
record and Wix serves the zone, and say first that the domain can stop working. "Change my nameservers"
is not that request: it is a registrar change, with no write (flow step 2).A and the www CNAME stop the site loading;
MX stops mail arriving at the old host. Name that in the confirmation.A: the address the domain points to. AAAA: the same, for the newer
address format. CNAME: an alias to another name. MX: where email is delivered. TXT: text used to
verify ownership and for email rules (SPF). NS: which servers manage the domain's settings.Stop before this call. Send it only when the user's last message is a yes to the table you showed (or the change is purely additive, see step 4). If it is not, do not send it: show the table and ask "Apply this?". Never send it together with the reads.
Records only. dnssecEnabled is left out, so DNSSEC stays as it is:
DNSSEC only, when the user asked for it:
The response is { "dnsZone": { ... } }: the zone after the change. Show it as a table of type, hostName,
values. additions and deletions take up to 50 records each.
Rules that decide the body
values. Two additions
of the same type and host are wrong.hostName is the full name (www.example.com), as in the zone. Keep ttl as read; use 3600 for a
new record unless the user says otherwise.MX is "{priority} {mail host}"; TXT the plain text; CNAME the target host; A an
IPv4 address.Both are destructive and rarely what the user means. Use them only when the user asks to start the zone over or remove it; say that every record in it is lost, list them, and wait for a yes.
Start over: POST https://www.wixapis.com/domains/v1/dns-zones deletes the existing zone first, then
creates one from the body. The new zone must hold the NS and SOA records, so copy them exactly from the
zone you read and add the user's records to them. Copy the current dnssecEnabled as well: an omitted flag
turns DNSSEC off.
The response is the new dnsZone; show it.
Remove: DELETE https://www.wixapis.com/domains/v1/dns-zones/example.com. The response is empty: say the
zone was removed and show nothing.
No WHOIS, registrar or owner lookup, and nothing about a domain that is not in the account. Domain connection, assignment and purchase are other tasks.
Last updated: 11 November 2026