Skip to main content

Add a rewrite

Send a lowercase ASCII hostname in name and the desired answer in content. Use Punycode for internationalized names. NextDNS creates an A record for an IPv4 address, an AAAA record for an IPv6 address, or a CNAME for a hostname.
The response includes the rewrite ID.
A hostname can have several different address records, or a single CNAME. Adding a duplicate answer or combining an address and a CNAME for the same hostname returns HTTP 200 with an error code of conflict. Each profile supports up to 500 rewrites. Going over the limit returns HTTP 400 with {"code":"listLimitExceeded","list":"rewrites","limit":500} in the errors array.

List or remove rewrites

GET /profiles/{profile}/rewrites returns a data array containing all the profile’s rewrites.
To remove one, set REWRITE_ID to the id from the list or creation response. A successful deletion returns 204 No Content. An unknown ID returns 404 Not Found.