<?xml version="1.0" encoding="UTF-8"?>
<?rfc notedraftinprogress=""?>
<?rfc rfcedstyle=""?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-ietf-dconn-domainconnect-01" category="std" ipr="trust200902" submissionType="IETF" xml:lang="en" version="3" >
  <front>
    <title abbrev="Domain Connect">Domain Connect Protocol - DNS provisioning between Services and DNS Providers</title>
    <seriesInfo value="draft-ietf-dconn-domainconnect-01" status="Informational" stream="IETF" name="Internet-Draft" asciiName="Internet-Draft"></seriesInfo>
    <seriesInfo name="" value="" status="standard"></seriesInfo>
    <author initials="P" surname="Kowalik">
      <organization>DENIC eG</organization>
      <address>
        <postal>
          <street ascii="Theodor-Stern-Kai 1">Theodor-Stern-Kai 1</street>
          <city ascii="Frankfurt am Main">Frankfurt am Main</city>
          <country ascii="DE">DE</country>
        </postal>
        <email>pawel.kowalik@denic.de</email>
        <uri>https://denic.de</uri>
      </address>
    </author>
    <author initials="A" surname="Blinn">
      <address>
        <postal></postal>
        <email>arnold@arnoldblinn.com</email>
      </address>
    </author>
    <author initials="J" surname="Kolker">
      <organization>GoDaddy Inc.</organization>
      <address>
        <postal>
          <street ascii="14455 N. Hayden Rd. #219">14455 N. Hayden Rd. #219</street>
          <city ascii="Scottsdale">Scottsdale</city>
          <country ascii="US">US</country>
        </postal>
        <email>jkolker@godaddy.com</email>
        <uri>https://www.godaddy.com</uri>
      </address>
    </author>
    <author initials="S" surname="Kerola">
      <organization>Cloudflare, Inc.</organization>
      <address>
        <postal>
          <street ascii="101 Townsend St">101 Townsend St</street>
          <city ascii="San Francisco">San Francisco</city>
          <country ascii="US">US</country>
        </postal>
        <email>kerolasa@cloudflare.com</email>
        <uri>https://cloudflare.com</uri>
      </address>
    </author>
    <date day="1" year="2026" month="March"></date>
    <area>Applications and Real-Time</area>
    <abstract>

<t anchor="_1a4ffd2e-21ad-66d5-35fe-8917664ac67c">This document provides specification of the Domain Connect Protocol that was built to support DNS configuration provisioning between Service Providers (hosting, social, email, hardware, etc.) and DNS Providers.</t>
</abstract>
  </front>
  <middle>
    <section anchor="_c262b60c-e515-282f-314a-924c08799608"><name>Introduction</name>

<t anchor="_3ffbb0fb-0027-4919-9094-f560d5b0c8c6">Connecting a domain name to a service should be a simple and straightforward process.  However, historically, users have faced a complex and often frustrating task involving manual DNS configuration.  Traditional methods are unreliable, require deep technical knowledge of DNS, and result in outdated and confusing instructions from Service Providers.  This leads to user frustration, support overhead, and abandoned setups.</t>

<t anchor="_8cf97ac4-95d4-4f27-adad-e79d76118643">To address these challenges, Domain Connect offers a streamlined and automated solution.  It empowers Service Providers to easily enable their services to work with user domains, simplifying both DNS provider discovery and DNS configuration.  By abstracting away the complexities of manual DNS management through user-friendly web interactions, standard authentication, and template-based configurations, Domain Connect significantly improves the user experience.</t>
</section>
    <section anchor="_4ab82f32-c3e9-9c8c-c05d-98a840b11d9e"><name>Use Cases</name>

<section anchor="_f1e61f16-04d0-8933-354e-3663f2e686fb"><name>Primary Use Cases</name>

<t anchor="_574252b8-12b1-eb99-3472-c66ffcdc4696">The following use cases illustrate the wide range of applications where Domain Connect simplifies and automates DNS configuration, from basic service onboarding to complex, dynamic DNS management scenarios.</t>

<ul anchor="_06b1cc58-f7bf-3d0c-0e64-a6de3b09c450"><li><strong>SaaS Provider with One-Off DNS Configuration:</strong> A Software as a Service (SaaS) Provider offering functionality with an option to assign own domain name, such as web hosting or email, can utilize Domain Connect to streamline the process of configuring DNS records for their customers. This automation eliminates the need for manual configuration and simplifies the onboarding experience for users.</li>
<li><strong>SaaS Provider with Multi-Step DNS Configuration:</strong> Some SaaS Providers may require a multi-step DNS configuration process, potentially involving asynchronous operations. For example, a service might require initial verification of domain ownership through a TXT record, followed by the creation of CNAME records for different subdomains. Domain Connect can handle such scenarios by utilizing its asynchronous flow. This allows the Service Provider to obtain user consent and apply the necessary DNS changes in multiple steps, even if the user is not actively present during the entire process.</li>
<li><strong>On-Premise Service with Publicly Accessible DNS Service:</strong> An on-premise service, such as a local network device or server, can also benefit from Domain Connect if it utilizes a publicly accessible DNS service. By leveraging Domain Connect, the service can automatically update DNS records as needed, ensuring that the service remains accessible through its domain name.</li>
<li><strong>Tool or Service with Regularly Updated DNS Entries:</strong> A tool or service that requires regular updates to DNS entries, such as a dynamic DNS service or a DNS-based load balancer, can use Domain Connect to automate the process.</li>
<li><strong>Packaged Software Provider:</strong> A packaged software provider, whether open-source or proprietary, can integrate Domain Connect into their installation and configuration process. This allows the software to automatically configure necessary DNS records during installation, simplifying the setup process for users. However, if the software is installed on a private network with a private DNS service, it might not be directly compatible with Domain Connect, unless the DNS service provides Domain Connect endpoints accessible to the installation process.</li>
</ul>
</section>

<section anchor="_23fccf7c-c2d6-2b6f-af20-4c097d6ac59e"><name>Use Cases out of scope</name>

<t anchor="_9beb328e-19ff-dd26-7949-3bc1511d7bc6">While Domain Connect offers significant advantages in automating DNS configuration, it's important to recognize scenarios where it might not be the ideal solution:</t>

<ul anchor="_2cc89b44-8e16-98da-f94f-f1c5e105a05a"><li><strong>Automation or CI/CD Pipelines:</strong> Domain Connect is primarily designed for user-driven DNS configuration, where an end user grants consent and applies changes. Automating this process within CI/CD pipelines or other automated workflows can be challenging, as it requires obtaining and securely storing OAuth tokens beforehand. However, if authorization tokens are pre-obtained from a user-driven setup process, Domain Connect can be also integrated into automation workflows.</li>
<li><strong>Private/Enterprise DNS with Public SaaS Providers:</strong> Domain Connect relies on public DNS records and endpoints to facilitate discovery and configuration. If a private or enterprise DNS service is used, it might not be directly compatible with Domain Connect, unless the DNS service provides publicly accessible Domain Connect endpoints.</li>
</ul>
</section>
</section>
    <section anchor="terminology" toc="exclude"><name>Terminology</name>

<t anchor="_7d106f2e-b997-be15-8b5d-40e0b35b64de">The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119" section="" relative=""></xref> <xref target="RFC8174" section="" relative=""></xref> when, and only when, they appear in all capitals, as shown here.</t>

<t anchor="_63f3f500-10eb-cbdd-8218-42f7d7278094">The Terms like "<strong>Registrar</strong>", "<strong>Authoritative server</strong>", "<strong>Zone</strong>", "<strong>Zone Apex</strong>" or "<strong>Sub Domain</strong>" are used as defined in <xref target="RFC8499" section="" relative=""></xref>.</t>

<t anchor="_90f1b70c-45e9-03da-8244-ac206127d20d">This specification uses the Augmented Backus-Naur Form (ABNF) notation of <xref target="RFC5234" section="" relative=""></xref>. The following ABNF rules are imported from the normative references <xref target="RFC5234" section="" relative=""></xref>.</t>

<sourcecode anchor="_b006cf70-2fdd-fdaa-0629-68686a60b4c6" type="abnf"><![CDATA[     ALPHA          =  %x41-5A / %x61-7A   ; A-Z / a-z
     DIGIT          =  %x30-39             ; 0-9]]></sourcecode>


<t anchor="_79959d8e-01a3-856d-a260-525e6cdfce70">The following definitions and rules are imported normatively from other documents.</t>

<dl anchor="_b5049311-4575-1086-485a-e7c6bd658dad"><dt><tt>"a-label"</tt>:</dt><dd anchor="_b7b32b8d-7954-4f9e-4440-81c1510e6afd"><t anchor="_5aa96038-9425-77c4-9a51-ee425bc6beb9">"A-label" as defined in Section 2.3.2.1 of <xref target="RFC5890" section="" relative=""></xref>.</t>
</dd><dt><tt>"u-label"</tt>:</dt><dd anchor="_45ec8a30-66f0-8dd1-5497-00417c350a78"><t anchor="_55118f19-b30f-7bba-94aa-4c0f944b785e">"U-label" as defined in Section 2.3.2.1 of <xref target="RFC5890" section="" relative=""></xref>.</t>
</dd><dt><tt>"ldh-label"</tt>:</dt><dd anchor="_26d07ac0-2f2f-8dd6-858a-4172a8937804"><t anchor="_fd59c10d-2d3f-feb2-9e99-527d79eb9ad7">"NR-LDH Label" as defined in Section 2.3.2.2. of <xref target="RFC5890" section="" relative=""></xref>.</t>
</dd><dt><tt>"domain-name"</tt>:</dt><dd anchor="_332cdb0c-412e-d4f8-ede8-e39c42ef30b7"><t anchor="_7f9ff229-87a0-6f23-25b0-585d364bfb83">"Internationalized Domain Name" as defined in Section 2.3.2.3. of <xref target="RFC5890" section="" relative=""></xref>.</t>
</dd><dt><tt>"state"</tt>:</dt><dd anchor="_e02d7c8d-e8c1-8702-4550-aa583e1405d6"><t anchor="_8184f449-b4bb-d714-da7c-9b450a2078b1">"state" as defined in Appendix A. Section A5 of <xref target="RFC6749" section="" relative=""></xref>.</t>
</dd><dt><tt>"client_id"</tt>:</dt><dd anchor="_3164422b-2b4c-3d65-c0f1-0207a0ccb7fa"><t anchor="_9e68dec0-7897-6bfd-5e48-4abcf4c0534a">"client_id" as defined in Section 2.2 of <xref target="RFC6749" section="" relative=""></xref>.</t>
</dd><dt><tt>"response_type"</tt>:</dt><dd anchor="_fc29bffb-3528-4fb2-ca10-10644cef6c08"><t anchor="_a22e9a1c-b33c-2607-fcc5-549466250ff5">"response_type" as defined in Section 3.1.1 of <xref target="RFC6749" section="" relative=""></xref>.</t>
</dd><dt><tt>"redirect_uri"</tt>:</dt><dd anchor="_53fb0932-426c-ae1d-e7e4-499a637e473d"><t anchor="_eedc43a9-8865-c604-0be5-9e1e24d59432">"redirect_uri" as defined in Appendix A, Section A.6 of <xref target="RFC6749" section="" relative=""></xref>.</t>
</dd><dt><tt>"unicode-assignable"</tt>:</dt><dd anchor="_42002206-5d37-b5df-6097-7f323913a133"><t anchor="_fa566c70-c9a6-dc86-a05f-c99957473aa5">"Unicode Assignables" as defined in Section 4.3 of <xref target="RFC9839" section="" relative=""></xref>.</t>
</dd><dt><tt>"JSON number"</tt>:</dt><dd anchor="_6bb04ef0-34b8-84e4-3aa5-04adbdb9d0af"><t anchor="_a32305d7-df0a-0b35-1c4a-98060533760a">"number" as defined in Section 6 of <xref target="RFC8259" section="" relative=""></xref>.</t>
</dd><dt><tt>"srv-rdata"</tt>:</dt><dd anchor="_7bacc229-c2ea-50fc-98fa-01e0edcc67dd"><t anchor="_0c415595-43a0-fcf8-aa08-3ae820c09cc6">SRV RDATA fields as defined in Section 3.1 of <xref target="RFC2782" section="" relative=""></xref>.</t>
</dd><dt><tt>"service-name"</tt>:</dt><dd anchor="_2035d8db-d159-9ef7-e406-7b79ee51b72c"><t anchor="_c9e1016b-a61b-e333-6d58-a66ac694ea4f">"Service Name" as defined in Section 5.1 of <xref target="RFC6335" section="" relative=""></xref>.</t>
</dd><dt><tt>"presentation format"</tt>:</dt><dd anchor="_f5c92ad8-e9c4-c275-5c73-300f9b2babd7"><t anchor="_45a2fce4-7f0d-f9f7-f749-548b18d3771d">"Presentation Format" as defined in Section 1 of <xref target="RFC9499" section="" relative=""></xref>.</t>
</dd></dl>

<t anchor="_786af4f8-fbb2-c9c3-7438-4f4cdaab092a">The following additional syntax rules are defined in this document and used normatively throughout.</t>

<dl anchor="_8f2fedd9-7844-930f-34a0-f39844847628"><dt><tt>"dc-name-char"</tt>:</dt><dd anchor="_187cb9c0-aa24-4def-d05b-49be3287102d"><t anchor="_ab78b5a5-7a3d-e539-ecc6-8542f54d82b9">any Unicode Assignable code point allowed in <tt>"domain-name"</tt> except "%" and "@"</t>
</dd></dl>

<t anchor="_0b56576e-a987-a78d-9d33-6c1e875899b9">The following additional ABNF rules are defined in this document and used normatively throughout.</t>

<sourcecode anchor="_c5acee20-8b33-9a0e-8477-7e119a9a652c" type="abnf"><![CDATA[; ---- Identifier rules ----

dc-id          =  1*63( ALPHA / DIGIT / "-" / "_" / "." )
                ; non-empty token, max 63 octets;
                ; used for providerId, serviceId, groupId,
                ; instanceId

dc-id-list     =  dc-id *( "," dc-id )
                ; comma-separated list of dc-id values;
                ; used for groupId parameter

dc-scope       =  dc-id *( SP dc-id )
                ; space-separated list of dc-id values;
                ; strict subset of OAuth 2.0 scope (RFC 6749
                ; Appendix A.4);
                ; used for the scope parameter

dc-host-list   =  domain-name *( *SP "," *SP domain-name )
                ; comma-separated list of domain names

; ---- Other parameter rules ----

dc-sig         =  1*( ALPHA / DIGIT / "+" / "/" / "=" )
                ; standard base64 alphabet per RFC 4648 Section 4

dc-underscore-label =  "_" 1*( ALPHA / DIGIT / "-" )
                    ; RFC 8552 underscore-prefixed DNS label,
                    ; max 63 octets total

dc-key-label   =  a-label / dc-underscore-label
                ; plain ACE label or RFC 8552 underscore label;
                ; used for the key parameter

dc-pubkey-domain    =  *( dc-underscore-label "." ) domain-name
                    ; zero or more underscore labels prepended
                    ; to an IDNA domain name, per RFC 8552
                    ; user for syncPubKeyDomain

dc-display-name =  1*255unicode-assignable
                ; non-empty string of at most 255 Unicode
                ; Assignable code points per RFC 9839 Section 4.3;
                ; used for providerName and serviceName

dc-description-text =  0*2048unicode-assignable
                ; a string of at most 2048 Unicode
                ; Assignable code points per RFC 9839 Section 4.3;
                ; used for description and variableDescription

dc-force       =  "0" / "1"
                ; used for force parameter
                ; 0 = respect conflicts, 1 = override conflicts

dc-version     =  %x31-39 *DIGIT
                ; positive integer, no leading zeros,
                ; no fraction, no exponent;
                ; a strict subset of JSON number (RFC 8259
                ; Section 6); used for template version

; ---- Variable expression rules ----

variable-expression =  named-variable / template-apex-var
                ; parameterized expression in a template field

named-variable  =  "%" variable-name "%"
                ; %-delimited named variable

template-apex-var =  "@"
                ; zone-apex / fqdn shorthand; MUST appear alone
                ; in host/name or pointsTo/data fields

variable-name   =  1*( ALPHA / DIGIT / "-" / "_" )
                ; identifier of a template variable

; ---- Template record field rules ----

dc-record-type =  ( "A" / "AAAA" / "CNAME" / "MX" / "TXT"
                  / "SRV" / "SPFM" / "NS" )
                ; named core and pseudo record types
                /  "TYPE" 1*DIGIT
                ; unknown type per RFC 3597
                /  1*(ALPHA / DIGIT / "-")
                ; any other IANA-registered RR type name

dc-essential   =  "Always" / "OnApply"
                ; default is "Always"

dc-txt-conflict-mode =  "None" / "All" / "Prefix"
                ; default is "None"

dc-conflict-prefix =  1*(%x21-7E)
                ; non-empty printable ASCII (U+0021..U+007E);
                ; no variable expressions permitted

; -- property value field --

dc-prop-value  =  *( dc-prop-char / dc-rdata-escape )
                ; DNS presentation format (RFC 9499);

dc-prop-char   =  %x20-7E
                ; space and all printable ASCII (U+0020..U+007E);

dc-rdata-escape =  "\" ( 3DIGIT / %x21-7E )
                 ; RFC 1035 Section 5.1 octet escape:
                 ; "\DDD" three decimal digits, or
                 ; "\" followed by any printable non-digit character

; -- host / name / pointsTo / target fields --


 dc-host-tmpl    =  template-apex-var
                 ; "@" alone
                 /  1*( named-variable / dc-name-char )
                 ; mix of literal chars and %-variables

 dc-pointsto-tmpl =  template-apex-var
                 ; "@" alone
                 /  1*( dc-name-char / named-variable )
                 ; mix of literal chars and %-variables

 dc-pointsto-nat-tmpl =  1*( dc-name-char / named-variable )
                 ; mix of literal chars and %-variables

; -- integer fields with optional variable --

dc-ttl-tmpl    =  1*DIGIT / named-variable
                ; constant seconds, or a sole %-variable

dc-ttl-value   =  1*DIGIT
                ; non-negative integer seconds, resolved

dc-uint16-tmpl  =  ( %x30-39 *4DIGIT ) / named-variable
                ; 0-65535 literal, or a sole %-variable

dc-uint16-value =  %x30-39 *4DIGIT
                ; resolved non-negative integer, max 5 digits,
                ; semantic range 0-65535

; -- SRV-specific string fields --

dc-srv-protocol =  "_tcp" / "_udp" / "_sctp" / "_dccp"
                ; underscore-prefixed transport per RFC 2782

dc-srv-service  =  dc-underscore-label
                ; underscore-prefixed service name per RFC 6335]]></sourcecode>


<t anchor="_5c27fd53-bd19-d175-5684-807399297ec8">Internationalized domain names (IDN) are handled in accordance with <xref target="RFC5891" section="" relative=""></xref>. Where a parameter description specifies  <tt>"domain-name"</tt>, both the ACE (<tt>"A-label"</tt>) and the Unicode (<tt>"U-label"</tt>) forms are accepted.</t>

<dl anchor="_fbdabfe8-d168-c0d3-4db4-a81cb269406b"><dt>Service Provider:</dt><dd anchor="_c5f2bf61-2083-0b85-0aac-86efbacd1ab5"><t anchor="_4e321ecd-bb84-54f3-f1c7-a4556b708d1d">An entity that offers products and services that are configured or accessed using domain names. These services typically rely on DNS for setup, discovery and/or operation. Examples include web hosting, email services, cloud platforms, and other online applications.</t>
</dd><dt>DNS Provider:</dt><dd anchor="_71ba7536-6a8a-b516-646b-1a3b1f25469f"><t anchor="_f3b5bfe8-6947-616f-3490-98a74701169f">An entity that offers DNS zone hosting services. DNS Providers are responsible for hosting the DNS zone for a domain name and providing the necessary tools to manage the DNS records. DNS Provider would be an Authoritative server operator for the hosted zones, or would have a contractual relationship with the operator to manage zone distribution over DNS.</t>
</dd><dt>User:</dt><dd anchor="_0f018ac7-d713-9dd4-71b2-49720f5d5fbf"><t anchor="_279eaa62-6f2c-1daa-c6ad-524590606935">Refers to the end-user who has means to control domain name's DNS configuration at DNS Provider and wishes to configure it to work with a service provided by a Service Provider.</t>
</dd><dt>Service Template/Template:</dt><dd anchor="_971fe7d8-33e3-bb13-cfc1-29123c77e8ba"><t anchor="_46ca1fa7-d548-982c-556c-ffc1bc707165">A structured data format that describes a set of configurations for DNS records required by a Service Provider to configure a certain service together with metadata related to the control flow of Domain Connect protocol. A template is used as a means of communication between Service Provider and DNS Provider.</t>
</dd></dl>
</section>
    <section anchor="_6ec51cd3-7c65-a2d5-f181-85872018f191"><name>Protocol design</name>

<section anchor="_3f7cf203-830e-7754-3d43-a09639033ac6"><name>Templates</name>

<t anchor="_01ed9779-ed57-051a-ce6d-a1217fdd612b">Templates are core to Domain Connect, as they fully describe a service owned by a Service Provider and contain all of the information necessary to enable and operate/maintain the service in the form of a set of records.</t>

<t anchor="_8443c1fe-6c4b-5779-2ac9-e704cf0a15ea">The individual records in a template MAY be assigned to a group identified by a <tt>"groupId"</tt>. This allows for the application of templates in different stages. For example, an email provider might first set a TXT record to verify the domain, and later set an MX record to configure email delivery. While done separately, both changes are fundamentally part of the same service.</t>

<t anchor="_3c0460cd-a8c1-8085-0d3b-3177b2fee7b7">Templates MAY also contain variable portions, as often values of data in DNS change based on the implementation and/or user of the service (e.g. the IP address of a service, a user id, etc.).</t>

<t anchor="_fcbf6987-7391-9129-0614-4173d7ad0bfe">The template is defined by the Service Provider and manually onboarded with the DNS Provider. This is an out-of-band process between the Service Provider and the DNS Provider and not covered by this specification.</t>
</section>

<section anchor="trust-model"><name>Trust Model</name>

<t anchor="_043b4b0f-9c5d-5777-da64-026017e020c7">DNS Providers are trusted parties by virtue of their existing full access to the DNS zone. DNS Providers enforce user authorization checks before enacting any DNS zone changes, and present proposed changes to the user in a human-readable form.</t>

<t anchor="_91420f30-b71d-61e6-9e14-2c19319b84c6">Service Providers are not assumed to be trusted by default. A malicious actor may attempt to exploit user trust by impersonating a legitimate Service Provider. Trust between DNS Providers and Service Providers is therefore established out-of-band - typically through an onboarding process involving contractual agreements or template acceptance policies - during which the DNS Provider verifies the legitimacy of the Service Provider and its templates.</t>

<t anchor="_30be44f6-ef2e-ae18-0f9c-50cc088b3525">Templates define and restrict the permitted scope of DNS modifications. By fixing the records that a Service Provider may affect, templates ensure that no changes beyond the approved scope can be applied.</t>
</section>
</section>
    <section anchor="_b5fd0d53-2e48-3751-c77b-e128b4874db8"><name>Protocol Flows Overview</name>

<section anchor="_84c8465e-c69f-f068-5c2b-cc530266de83"><name>General information</name>

<t anchor="_192579e0-1896-a551-1984-1e0c1e20e7e1">To attach a domain name to a service provided by a Service Provider, the user would first enter their domain name.</t>

<t anchor="_ccda0464-67af-f06c-7621-7467c239f758">Instead of relying on examination of the nameservers and mapping these to DNS Providers, DNS Provider discovery is handled through simple records in DNS and an API. The Service Provider queries for a specific record in the zone that returns a REST endpoint to initiate the protocol. When this endpoint is called, a Domain Connect compliant DNS Provider returns information about that domain and how to configure it using Domain Connect.</t>

<t anchor="_567dbccb-401e-56ce-16ee-d7005d48fbb3">To apply the changes to DNS, there are two use cases. The first is a synchronous web flow, and the second is an asynchronous flow using OAuth and an API.</t>

<t anchor="_33b6321e-36c1-9f5c-a583-c1deb2e0ee73">It is noted that a DNS Provider MAY choose to only implement one of the flows, however it is RECOMMENDED to implement Synchronous Flow which fulfill needs of most Service Providers.</t>

<t anchor="_a307aa69-29c5-ad2a-95da-7fd90c152b2d">Individual Service Providers MAY work with the synchronous flow only, the asynchronous flow only, or with both.</t>
</section>

<section anchor="_4d202576-3a8d-f72d-d196-ebcf9efaedde"><name>The Synchronous Flow</name>

<t anchor="_6efad61c-d975-5953-250c-7037e32a9dd6">This flow is tailored for the Service Provider that requires a user-attended, one-time change to DNS configuration. In this flow, the user is present throughout: they authenticate with the DNS Provider and explicitly consent to the changes within a single interaction session.</t>

<t anchor="_29ad679d-74ad-bbde-b005-d03eccb696a8">The term "synchronous" refers to this user-interaction model - not to immediate DNS propagation. The DNS Provider commits to applying the template upon user consent, but the changes MAY be queued internally and propagation to authoritative servers MAY take additional time. Service Providers MUST NOT assume that DNS records are resolvable immediately after the flow completes; see  <xref target="verification-of-changes"></xref>.</t>

<figure anchor="_f17f079c-6439-a2ba-879e-5ffab828d667">

<name>Sequence diagram of Synchronous Flow</name><artwork type="ascii-art"><![CDATA[       ,-.
       `-'
       /|\
        |     ,----------------.   ,------------.          ,----------.
       / \    |Service Provider|   |DNS Provider|          |DNS Server|
      User    `--------+-------'   `------+-----'          `-----+----'
     1 Provides domain name               |                      |
        |------------->|                  |                      |
        |              |                  |                      |
        |              |       2 Initiates DNS discovery         |
        |              |---------------------------------------->|
        |              |                  |                      |
        |              |         3 Responds with                 |
        |              |         discovery URL fragment          |
        |              |<----------------------------------------|
        |              |                  |                      |
        |        4 Requests DNS Provider settings                |
        |              |----------------->|                      |
        |              |                  |                      |
        |              5 Provides settings|                      |
        |              |<-----------------|                      |
        |              |                  |                      |
        |        6 Queries for supported template                |
        |              |----------------->|                      |
        |              |                  |                      |
        |              7 Responds template|                      |
        |              support status     |                      |
        |              |<-----------------|                      |
        |              |                  |                      |
   8 Presents connection link             |                      |
        |<-------------|                  |                      |
        |              |                  |                      |
        |  9 Navigates to DNS Provider    |                      |
        |-------------------------------->|                      |
        |              |                  |                      |
        |              |                  |                      |
        _________________________________________________________|
        ! ALT  /  if the template requires signing               !
        !_____/        |                  |                      !
        !              10 Lookup URL      |                      !
        !              signature keys (DNS)                      !
        !              |<-----------------|                      !
        !              |                  |                      !
        !              |                  |----.                 !
        !              |                  |    | 11 Check        !
        !              |                  |<---' request URL     !
        !              |                  |      signature       !
        !              |                  |                      !
        !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
        |              |                  |                      |
        |   12 Requests authentication    |                      |
        |<--------------------------------|                      |
        |              |                  |                      |
        |        13 Authenticate          |                      |
        |-------------------------------->|                      |
        |              |                  |                      |
        |              |                  |----.                 |
        |              |                  |    | 14 Check domain |
        |              |                  |<---' ame in          |
        |              |                  |      customer's      |
        |              |                  |      account         |
        |              |                  |                      |
        |              |                  |                      |
        15 Requests consent for DNS changes                      |
        |<--------------------------------|                      |
        |              |                  |                      |
        |      16 Confirms consent        |                      |
        |-------------------------------->|                      |
        |              |                  |                      |
        |              |                  17 Apply changes to DNS|
        |              |                  |--------------------->|
        |              |                  |                      |
        |           18 Redirect/ Close window                    |
        |              |<- - - - - - - - -|                      |
        |              |                  |                      |
        |              |          19 Query DNS records           |
        |              |---------------------------------------->|
        |              |                  |                      |
        |              |           20 New DNS records            |
        |              |<----------------------------------------|
        |              |                  |                      |
       21 Report success                  |                      |
        |<-------------|                  |                      |]]></artwork></figure>

<t anchor="_accd7026-b6c6-a930-bd5f-7f9e8d65d058">Steps:</t>

<ol anchor="_b918245b-d2e4-95ed-b9a6-bd2d03f913ce" type="1"><li><strong>User Provides Domain Name</strong>: The user initiates the process by providing their domain name to the Service Provider.</li>
<li><strong>Service Provider Initiates DNS Discovery</strong>: The Service Provider queries the DNS provider to discover the Domain Connect settings for the given domain.</li>
<li><strong>DNS Provider Responds with Discovery URL Fragment</strong>: The DNS Provider responds with a URL fragment containing information where to query settings of DNS provider for a domain name.</li>
<li><strong>Service Provider Requests DNS Provider Settings</strong>: The Service Provider uses the URL fragment to request the complete Domain Connect settings from the DNS Provider.</li>
<li><strong>DNS Provider Provides Settings</strong>: The DNS Provider provides the settings, including information about API endpoints.</li>
<li><strong>Service Provider Queries for Supported Template</strong>: The Service Provider checks if the DNS Provider supports the specific template required for the service.</li>
<li><strong>DNS Provider Responds with Template Support Status</strong>: The DNS Provider confirms if they support the requested template.</li>
<li><strong>Service Provider Presents Connection Link</strong>: The Service Provider presents a connection link to the user, which leads to the DNS Provider's Domain Connect service.</li>
<li><strong>User Navigates to DNS Provider</strong>: The user navigates the link and user agent is directed to the DNS Provider's website.</li>
<li><strong>DNS Provider Performs URL Lookup and Signature Key Verification (if required)</strong>: If the template requires signing, the DNS Provider looks up the URL signature keys in DNS.</li>
<li><strong>DNS Provider Checks Request URL Signature (if required)</strong>: The DNS Provider verifies the signature of the request URL.</li>
<li><strong>Service Provider Requests Authentication</strong>: The Service Provider requests authentication from the user.</li>
<li><strong>User Authenticates</strong>: The user authenticates with the DNS Provider.</li>
<li><strong>DNS Provider Checks Domain Name in Customer's Account</strong>: The DNS Provider verifies that the user is authorized to make change to the domain's DNS zone.</li>
<li><strong>DNS Provider Requests Consent for DNS Changes</strong>: The DNS Provider asks the user for consent to apply the changes to the DNS zone.</li>
<li><strong>User Confirms Consent</strong>: The user confirms their consent to the DNS changes.</li>
<li><strong>DNS Provider Applies Changes to DNS</strong>: The DNS Provider applies the changes to the zone.</li>
<li><strong>DNS Provider Redirects or User Flow Termination</strong>: The DNS Provider either redirects the user agent back to the Service Provider or gracefully terminates the user flow.</li>
<li><strong>Service Provider Queries DNS Records</strong>: The Service Provider queries the DNS records to verify that the changes have been applied.</li>
<li><strong>DNS Server Returns New DNS Records</strong>: The DNS Server returns the updated DNS records.</li>
<li><strong>Service Provider Reports Success</strong>: The Service Provider reports to the user that the domain has been successfully connected to the service.</li>
</ol>
</section>

<section anchor="_6482cff6-83f7-14d3-c975-19039507c115"><name>The Asynchronous Flow</name>

<t anchor="_dbf9294e-d0db-0765-dc45-9f11d6fff4f4">The asynchronous OAuth flow is tailored for the Service Provider that wishes to make changes to DNS asynchronously with respect to the user interaction, or wishes to make multiple or additional changes to DNS over time.</t>

<figure anchor="_a925a8f1-52c5-d7b6-d11a-4bf0be38e70a">

<name>Sequence diagram of Asynchronous Flow</name><artwork type="ascii-art"><![CDATA[       ,-.
       `-'
       /|\
        |     ,----------------.   ,------------.          ,----------.
       / \    |Service Provider|   |DNS Provider|          |DNS Server|
      User    `--------+-------'   `------+-----'          `-----+----'
        .              .                  .                      .
        .        Steps 1-14 same as for Synchronous flow         .
        .              .                  .                      .
        |              |                  |                      |
        |              |                  |                      |
        |    15 Requests consent for      |                      |
        |    (future) DNS changes         |                      |
        |<--------------------------------|                      |
        |              |                  |                      |
        |       16 Grants consent         |                      |
        |-------------------------------->|                      |
        |              |                  |                      |
        |             17 Provides OAuth code                     |
        |              |<-----------------|                      |
        |              |                  |                      |
        |          18 Exchanges code for token                   |
        |              |----------------->|                      |
        |              |                  |                      |
        |            19 Returns access token                     |
        |              |<-----------------|                      |
        .              .                  .                      .
        .              .          Later   .                      .
        .              .                  .                      .
        .        20 Sends API request with token                 .
        |              |----------------->|                      |
        |              |                  |                      |
        |              |                  21 Apply changes to DNS|
        |              |                  |--------------------->|
        |              |                  |                      |
        |              22 Respond success |                      |
        |              |<-----------------|                      |
        |              |                  |                      |
        |              |          23 Query DNS records           |
        |              |---------------------------------------->|
        |              |                  |                      |
        |              |           24 New DNS records            |
        |              |<----------------------------------------|
        |              |                  |                      |
   25 Report success (async)              |                      |
        |<- - - - - - -|                  |                      |]]></artwork></figure>

<t anchor="_b69ab297-5e35-b219-4339-fcf0d325dc36">Steps:</t>

<t anchor="_385a7e18-0c15-426b-c7d1-77e78958b56f">1-14: Same as for the Synchronous Flow.</t>

<ol anchor="_03337003-ffc1-12a5-e8ae-79776360a4e8" type="1" start="15"><li><strong>DNS Provider Requests Consent for (Future) DNS Changes</strong>: The DNS Provider asks the user for consent to allow the Service Provider to make DNS changes on their behalf in the future.</li>
<li><strong>User Grants Consent</strong>: The user grants consent for future DNS changes.</li>
<li><strong>DNS Provider Provides OAuth Code</strong>: The DNS Provider provides an OAuth code to the Service Provider.</li>
<li><strong>Service Provider Exchanges Code for Token</strong>: The Service Provider exchanges the OAuth code for an access token.</li>
<li><strong>DNS Provider Returns Access Token</strong>: The DNS Provider provides an access token to the Service Provider.</li>
<li><strong>Service Provider Sends API Request with Token (Later)</strong>: At a later time, the Service Provider uses the access token to send an API request to apply the template to the domain.</li>
<li><strong>DNS Provider Applies Changes to DNS</strong>: The DNS Provider applies the changes to the DNS zone.</li>
<li><strong>DNS Provider Responds with Success</strong>: The DNS Provider responds to the Service Provider with success.</li>
<li><strong>Service Provider Queries DNS Records</strong>: The Service Provider queries the DNS records to verify that the changes have been applied.</li>
<li><strong>DNS Server Returns New DNS Records</strong>: The DNS Server returns the updated DNS records.</li>
<li><strong>Service Provider Reports Success (Asynchronous)</strong>: The Service Provider reports to the user that the domain has been successfully connected to the service.</li>
</ol>
</section>
</section>
    <section anchor="domain-connect-objects-and-templates"><name>Domain Connect Objects and Templates</name>

<section anchor="template-definition"><name>Template Definition</name>

<t anchor="_f8fd66dd-471d-2e03-3bbf-25b7594350a0">A template is defined as a standard JSON data structure containing the following data. Field values MUST be defined unless otherwise indicated.</t>

<table anchor="_b736a4da-46b2-b113-5564-7d4e48d1a67d"><name>properties of the template definition</name><thead><tr><th align="left">Data Element</th><th align="left">Type</th><th align="left">Key</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>Service Provider Id</strong></td><td align="left">String</td><td align="left">providerId</td><td align="left">(REQUIRED) The unique identifier of the Service Provider that created this template. This is used in the URLs to identify the Service Provider.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).<br />  To ensure non-coordinated uniqueness, this SHOULD be the domain name of the Service Provider (e.g. exampleservice.example).</td></tr><tr><td align="left"><strong>Service Provider Name</strong></td><td align="left">String</td><td align="left">providerName</td><td align="left">(REQUIRED) The name of the Service Provider, suitable for display to the user.<br />  The value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service Id</strong></td><td align="left">String</td><td align="left">serviceId</td><td align="left">(REQUIRED) The name or identifier of the template. This is used in URLs to identify the template and in the scope parameter for OAuth.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service Name</strong></td><td align="left">String</td><td align="left">serviceName</td><td align="left">(REQUIRED) The name of the service, suitable for display to the user.<br />  The value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Version</strong></td><td align="left">Integer</td><td align="left">version</td><td align="left">(OPTIONAL) If present this represents a version of the template and SHOULD be changed with each update of the template content. This opaque value is mainly informational to improve communication and transparency between providers.<br />  The value MUST conform to the  <tt>dc-version</tt> syntax (see <xref target="terminology"></xref>).<br />  This is a strict subset of the  <tt>"JSON number"</tt>: a positive integer with no leading zeros, no fractional part, and no exponent part.</td></tr><tr><td align="left"><strong>Logo</strong></td><td align="left">String</td><td align="left">logoUrl</td><td align="left">(OPTIONAL) A graphical logo representing the Service Provider and/or Service for use in any web-based flow. If present this MAY be displayed to the user on the DNS Provider consent UX.<br />  When present, the value MUST be a valid URI  <xref target="RFC3986" section="" relative=""></xref> with scheme <tt>"https"</tt>.</td></tr><tr><td align="left"><strong>Description</strong></td><td align="left">String</td><td align="left">description</td><td align="left">(OPTIONAL) A textual description of what this template does, intended for developer reference. This value is not intended for display to the end user.<br />  The value MUST conform to the  <tt>dc-description-text</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Variable Description</strong></td><td align="left">String</td><td align="left">variableDescription</td><td align="left">(OPTIONAL) A textual description of the template variables, intended for developer reference. This value is not intended for display to the end user.<br />  The value MUST conform to the  <tt>dc-description-text</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Synchronous Block</strong></td><td align="left">Boolean</td><td align="left">syncBlock</td><td align="left">(OPTIONAL) When <tt>"true"</tt>, indicates that this template does not support the synchronous flow.<br />  The default is  <tt>"false"</tt>.</td></tr><tr><td align="left"><strong>Shared</strong></td><td align="left">Boolean</td><td align="left">shared</td><td align="left">(OPTIONAL) This flag has been deprecated. It used to indicate that the template allowed a dynamic  <tt>"providerName"</tt> on the query string. It is replaced with the <tt>"sharedProviderName"</tt> flag in v2.2 of the spec.</td></tr><tr><td align="left"><strong>Shared Provider Name</strong></td><td align="left">Boolean</td><td align="left">sharedProviderName</td><td align="left">(OPTIONAL) When <tt>"true"</tt>, indicates that the caller MAY supply an additional <tt>"providerName"</tt> parameter at apply time.<br />  The default is  <tt>"false"</tt>.<br />  For backward compatibility with DNS Providers prior to v2.2, it is RECOMMENDED that the deprecated  <tt>"shared"</tt> flag also be set.</td></tr><tr><td align="left"><strong>Shared Service Name</strong></td><td align="left">Boolean</td><td align="left">sharedServiceName</td><td align="left">(OPTIONAL) When <tt>"true"</tt>, indicates that the caller MAY supply an additional <tt>"serviceName"</tt> parameter at apply time.<br />  The default is  <tt>"false"</tt>.</td></tr><tr><td align="left"><strong>Synchronous Public Key Domain</strong></td><td align="left">String</td><td align="left">syncPubKeyDomain</td><td align="left">(OPTIONAL) The domain name under which the Service Provider's public signing key TXT record is published. When present, this field signals that digital signing is required for synchronous apply requests.<br />  The value MUST conform to the  <tt>dc-pubkey-domain</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Synchronous Redirect Domains</strong></td><td align="left">String</td><td align="left">syncRedirectDomain</td><td align="left">(OPTIONAL) A comma-separated list of domain names to which the DNS Provider is permitted to send the post-apply redirect in the synchronous flow.<br />  The value MUST conform to the  <tt>"dc-host-list"</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Multiple Instance</strong></td><td align="left">Boolean</td><td align="left">multiInstance</td><td align="left">(OPTIONAL) When <tt>"true"</tt>, indicates that the template is designed to be applied multiple times to the same domain and host.<br />  The default is  <tt>"false"</tt>.</td></tr><tr><td align="left"><strong>Warn Phishing</strong></td><td align="left">Boolean</td><td align="left">warnPhishing</td><td align="left">(OPTIONAL) When <tt>"true"</tt>, signals that the template contains variables that cannot be constrained by digital signing and may be susceptible to phishing.<br />  The default is  <tt>"false"</tt>.</td></tr><tr><td align="left"><strong>Host Required</strong></td><td align="left">Boolean</td><td align="left">hostRequired</td><td align="left">(OPTIONAL) When <tt>"true"</tt>, indicates that the template is designed to work only when both <tt>"domain"</tt> and <tt>"host"</tt> apply parameters are provided, for example when the template contains a CNAME record targeted at the fully qualified domain name.<br />  The default is  <tt>"false"</tt>.</td></tr><tr><td align="left"><strong>Template Records</strong></td><td align="left">Array of Template Records</td><td align="left">records</td><td align="left">(REQUIRED) A list of records for the template.</td></tr></tbody></table>
</section>

<section anchor="template-record"><name>Template Record</name>

<t anchor="_0626a7a3-bf03-e558-d414-2a07da1f7f57">Each template record is an entry that contains a type and several other values depending on the type.</t>

<t anchor="_dae0a9c8-a25d-45f2-f33f-b895c8d273ee">Many of these values can contain variables, which are expressed as strings surrounded with "%" or special variable "@" (See: <xref target="variables"></xref>). Variables are replaced with values when the template is applied.</t>

<t anchor="_105fd4aa-73cf-da31-ab18-d99f9b9070b3">Each record MUST contain the following elements unless otherwise specified.</t>

<table anchor="_b8e0a42d-3bc2-3d4e-4231-6f912a9c6f3c"><name>properties of the template record definition</name><thead><tr><th align="left">Data Element</th><th align="left">Type</th><th align="left">Key</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>Type</strong></td><td align="left">enum</td><td align="left">type</td><td align="left">(REQUIRED) Describes the type of record in DNS, or the operation impacting DNS.<br />  Valid values include: A, AAAA, CNAME, MX, TXT, SRV, or SPFM.<br /> The DNS Provider MUST support the core set of records A, AAAA, CNAME, MX, TXT, SRV.<br /> The DNS Provider SHOULD support SPFM record for high interoperability with existing templates<br /> <br /> All other record types MAY be specified by type name as listed in IANA registry for DNS Resource Record (RR) TYPEs. Unknown record types MAY be specified as per  <xref target="RFC3597" section="" relative=""></xref> by the word "TYPE" immediately followed by the decimal RR type number, with no intervening whitespace. Support for other record types is OPTIONAL.<br />  The value MUST conform to the  <tt>dc-record-type</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Group ID</strong></td><td align="left">String</td><td align="left">groupId</td><td align="left">(OPTIONAL) This parameter identifies the group the record belongs to when applying changes.  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>) and MUST NOT contain variable expressions.</td></tr><tr><td align="left"><strong>Essential</strong></td><td align="left">enum</td><td align="left">essential</td><td align="left">(OPTIONAL) This parameter indicates how the record is treated during conflict detection with existing templates.<br />  If the DNS Provider is not implementing applied template state in DNS this is ignored.<br />  Always (default) - record MUST be applied and kept with the template<br />  OnApply - record MUST be applied but can be later removed without dropping the whole template<br />  The value MUST conform to the  <tt>dc-essential</tt> syntax (see <xref target="terminology"></xref>).<br />  If omitted, the value MUST be assumed to be  <tt>"Always"</tt>.</td></tr><tr><td align="left"><strong>Host</strong></td><td align="left">String</td><td align="left">host</td><td align="left">(REQUIRED) The host for A, AAAA, CNAME, NS, TXT, MX and other unspecified record type values.<br />  This value is relative to the applied host and domain, unless trailed by a ".".<br />  A value of empty or  <tt>"@"</tt> indicates the root of the applied host and domain. In other words <tt>"[host.]example.com."</tt>.<br />  When used in a template definition, the value MUST conform to the  <tt>dc-host-tmpl</tt> syntax (see <xref target="terminology"></xref>).<br />  After variable substitution, the resolved value MUST conform to the  <tt>domain-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Name</strong></td><td align="left">String</td><td align="left">name</td><td align="left">The name for the SRV record.<br />  This value is relative to the applied host and domain. A value of empty or  <tt>"@"</tt> indicates the root of the applied host and domain.<br />  When used in a template definition, the value MUST conform to the  <tt>dc-host-tmpl</tt> syntax (see <xref target="terminology"></xref>).<br />  After variable substitution, the resolved value MUST conform to the  <tt>domain-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Points To</strong></td><td align="left">String</td><td align="left">pointsTo</td><td align="left">The pointsTo location for A, AAAA, CNAME, NS and MX records.<br />  When used in a template definition, the value MUST conform to the  <tt>"dc-pointsto-tmpl"</tt> syntax for <tt>"CNAME"</tt>/<tt>"MX"</tt> and to the <tt>"dc-pointsto-nat-tmpl"</tt> syntax for A/AAAA/NS (see <xref target="terminology"></xref>).<br />  After variable substitution, the resolved value MUST conform to the presentation format of the corresponding resource record type.</td></tr><tr><td align="left"><strong>TTL</strong></td><td align="left">Int or string repr. of Int</td><td align="left">ttl</td><td align="left">The time-to-live for the record in DNS. Valid for A, AAAA, CNAME, NS, TXT, MX, and SRV records. This SHOULD NOT contain variables unless absolutely necessary.<br />  When used in a template definition, the value MUST conform to the  <tt>dc-ttl-tmpl</tt> syntax (see <xref target="terminology"></xref>).<br />  After variable substitution, the resolved value MUST conform to the  <tt>dc-ttl-value</tt> syntax.  This value, no matter if variable or constant, is understood as "best effort" by DNS Provider and MAY be limited or adjusted by local policy at runtime or during template onboarding, like applying a certain minimum or maximum value of TTL or an enumeration of TTL values supported by the DNS Provider. The DNS Provider SHOULD NOT reject template application because of invalid value, rather pick the nearest supported value or a default, in order to avoid necessity of per provider adjustment to the application flow.  Support of variables in this field is OPTIONAL for DNS Provider.</td></tr><tr><td align="left"><strong>Data</strong></td><td align="left">String</td><td align="left">data</td><td align="left">For TXT record <tt>"data"</tt> contains TXT-DATA <xref target="RFC1035" section="" relative=""></xref> in presentation format. For a single <tt>"&#x3c;character-string&#x3e;"</tt> the heading and trailing <tt>"</tt> character MAY be omitted even if space character is present in the value.  <tt>"data"</tt> MUST NOT be present in a template record for any other record type that has type-specific data fields defined in this specification.  For any unspecified record type, this field contains the canonical presentation format of the record, following  <xref target="RFC3597" section="" relative=""></xref> generic or type-specific encoding.</td></tr><tr><td align="left"><strong>TXT Conflict Matching Mode</strong></td><td align="left">String</td><td align="left">txtConflictMatchingMode</td><td align="left">Describes how conflicts on the TXT record are detected. Possible values are None, All, or Prefix.  <xref target="conflict-detection">See below</xref>.<br />  The value MUST conform to the  <tt>dc-txt-conflict-mode</tt> syntax (see <xref target="terminology"></xref>).<br />  If omitted, the value MUST be assumed to be  <tt>"None"</tt>.</td></tr><tr><td align="left"><strong>TXT Conflict Matching Prefix</strong></td><td align="left">String</td><td align="left">txtConflictMatchingPrefix</td><td align="left">The prefix to detect conflicts when txtConflict-MatchingMode is <tt>"Prefix"</tt>. <xref target="conflict-detection">See below</xref>.<br />  The value MUST conform to the  <tt>dc-conflict-prefix</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Priority</strong></td><td align="left">Int or string repr. of Int</td><td align="left">priority</td><td align="left">The priority for an MX or SRV record.<br />  When used in a template definition, the value MUST conform to the  <tt>dc-uint16-tmpl</tt> syntax (see <xref target="terminology"></xref>).<br />  After variable substitution, the resolved value MUST conform to the  <tt>dc-uint16-value</tt> syntax.<br />  Support of variables in this field is OPTIONAL for DNS Provider.</td></tr><tr><td align="left"><strong>Weight</strong></td><td align="left">Int or string repr. of Int</td><td align="left">weight</td><td align="left">The weight for the SRV record.<br />  When used in a template definition, the value MUST conform to the  <tt>dc-uint16-tmpl</tt> syntax (see <xref target="terminology"></xref>).<br />  After variable substitution, the resolved value MUST conform to the  <tt>dc-uint16-value</tt> syntax.<br />  Support of variables in this field is OPTIONAL for DNS Provider.</td></tr><tr><td align="left"><strong>Port</strong></td><td align="left">Int or string repr. of Int</td><td align="left">port</td><td align="left">The port for the SRV record.<br />  When used in a template definition, the value MUST conform to the  <tt>dc-uint16-tmpl</tt> syntax (see <xref target="terminology"></xref>).<br />  After variable substitution, the resolved value MUST conform to the  <tt>dc-uint16-value</tt> syntax.<br />  The resolved value is further constrained to the range 0-65535 as defined by  <xref target="RFC6335" section="" relative=""></xref>.<br />  Support of variables in this field is OPTIONAL for DNS Provider.</td></tr><tr><td align="left"><strong>Protocol</strong></td><td align="left">String</td><td align="left">protocol</td><td align="left">The protocol for the SRV record.<br />  The value MUST conform to the  <tt>dc-srv-protocol</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service</strong></td><td align="left">String</td><td align="left">service</td><td align="left">The symbolic service name for the SRV record.<br />  The value MUST conform to the  <tt>dc-srv-service</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Target</strong></td><td align="left">String</td><td align="left">target</td><td align="left">The target hostname for the SRV record as defined in Section 3.1 of <xref target="RFC2782" section="" relative=""></xref>.<br />  When used in a template definition, the value MUST conform to the  <tt>dc-pointsto-tmpl</tt> syntax (see <xref target="terminology"></xref>), or be the single label <tt>"."</tt> to indicate that the service is not available.<br />  After variable substitution, the resolved value MUST conform to the  <tt>domain-name</tt> syntax (see <xref target="terminology"></xref>), or be <tt>"."</tt>.</td></tr><tr><td align="left"><strong>SPF Rules</strong></td><td align="left">String</td><td align="left">spfRules</td><td align="left">These are desired rules for the SPF TXT record. These rules SHOULD be merged with other SPFM records into final SPF TXT record. See <xref target="spf-record-merging"></xref>. The value MUST contain only mechanism and modifier terms as defined in  <xref target="RFC7208" section="" relative=""></xref> Section 5, excluding the version prefix (<tt>"v=spf1"</tt>) and the terminating <tt>"all"</tt> qualifier. The DNS Provider MUST validate the syntax before merging.</td></tr></tbody></table>

<t anchor="_994811e9-01bd-b42d-6658-19766396d284">The following table lists the fields that MAY be defined for each record type. Other fields MUST NOT be used.</t>

<table anchor="_c2da8504-568e-931c-177f-f5f0a663c6f0"><name>Fields per record type</name><thead><tr><th align="left">Type</th><th align="left">Required fields</th></tr></thead><tbody><tr><td align="left"><tt>"A"</tt></td><td align="left"><tt>"host"</tt>, <tt>"pointsTo"</tt>, <tt>"ttl"</tt></td></tr><tr><td align="left"><tt>"AAAA"</tt></td><td align="left"><tt>"host"</tt>, <tt>"pointsTo"</tt>, <tt>"ttl"</tt></td></tr><tr><td align="left"><tt>"CNAME"</tt></td><td align="left"><tt>"host"</tt>, <tt>"pointsTo"</tt>, <tt>"ttl"</tt> (<tt>"host"</tt> MUST NOT be <tt>"@"</tt> or empty unless <tt>"hostRequired"</tt> is <tt>"true"</tt> in the template)</td></tr><tr><td align="left"><tt>"NS"</tt></td><td align="left"><tt>"host"</tt>, <tt>"pointsTo"</tt>, <tt>"ttl"</tt></td></tr><tr><td align="left"><tt>"TXT"</tt></td><td align="left"><tt>"host"</tt>, <tt>"data"</tt>, <tt>"ttl"</tt>, <tt>"txtConflictMatchingMode"</tt>, <tt>"txtConflictMatchingPrefix"</tt></td></tr><tr><td align="left"><tt>"MX"</tt></td><td align="left"><tt>"host"</tt>, <tt>"pointsTo"</tt>, <tt>"ttl"</tt>, <tt>"priority"</tt></td></tr><tr><td align="left"><tt>"SRV"</tt></td><td align="left"><tt>"name"</tt>, <tt>"target"</tt>, <tt>"ttl"</tt>, <tt>"priority"</tt>, <tt>"protocol"</tt>, <tt>"service"</tt>, <tt>"weight"</tt>, <tt>"port"</tt></td></tr><tr><td align="left"><tt>"SPFM"</tt></td><td align="left"><tt>"host"</tt>, <tt>"spfRules"</tt></td></tr><tr><td align="left">other types</td><td align="left"><tt>"host"</tt>, <tt>"data"</tt>, <tt>"ttl"</tt></td></tr></tbody></table>
</section>

<section anchor="_d53ef45d-ae13-2f2a-2184-1453d586a376"><name>Template Considerations</name>

<section anchor="template-scope"><name>Template Scope</name>

<t anchor="_f641af6d-ff13-db56-83d7-329df6cb1f1c">Templates MUST be considered as scoped to the <tt>"domain"</tt> and <tt>"host"</tt> apply parameter pair. For synchronous operations, the <tt>"host"</tt> value is specified in the URL. For asynchronous operations, permissions are granted for specific <tt>"host"</tt> values, whose value is later specified when applying the template.</t>

<t anchor="_849b1826-498a-1ac4-ee07-44ede70f3032">The template's <tt>"host"</tt> or <tt>"name"</tt> field values are interpreted relative to this scope, as described in <xref target="host-name-rendering"></xref>.</t>
</section>

<section anchor="_173adb24-5b99-996b-a814-c83bd0e87416"><name>Sub Domains</name>

<t anchor="_fe501ba1-0232-5653-8261-9584f6a74fc0">The recommended way to configure records on a Sub Domain is to use the <tt>"host"</tt> apply parameter rather than embedding sub-domain labels in template <tt>"host"</tt> field values as variables. This keeps the template scope unambiguous and enables correct conflict detection and template state tracking. Template <tt>"host"</tt> field values containing variables that resolve to sub-domain labels cause the template scope to be indeterminate at consent time, which prevents accurate conflict detection for asynchronous (OAuth) flows.</t>

<t anchor="_b819a7ec-74f9-6bab-23c6-639bcc73fefe">To add a record at the Zone Apex even when a Sub Domain is specified in the apply request, the template <tt>"host"</tt> field value <tt>"%domain%."</tt> MAY be used, which resolves to the absolute Zone Apex name regardless of the <tt>"host"</tt> parameter.</t>

<t anchor="_cd94f5ca-00d8-09d8-10a5-155373aa656b">When a template is not applicable at the Zone Apex - for example because it contains a CNAME record or any other record type that is incompatible with Apex placement - the <tt>"hostRequired"</tt> flag SHOULD be set to <tt>"true"</tt> in the template definition (see <xref target="template-definition">hostRequired</xref>).</t>
</section>

<section anchor="_9f5e7af5-7a79-abd5-4cc5-52d65632ac2b"><name>Variable Scope Minimisation</name>

<t anchor="_0b636869-d178-d8ca-a55e-853f28d08707">It is noted that as a best practice the variable portions SHOULD be constrained to as small as possible a portion of the resulting DNS record.</t>

<t anchor="_f096ee69-c978-175e-4f03-48c079291275">For example, say a Service Provider requires a CNAME of one of three values for their users: <tt>"s01.example.com"</tt>, <tt>"s02.example.com"</tt>, and <tt>"s03.example.com"</tt>.</t>

<t anchor="_9d14a1a0-3567-ee82-7727-f1f14ef65332">The value in the template could simply contain <tt>"%servercluster%"</tt>, and the fully qualified string passed in. Alternatively, the value in the template could contain <tt>"%var%.example.com"</tt> and a value of <tt>"01"</tt>, <tt>"02"</tt>, or <tt>"03"</tt> passed in. By placing more fixed data into the template, the template is less prone to error or misuse and allows better review of intent by the DNS Provider when onboarding the template.</t>
</section>
</section>

<section anchor="pubkey-publication"><name>Public Key Publication</name>

<t anchor="_ccf1ead6-1799-9d03-6e96-ade17c2fa899">The Service Provider MUST publish their public signing key in one or more DNS TXT records at the host formed by prepending the  <tt>"key"</tt> apply parameter value as a label to the  <tt>"syncPubKeyDomain"</tt> template field value.</t>

<t anchor="_6df687ef-8d5a-4a5b-cf3a-b52dba1641b2">Each TXT record MUST conform to the following grammar:</t>

<sourcecode anchor="_64442673-5d1e-3bd5-a7bc-4d4a27f9296a" type="abnf"><![CDATA[dc-pubkey-record  =  dc-pubkey-kv *( "," dc-pubkey-kv )
dc-pubkey-kv      =  ( "p" "=" dc-frag-index )
                   / ( "d" "=" dc-frag-data )
                   / ( "a" "=" dc-alg-id )
                   / ( "t" "=" dc-key-type )

dc-frag-index     =  1*DIGIT
                   ; positive decimal integer;
                   ; used for p=
dc-frag-data      =  1*( ALPHA / DIGIT / "+" / "/" / "=" )
                   ; standard base64 per RFC 4648;
                   ; used for d=
dc-alg-id         =  1*( ALPHA / DIGIT / "-" )
                   ; JWS algorithm identifier per RFC 7518;
                   ; used for a=
dc-key-type       =  1*( ALPHA / DIGIT / "-" )
                   ; public key format identifier;
                   ; used for t=]]></sourcecode>


<table anchor="_72454fd4-a96f-8725-bede-1f46439d70af"><name>Properties of the public key TXT record</name><thead><tr><th align="left">Property</th><th align="left">Key</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>Fragment Index</strong></td><td align="left">p</td><td align="left">(REQUIRED) The sequence number of this key fragment.<br />  The value MUST conform to the  <tt>dc-frag-index</tt> rule above: a positive decimal integer.<br />  Fragments MUST be reassembled in ascending numeric order of  <tt>"p"</tt>.</td></tr><tr><td align="left"><strong>Fragment Payload</strong></td><td align="left">d</td><td align="left">(REQUIRED) A Fragment of base64-encoded key material.<br />  The value MUST conform to the  <tt>dc-frag-data</tt> rule above: standard base64 encoding per <xref target="RFC4648" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Signing Algorithm</strong></td><td align="left">a</td><td align="left">(OPTIONAL) The JWS algorithm identifier for the signing algorithm.<br />  The value MUST conform to the  <tt>dc-alg-id</tt> rule above and MUST be registered in the IANA "JSON Web Signature and Encryption Algorithms" registry established by <xref target="RFC7518" section="" relative=""></xref>.<br />  If omitted, MUST be assumed to be  <tt>"RS256"</tt>.<br />  Support for  <tt>"RS256"</tt> is MANDATORY for both DNS Providers and Service Providers.</td></tr><tr><td align="left"><strong>Public Key Format</strong></td><td align="left">t</td><td align="left">(OPTIONAL) The format of the public key.<br />  The value MUST conform to the  <tt>dc-key-type</tt> rule above.<br />  If omitted, MUST be assumed to be  <tt>"x509"</tt>.</td></tr></tbody></table>

<t anchor="_f2b75231-9a72-ce1a-0870-afb0c276b080">To allow for key rotation or use of multiple keys, the Service Provider MAY publish key records at multiple hosts within  <tt>"syncPubKeyDomain"</tt>. The  <tt>"key"</tt> apply parameter identifies which host to query for each request and MUST be included in the signed apply request.</t>

<t anchor="_460c182d-e089-ec7e-b8fa-74bf0b7ef97f">To account for DNS record size limits, a public key MAY be split across multiple TXT records at the same host. All fragments MUST be reassembled in ascending numeric order of  <tt>"p"</tt> before use. The values  <tt>"a"</tt> and '"d"' MUST be equal for all such TXT records on the same host.</t>

<t anchor="_0772612f-d69c-f784-188b-25cbbfe23729">Given the public key (line breaks for brevity):</t>

<sourcecode anchor="_4cc50128-768b-48c9-6f4f-f8e8f2a4d5e5"><![CDATA[MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA18SgvpmeasN4BHkkv0SBjAzIc
4grYLjiAXRtNiBUiGUDMeTzQrKTsWvy9NuxU1dIHCZy9o1CrKNg5EzLIZLNyMfI6qiXnM
+HMd4byp97zs/3D39Q8iR5poubQcRaGozWx8yQpG0OcVdmEVcTfyR/XSEWC5u16EBNvRn
NAOAvZYUdWqVyQvXsjnxQot8KcK0QP8iHpoL/1dbdRy2opRPQ2FdZpovUgknybq/6FkeD
tW7uCQ6Mvu4QxcUa3+WP9nYHKtgWip/eFxpeb+qLvcLHf1h0JXtxLVdyy6OLk3f2JRYUX
2ZZVDvG3biTpeJz6iRzjGg6MfGxXZHjI8weDjXrJwIDAQAB]]></sourcecode>


<t anchor="_a0ade3a7-b03a-ed42-47ac-e9ce455dbde0">Published at <tt>"_dcpubkeyv1.&#x3c;syncPubKeyDomain&#x3e;"</tt> as (line breaks for brevity):</t>

<t anchor="_37819750-6fbc-ade9-37b4-ea8ac0725d89" keepWithNext="true">EXAMPLE: Example: public key published as DNS TXT records</t><sourcecode anchor="_3c3d18ce-242e-893d-de6b-0aa81d705696"><![CDATA[p=1,a=RS256,d=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA18SgvpmeasN
4BHkkv0SBjAzIc4grYLjiAXRtNiBUiGUDMeTzQrKTsWvy9NuxU1dIHCZy9o1CrKNg5EzL
IZLNyMfI6qiXnM+HMd4byp97zs/3D39Q8iR5poubQcRaGozWx8yQpG0OcVdmEVcTfy

p=2,a=RS256,d=R/XSEWC5u16EBNvRnNAOAvZYUdWqVyQvXsjnxQot8KcK0QP8iHpoL/1
dbdRy2opRPQ2FdZpovUgknybq/6FkeDtW7uCQ6Mvu4QxcUa3+WP9nYHKtgWip/eFxpeb+
qLvcLHf1h0JXtxLVdyy6OLk3f2JRYUX2ZZVDvG3biTpeJz6iRzjGg6MfGxXZHjI8

p=3,a=RS256,d=weDjXrJwIDAQAB]]></sourcecode>
</section>
</section>
    <section anchor="dns-provider-discovery"><name>DNS Provider Discovery</name>

<t anchor="_5beeef04-882e-30af-a004-472d24c4b196">To facilitate discovery of the DNS Provider from a domain name DNS is utilized. This is done by returning a TXT record for <tt>"_domainconnect"</tt> in the zone.</t>

<t anchor="_58919da9-ed8a-93e7-2c23-d91527262a70">The record content represents an authority and path part of the settings REST API URL.</t>

<t anchor="_7bdf64ee-6f65-d73f-e302-3ee3d2458c5c" keepWithNext="true">EXAMPLE 1: An example of the contents of this record:</t><sourcecode anchor="_34c8c9d9-c484-45ae-8b36-e8b3ba7f93ef"><![CDATA[domainconnect.virtucondomains.example]]></sourcecode>

<t anchor="_0a5d937a-990f-7002-8bc2-a8694991ecac"><tt>"_domainconnect"</tt> TXT record content, when prepended with <tt>https://</tt> schema and appended with <tt>/v2</tt> path segment, MUST form a valid URL <xref target="RFC3986" section="" relative=""></xref>. <tt>"_domainconnect"</tt> TXT record MUST contain the authority part of the URL and MAY contain a path part. <tt>"_domainconnect"</tt> MUST not contain schema, query or fragment part of an URL.</t>

<t anchor="_a51e74a3-a31e-55f0-7171-73070ce5f718">As a practical matter of implementation, the DNS Provider may or may not contain a copy of this data in each and every zone. Instead, the DNS Provider MUST simply respond to the DNS query for the <tt>"_domainconnect"</tt> TXT record with the appropriate data.</t>

<t anchor="_cd1b91cc-e572-069c-adcc-b011e2e5afcb">How this is implemented is up to the DNS Provider.</t>

<t anchor="_edb1a08b-11c2-13e5-1978-b551e0a4c94b">For example, the DNS Provider may not store the data inside a TXT record for the domain, opting instead to put a CNAME in the zone and have the TXT record in the target of the CNAME. Another DNS Provider may simply respond with the appropriate records at the DNS layer without having  the data in each zone.</t>

<t anchor="_9dca02b7-9c47-09fc-e828-65c9201fe612">The URL prefix returned MUST be subsequently used by the Service Provider to determine the additional settings for using Domain Connect on this domain at the DNS Provider. This is done by calling a REST API.</t>

<t anchor="_e64300c8-b5f9-20cb-1af3-1b31e2b66687">Normative URI template of the Settings End-Point per <xref target="RFC6570" section="" relative=""></xref>:</t>

<sourcecode anchor="_11c24ae0-b934-c245-769b-36bdbb47f97b"><![CDATA[GET

https://{+_domainconnect}/v2/{domain}/settings]]></sourcecode>


<t anchor="_1d7186b0-81e9-5b05-5bf9-f54b3e8d3f76"><tt>"_domainconnect"</tt> parameter is the URL prefix returned in the <tt>"_domainconnect"</tt> TXT record.</t>

<t anchor="_077b9866-c8ec-5a92-d0ba-ee5d36ddb095">This MUST return a JSON structure containing the settings to use for Domain Connect on the domain name (passed in on the path) at the DNS Provider. This JSON structure MUST contain the following fields unless otherwise specified.</t>

<table anchor="_2352bb85-b039-cff3-4b97-fc73a4c7eabf"><name>properties of the settings data structure</name><thead><tr><th align="left"><strong>Field</strong></th><th align="left"><strong>Key</strong></th><th align="left"><strong>Type</strong></th><th align="left"><strong>Description</strong></th></tr></thead><tbody><tr><td align="left"><strong>Provider Id</strong></td><td align="left">providerId</td><td align="left">String</td><td align="left">(REQUIRED) Unique identifier for the DNS Provider.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).<br />  To allow for non-coordinated uniqueness, this SHOULD be the domain name of the DNS Provider (e.g. virtucom.example).</td></tr><tr><td align="left"><strong>Provider Name</strong></td><td align="left">providerName</td><td align="left">String</td><td align="left">(REQUIRED) The name of the DNS Provider.<br />  The value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Provider Display Name</strong></td><td align="left">providerDisplayName</td><td align="left">String</td><td align="left">(OPTIONAL) The name of the DNS Provider that SHOULD be displayed by the Service Provider.<br />  This MAY change per domain for some DNS Providers that power multiple brands.<br />  When present, the value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>UX URL Prefix for Synchronous Flows</strong></td><td align="left">urlSyncUX</td><td align="left">String</td><td align="left">(OPTIONAL) The URL Prefix for linking to the UX of Domain Connect for the synchronous flow at the DNS Provider. If not returned, the DNS Provider is not supporting the synchronous flow on this domain.<br />  This MUST be a valid URI  <xref target="RFC3986" section="" relative=""></xref> with scheme <tt>"https"</tt>, MUST include an authority component, and MUST NOT contain a query component or fragment component.<br />  The URI MAY include a path component.</td></tr><tr><td align="left"><strong>UX URL Prefix for Asynchronous Flows</strong></td><td align="left">urlAsyncUX</td><td align="left">String</td><td align="left">(OPTIONAL) The URL Prefix for linking to the UX elements of Domain Connect for the asynchronous flow at the DNS Provider. If not returned, the DNS Provider is not supporting the asynchronous flow on this domain.<br />  This MUST be a valid URI  <xref target="RFC3986" section="" relative=""></xref> with scheme <tt>"https"</tt>, MUST include an authority component, and MUST NOT contain a query component or fragment component.<br />  The URI MAY include a path component.</td></tr><tr><td align="left"><strong>API URL Prefix</strong></td><td align="left">urlAPI</td><td align="left">String</td><td align="left">(REQUIRED) The URL Prefix for the REST API.<br />  This MUST be a valid URI  <xref target="RFC3986" section="" relative=""></xref> with scheme <tt>"https"</tt>, MUST include an authority component, and MUST NOT contain a query component or fragment component.<br />  The URI MAY include a path component.</td></tr><tr><td align="left"><strong>Width of Window</strong></td><td align="left">width</td><td align="left">Number</td><td align="left">(OPTIONAL) The desired width in pixels of the pop-up window used for granting consent.<br />  If not present, the default MUST be assumed to be 750.</td></tr><tr><td align="left"><strong>Height of Window</strong></td><td align="left">height</td><td align="left">Number</td><td align="left">(OPTIONAL) The desired height in pixels of the pop-up window used for granting consent.<br />  If not present, the default MUST be assumed to be 750.</td></tr><tr><td align="left"><strong>UX URL Control Panel</strong></td><td align="left">urlControlPanel</td><td align="left">String</td><td align="left">(OPTIONAL) A URL to the DNS Provider's control panel for manual DNS editing. This field allows a Service Provider whose template is not supported at the DNS Provider to provide a direct link to perform manual edits.<br />  The value MAY contain the literal token  <tt>"%domain%"</tt> as a placeholder for the domain name, to allow deep-linking to a specific domain.<br />  The value, after any substitution of the  <tt>"%domain%"</tt> token, MUST be a valid URI per <xref target="RFC3986" section="" relative=""></xref> with scheme <tt>"https"</tt>.</td></tr><tr><td align="left"><strong>Name Servers</strong></td><td align="left">nameServers</td><td align="left">List of String</td><td align="left">(OPTIONAL) The list of nameserver hostnames for the zone held by this DNS Provider (typically derived from the zone's NS records).<br />   Each entry MUST conform to the  <tt>"domain-name"</tt> syntax (see <xref target="terminology"></xref>).</td></tr></tbody></table>

<t anchor="_0ccab7a7-92d2-3e53-58c0-028568ed6207">Clients MUST ignore any JSON properties in the settings response that are not defined in this specification or not recognized from an applicable extension. DNS Providers MAY include additional JSON properties in the settings response beyond those defined in this specification, however it is RECOMMENDED that those properties are registered in the "Domain Connect Settings Properties" registry defined in  <xref target="iana-settings-properties"></xref> in order to avoid name conflicts.</t>

<t anchor="_e34f6030-ea5f-8b43-1790-47c56cac6880" keepWithNext="true">EXAMPLE 2: Example Settings End-Point response</t><sourcecode anchor="_210e1df7-17a9-141f-860b-8cf683b83b84" type="json"><![CDATA[{
    "providerId": "virtucondomains.example",
    "providerName": "Virtucon Domains",
    "providerDisplayName": "Virtucon Domains",
    "urlSyncUX": "https://domainconnect.virtucondomains.example",
    "urlAsyncUX": "https://domainconnect.virtucondomains.example",
    "urlAPI": "https://api.domainconnect.virtucondomains.example",
    "width": 750,
    "height": 750,
    "urlControlPanel": "https://domaincontrolpanel.virtucondomains.ex
    ample/?domain=%domain%",
    "nameServers": ["ns01.virtucondomainsdns.example", "ns02.virtucon
    domainsdns.example"]
}]]></sourcecode>

<t anchor="_d7703f91-9243-8a6c-322c-7f24688ff817">When constructing a deep link using <tt>"urlControlPanel"</tt>, the Service Provider MUST replace any occurrence of the literal token <tt>"%domain%"</tt> with the percent-encoded ACE-form domain name per <xref target="RFC3986" section="" relative=""></xref>. The <tt>"%domain%"</tt> token MUST be the only substitution token used.</t>

<t anchor="_d0494775-54b3-d9ff-7086-5989ea379b18">The Service Provider MAY compare the <tt>"nameServers"</tt> list against the authoritative nameservers obtained from the DNS registry or an authoritative NS query, to verify that the correct DNS Provider has been reached. A mismatch may indicate a stale or incorrect <tt>"_domainconnect"</tt> TXT record, or a deliberate administrative change such as pre-provisioning with a new DNS provider.</t>

<t anchor="_eeeee233-1737-4377-4bf1-cc5ea4018e54">Discovery MUST work on the Zone Apex only. Bear in mind that zones can be delegated to other users, making this information valuable to Service Providers since DNS changes may be different for a Zone Apex vs. a Sub Domain for an individual service.</t>

<t anchor="_5461cf7e-f1ad-5a59-8a10-f8f16e0155f6">The Service Provider MUST handle the condition when a query for the <tt>"_domainconnect"</tt> TXT record succeeds, but a call to query for the JSON fails. This can happen if the zone is hosted with another DNS Provider, but contains an incorrect  <tt>"_domainconnect"</tt> TXT record.</t>

<t anchor="_caaa6be8-fa85-5a49-a1a6-479810207855">The DNS Provider MUST return a 404 HTTP error code if they do not contain the zone.</t>

<table anchor="_d6d373c4-5d4f-8f2f-284f-4ffd34e91d56"><name>HTTP status codes for the settings end-point</name><thead><tr><th align="left">Status</th><th align="left">Response</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>Success</strong></td><td align="left">2xx</td><td align="left">A response of an http status code of 2xx indicates that the call was successful. The response is the JSON described above.</td></tr><tr><td align="left"><strong>Not Found</strong></td><td align="left">404</td><td align="left">A response of a 404 indicates that the DNS Provider does not have the zone.</td></tr></tbody></table>
</section>
    <section anchor="applying-domain-connect"><name>Applying Domain Connect</name>

<section anchor="_b0018d9d-94dd-68ce-60da-40f104de2938"><name>Endpoints</name>

<t anchor="_d722d02c-9aa3-6ecf-46a9-990da87c3ddb">The Domain Connect endpoints returned in the JSON during discovery are in the form of URLs.</t>

<t anchor="_12c37aee-c583-c694-91ef-9330164db3fe">The first set of endpoints are for the UX that the Service Provider links to. These are for the synchronous flow where the user can click to grant consent and have changes applied, and for the asynchronous OAuth flow where the user can grant consent for OAuth access.</t>

<t anchor="_204ab84c-6ff5-1747-8571-0f4941efafc4">The second set of endpoints are for the REST API.</t>

<t anchor="_737c621f-d5ba-cf2b-a919-bd8797d07886">All endpoints begin with a root URL for the DNS Provider such as:</t>

<sourcecode anchor="_ec5ff15b-c0d3-290c-bfb9-4ca474e5ddf8"><![CDATA[https://connect.dnsprovider.example]]></sourcecode>


<t anchor="_d0b329b5-7c8a-b64f-c7aa-e6411686a8bc">They MAY also include any path segment at the discretion of the DNS Provider. For example:</t>

<sourcecode anchor="_f22bc681-f9b8-724d-bd57-48212121f6cb"><![CDATA[https://connect.dnsprovider.example/api]]></sourcecode>


<t anchor="_4a503160-5d0d-6265-1d47-6539bb004405">The root URLs for the UX endpoints and the API endpoints are returned in the JSON payload during DNS Provider discovery.</t>
</section>

<section anchor="_3d62753d-553b-5334-dc26-40f6ca85b2e6"><name>Query Supported Template</name>

<t anchor="_0f7e9d54-98c7-db47-f113-094e153e4264">Normative URI template of the template query end-point per <xref target="RFC6570" section="" relative=""></xref>:</t>

<sourcecode anchor="_cc55bc12-a573-9f00-8c3e-e473bfaba49e"><![CDATA[GET

{+urlAPI}/v2/domainTemplates/providers/{providerId}/services
/{serviceId}]]></sourcecode>


<t anchor="_e670f252-df0b-309e-9777-d0e61595154b">This URL is be used by the Service Provider to determine if the DNS Provider supports a specific template.</t>

<t anchor="_f92ad28b-52b3-f14d-a7a6-2762d1513808">The following table describes the parameters of the URI template:</t>

<table anchor="_cbe697d2-293f-3c9e-e529-95f492810dfd"><name>URI template parameters for the query supported template end-point</name><thead><tr><th align="left">Property</th><th align="left">Key</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>URL API</strong></td><td align="left">urlAPI</td><td align="left">(REQUIRED) The base URL of the DNS Provider API, taken from the <tt>"urlAPI"</tt> field of the settings endpoint response (see <xref target="dns-provider-discovery"></xref>).<br />  This MUST be a valid URI  <xref target="RFC3986" section="" relative=""></xref> with scheme <tt>"https"</tt></td></tr><tr><td align="left"><strong>Service Provider Id</strong></td><td align="left">providerId</td><td align="left">(REQUIRED) Identifier of the Service Provider of the template.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service Id</strong></td><td align="left">serviceId</td><td align="left">(REQUIRED) Identifier of the template within the Service Provider's namespace.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr></tbody></table>

<t anchor="_c0c0a55e-b37b-918e-8194-41702e540db1">Returning a status of 200 without a body indicates the template is supported. The DNS Provider MAY disclose the version of the template in a JSON object with field  <tt>"version"</tt> (see: <xref target="template-definition">version field</xref> or the full JSON object of deployed template.</t>

<t anchor="_48978066-0b99-723d-863f-6d91a2c2b715">Returning a status of 404 indicates the template is not supported.</t>

<table anchor="_7396a636-46bb-30eb-7ced-bbbce82b56d9"><name>https status codes for the Query Supported Template end-point</name><thead><tr><th align="left">Status</th><th align="left">Response</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>Success</strong></td><td align="left">2xx</td><td align="left">A response of an http status code of 2xx indicates that the call was successful. The response OPTIONALLY contains the version or template.</td></tr><tr><td align="left"><strong>Not Found</strong></td><td align="left">404</td><td align="left">A response of a 404 indicates that the template is not supported</td></tr></tbody></table>
</section>

<section anchor="synchronous-flow"><name>Synchronous Flow</name>

<section anchor="apply-template-url"><name>Apply Template URL</name>

<t anchor="_0db5ab6d-656f-b86d-7a5a-a4b902c62bbd">Normative URI template of the synchronous template apply end-point per <xref target="RFC6570" section="" relative=""></xref>:</t>

<sourcecode anchor="_95de3e17-275d-6f90-2c9a-840d8818987b"><![CDATA[GET

{+urlSyncUX}/v2/domainTemplates/providers/{providerId}/services
/{serviceId}/apply{?domain,host,groupId,providerName,
serviceName,instanceId,redirect_uri,properties*}{&sig,key}]]></sourcecode>


<t anchor="_d78d49e7-d0e1-993e-3a1d-3c44ddf05dcd">This is the URL, where the user agent is directed to apply a template to a dns zone the user controls. It is redirected to or linked from the Service Provider to start the synchronous Domain Connect Protocol.</t>
</section>

<section anchor="apply-template-params"><name>Parameters/properties</name>

<t anchor="_2fe5a392-a70c-57f7-475f-1e0eb32fa5e9">For <tt>"properties"</tt> name/value pairs, parameter names and values MUST be URL-decoded (percent-decoded per <xref target="RFC3986" section="" relative=""></xref>) before processing.</t>

<table anchor="_84c900ab-9af5-c763-ae89-3cc1af8e19d7"><name>URI template parameters of the apply call in the sync flow</name><thead><tr><th align="left">Property</th><th align="left">Request Parameter</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>URL Sync UX</strong></td><td align="left">urlSyncUX</td><td align="left">(REQUIRED) The base URL of the DNS Provider synchronous UX endpoint, taken from the <tt>"urlSyncUX"</tt> field of the settings endpoint response (see <xref target="dns-provider-discovery"></xref>).<br />  This MUST be a valid URI  <xref target="RFC3986" section="" relative=""></xref> with scheme <tt>"https"</tt></td></tr><tr><td align="left"><strong>Service Provider Id</strong></td><td align="left">providerId</td><td align="left">(REQUIRED) Identifier of the Service Provider of the template to be applied.  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service Id</strong></td><td align="left">serviceId</td><td align="left">(REQUIRED) Identifier of the template to be applied.  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Domain</strong></td><td align="left">domain</td><td align="left">(REQUIRED) The domain name being configured. This is the Zone Apex (the registered domain or delegated zone).  The value MUST conform to the  <tt>domain-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Host</strong></td><td align="left">host</td><td align="left">(OPTIONAL) The host name of the Sub Domain within the zone identified by <tt>"domain"</tt>.<br />  When present, the value MUST be a single name conforming to  <tt>domain-name</tt> (see <xref target="terminology"></xref>) or an empty string.</td></tr><tr><td align="left"><strong>Redirect URI</strong></td><td align="left">redirect_uri</td><td align="left">(OPTIONAL) The location to direct the user agent to upon successful authorization or upon error.<br />  The value MUST be an absolute URI conforming to  <xref target="RFC3986" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>State</strong></td><td align="left">state</td><td align="left">(OPTIONAL) A random and unique string passed along to prevent CSRF, or to pass back state.<br />  The value MUST conform to the  <tt>"state"</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Name/Value Pairs</strong></td><td align="left">properties</td><td align="left">(REQUIRED) Variable values to be substituted into the template. Each parameter name MUST correspond to a variable name defined in the template and MUST conform to the  <tt>variable-name</tt> syntax (see <xref target="terminology"></xref>).<br />  Each parameter value MUST conform to the  <tt>dc-prop-value</tt> syntax (see <xref target="terminology"></xref>), using the DNS presentation format  <xref target="RFC9499" section="" relative=""></xref>.<br />  The parameter value corresponds to the value that will be used when applying the template.</td></tr><tr><td align="left"><strong>Provider Name</strong></td><td align="left">providerName</td><td align="left">(OPTIONAL) Additional display text for the template <tt>"providerName"</tt>, provided by the caller. If <tt>"sharedProviderName"</tt> is not set in the template, this parameter MUST NOT be set. Note: this used to be controlled by the <tt>"shared"</tt> attribute in the template, which has been deprecated.<br />  The value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service Name</strong></td><td align="left">serviceName</td><td align="left">(OPTIONAL) Additional display text for the template <tt>"serviceName"</tt>, provided by the caller. If <tt>"sharedServiceName"</tt> is not set in the template, this parameter MUST NOT be set.<br />  The value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Group ID</strong></td><td align="left">groupId</td><td align="left">(OPTIONAL) Specifies the subset of groups from the template to apply.<br />  The value MUST conform to the  <tt>dc-id-list</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Signature</strong></td><td align="left">sig</td><td align="left">(OPTIONAL) A digital signature of the canonical query string.  The value MUST conform to the  <tt>dc-sig</tt> syntax (see <xref target="terminology"></xref>):<br />  a standard base64-encoded  <xref target="RFC4648" section="" relative=""></xref> signature, URL-encoded when carried in the query string.<br />  See the  <xref target="signing-procedure"></xref> below for the signing procedure.</td></tr><tr><td align="left"><strong>Key</strong></td><td align="left">key</td><td align="left">(OPTIONAL) The DNS host label within the <tt>syncPubKeyDomain</tt> at which the public key TXT record is published.<br />  The value MUST conform to the  <tt>dc-key-label</tt> syntax (see <xref target="terminology"></xref>): a single DNS label, either a plain ACE-form label or an RFC 8552 underscore-prefixed label.<br />  See the  <xref target="signing-procedure"></xref> below.</td></tr></tbody></table>

<t anchor="_cf6a078e-4a99-02db-4672-47179821ecff">An example query string:</t>

<sourcecode anchor="_9d4fbce5-fffb-92ba-d1de-043516ba9aad"><![CDATA[GET

https://web-connect.dnsprovider.example/v2/domainTemplates/providers/
exampleservice.example/services/template1/apply?domain=example.com&
IP=192.168.42.42&RANDOMTEXT=shm%3A1542108821%3AHello]]></sourcecode>


<t anchor="_92e399b2-4f1e-f3e7-dab0-9771bacded8b">This call indicates that the Service Provider wishes to connect the domain example.com to the service using the template identified by the composite key of the provider (exampleservice.example) and the service template owned by them (template1). In this example, there are two variables in this template, "IP" and "RANDOMTEXT". These variables are passed as name/value pairs.</t>

<section anchor="signing-procedure"><name>Signing Procedure</name>

<t anchor="_50f27c3c-c37c-d343-1660-db04f9f02293">Signing the query string is OPTIONAL for templates that do not specify <tt>"syncPubKeyDomain"</tt>. When <tt>"syncPubKeyDomain"</tt> is present in the template, the Service Provider MUST sign the request and the DNS Provider MUST reject any unsigned apply request (see <xref target="sig-verification"></xref>).</t>

<t anchor="_6a39b0a6-a83e-122a-93c8-1cc8ba1097bb">The Service Provider MUST generate the digital signature as follows:</t>

<ol anchor="_c18fcd90-dc19-f860-537a-68eb7d6f61c2" type="1"><li><t anchor="_22c9b8f2-6c89-bb91-53f7-c9ccd829c580">Construct the canonical input string:</t>
<ol anchor="_a6ece73d-1490-1a73-0fe0-612c5957b7d8" type="a"><li>Take all apply parameters except <tt>"sig"</tt> and <tt>"key"</tt>.</li>
<li>URL-encode each parameter name and value per <xref target="RFC3986" section="" relative=""></xref>.</li>
<li>Sort the parameters in ascending lexicographic order of the URL-encoded parameter name.</li>
<li>Concatenate them as <tt>name=value</tt> pairs joined by <tt>"&#x26;"</tt>.</li>
</ol>
</li>
<li>Sign the canonical input string using the private key corresponding to the public key published at the host identified by the <tt>"key"</tt> parameter within <tt>"syncPubKeyDomain"</tt> (see <xref target="pubkey-publication"></xref>), using the algorithm identified by the <tt>"a"</tt> field of the key record (default: <tt>"RS256"</tt>). The <tt>"RS256"</tt> identifier denotes <tt>RSASSA-PKCS1-v1_5</tt> using SHA-256, as defined in <xref target="RFC7518" section="" relative=""></xref> Section 3.3.</li>
<li>The resulting signature MUST be Base64-encoded using the standard alphabet per <xref target="RFC4648" section="" relative=""></xref> Section 4 (conforming to the <tt>dc-sig</tt> rule).</li>
<li>Append the URL-encoded <tt>"sig"</tt> value and the <tt>"key"</tt> identifier to the canonical input string to form a signed query string.</li>
</ol>

<t anchor="_5181ddd9-9828-471a-f1ea-947b1556b0f2">The signed query string MUST be used as-is as the query string of the request URL, without re-encoding, adding or re-ordering of query parameters.</t>

<t anchor="_425021c2-1d7e-b109-5e9e-bbfe81631097" keepWithNext="true">EXAMPLE: Example: signed query string parameters</t><t anchor="_bd26df97-8cfa-589b-39bd-f7c64a9d28b0">Example canonical input:</t><sourcecode anchor="_634d3cd4-f315-5a7c-98fe-8860d20fecd8"><![CDATA[a=1&b=2&domain=example.net&ip=10.10.10.10&text=a%2Bb]]></sourcecode><t anchor="_6e01ac1c-9e2f-93e8-f3fd-e767cc4c94cd">Example signature:</t><sourcecode anchor="_9fd1b34c-f4da-6e2d-7598-08d28107442a"><![CDATA[sig=V2te9zWMU7G3plxBTsmYSJTvn2vzMvNwAjWQ%2BwTe91DxuJhdVf4cVc4vZBYfEYV
7u5d7PzTO7se7OrkhyiB7TpoJJW1yB5qHR7HKM5SZldUsdtg5%2B1SzEtIX0Uq8b2mCmQ
F%2FuJGXpqCyFrEajvpTM7fFKPk1kuctmtkjV7%2BATcvNPLWY7KyE4%2Bqc8jpfN61cP
5l8iA4krAa3%2BfTro5cmWR8YUJ5yrnRs6KT4b5D71HFvOUk0sGEUddUUlsyRQKRHUFN6
HjEya50YDHfZJlYHkHlK0xX6Yqeii9QZ2I35U9eJbSvZGQko5beqviWFXdsVDbvd3DYcb
SHgJq9%2FXoMTTw%3D%3D&key=_dcpubkeyv1]]></sourcecode>
</section>
</section>

<section anchor="_4a7a418f-64e5-cf1d-727f-b411f39001fe"><name>Template Apply Request</name>

<t anchor="_23a96318-6ce7-e441-e9ab-ea19721064c4">The Service Provider initiates the synchronous flow by directing the user agent to the Apply Template URL (see <xref target="apply-template-url"></xref>), constructed as specified in <xref target="apply-template-params"></xref>.</t>

<t anchor="_f626aa47-aee6-3389-8027-4164474c7e2d">The DNS Provider validates the request to ensure that all required parameters are present and valid. This includes also verification of request signature (see <xref target="sig-verification"></xref> below).</t>

<t anchor="_521547a3-15e7-996b-154e-9f8047a5517b">If the request is valid, the DNS Provider authenticates the user, validates user's authorization to modify the DNS zone, obtains authorization to apply the template to the DNS and finally applies the changes. This process is described in <xref target="template-application"></xref>.</t>
</section>

<section anchor="sig-verification"><name>Signature Verification</name>

<t anchor="_724acf24-241b-f541-f2bf-6b630bb7aab5">Upon receiving a Template Apply Request for a template whose <tt>"syncPubKeyDomain"</tt> is set, the DNS Provider MUST perform the following steps and MUST reject the request if any step fails:</t>

<ol anchor="_b5e59ce9-4c8c-5c30-6fad-63f3f3759e96" type="1"><li><strong>Check for required parameters</strong> - The request MUST carry both <tt>"sig"</tt> and <tt>"key"</tt> parameters.</li>
<li><strong>Retrieve the public key</strong> - Query DNS for TXT records at the host formed by prepending the <tt>"key"</tt> parameter value as a label to <tt>"syncPubKeyDomain"</tt> (see <xref target="pubkey-publication"></xref>). If no such records are found, the processing fails.</li>
<li><strong>Reassemble key fragments</strong> - Collect all TXT records at that host, parse each as a <tt>"dc-pubkey-record"</tt>, and concatenate the <tt>"d"</tt> values in ascending order of <tt>"p"</tt> to obtain the complete encoded public key.</li>
<li><strong>Determine algorithm and key format</strong> - Read the <tt>"a"</tt> and <tt>"t"</tt> fields. If absent, assume <tt>"RS256"</tt> and <tt>"x509"</tt> respectively.</li>
<li><strong>Decode the public key</strong> - decode the key from Base64 encoding and key format indicated by <tt>"t"</tt>.</li>
<li><strong>Construct the canonical input string</strong> - Remove the <tt>"sig"</tt> and <tt>"key"</tt> key/value pairs from the received query string without reordering or re-encoding the remaining of the query string. If the canonical string needs to be reconstructed from individual parameters (what is not RECOMMENDED), the same construction steps as the signing procedure MUST be followed (see <xref target="signing-procedure"></xref>).</li>
<li><strong>Verify the signature</strong> - URL-decode then base64-decode per <xref target="RFC4648" section="" relative=""></xref> the <tt>"sig"</tt> parameter value, and verify the signature against the input string using the retrieved public key and identified algorithm.</li>
</ol>
</section>

<section anchor="sync-apply-response"><name>Template Apply Response</name>

<t anchor="_c7a03086-142b-78f6-3b76-4854e8f39333">After successful processing of Template Apply Request the DNS Provider MUST terminate the user flow according to one of the following cases:</t>

<ul anchor="_f8a892ca-d5f9-3799-0f82-b283d5aadc0c"><li><t anchor="_33d2c76b-fd81-8ff5-4d78-9b3d3e7aea93">If <tt>"redirect_uri"</tt> was present in the request and the template's <tt>"syncRedirectDomain"</tt> field is set, the DNS Provider MUST redirect the user agent to the <tt>"redirect_uri"</tt>.<br /></t>
<t anchor="_667bed41-a2da-6245-f2f8-484dd6d9d9a6">The following parameters MUST be appended to the <tt>"redirect_uri"</tt>:</t>

<ul anchor="_a1713539-060b-185e-0f21-f7ad7a59e727"><li><tt>"state"</tt> - If a <tt>"state"</tt> parameter was present in the request, it MUST be echoed back unchanged as <tt>"state="</tt> on the redirect URI.</li>
</ul>
</li>
<li>If <tt>"redirect_uri"</tt> was not provided, or if <tt>"syncRedirectDomain"</tt> is not set in the template, the DNS Provider MUST gracefully terminate the user flow by other means (for example, displaying a completion page). When the user agent is a web browser and the DNS Provider's page was opened in a separate window or tab, the DNS Provider SHOULD attempt to close that window or tab.</li>
</ul>

<t anchor="_f0e9c778-fbdc-7474-01fe-8d8e843e12da">To prevent open redirects, the DNS Provider MUST NOT redirect the user agent to a <tt>"redirect_uri"</tt> value whose registered domain is not listed in the template's <tt>"syncRedirectDomain"</tt> field, unless the request carries a valid digital signature (see <xref target="signing-procedure"></xref>).</t>

<t anchor="_d9a2c375-8400-32fc-85b2-72752d07449b">The Service Provider SHOULD verify the outcome via DNS regardless of how the flow terminates (see <xref target="verification-of-changes"></xref>).</t>
</section>

<section anchor="_3d732d89-1638-ee8e-4fa2-0679013d029f"><name>Template Apply Error Response</name>

<t anchor="_8abdf815-5b89-6f21-f405-4ddec363941a">If the DNS Provider cannot complete the apply operation - for example because authentication failed, the user does not control the domain, the domain is suspended, or the user explicitly canceled - the DNS Provider MUST signal an error.</t>

<t anchor="_f57a11e0-cdbb-07d5-c64a-37dcfc223622">If <tt>"redirect_uri"</tt> is present and the open-redirect constraint is satisfied, the DNS Provider MUST redirect the user agent to the <tt>"redirect_uri"</tt> with the following parameters appended:</t>

<ul anchor="_db17fac0-9611-b3a6-1978-29bc338d968c"><li><tt>"error"</tt> - REQUIRED on error. The value MUST be one of the error codes defined in Section 4.1.2.1 of <xref target="RFC6749" section="" relative=""></xref>: <tt>"invalid_request"</tt>, <tt>"unauthorized_client"</tt>, <tt>"access_denied"</tt>, <tt>"unsupported_response_type"</tt>, <tt>"invalid_scope"</tt>, <tt>"server_error"</tt>, or <tt>"temporarily_unavailable"</tt>.</li>
<li><t anchor="_dfa5a96c-0248-ad4c-f715-7ad6dac8f289"><tt>"error_description"</tt> - OPTIONAL. A developer-oriented plain-text description of the error. The DNS Provider SHOULD keep descriptions vague where disclosure of internal account or domain state would be inappropriate.<br /></t>
<t anchor="_fd8049ee-439a-d4dc-f636-fff7b1df4920">As a RECOMMENDED convention, when the user explicitly cancels the operation and the DNS Provider uses <tt>"error=access_denied"</tt>, the <tt>"error_description"</tt> value MAY carry the prefix <tt>"user_cancel"</tt> to allow the Service Provider to distinguish user cancellation from other denial reasons.</t>
</li>
<li><tt>"state"</tt> - If a <tt>"state"</tt> parameter was present in the request, it MUST be echoed back unchanged as <tt>"state="</tt> on the redirect URI.</li>
</ul>

<t anchor="_86670280-7799-90d0-d76e-2ab0cc79853f">If <tt>"redirect_uri"</tt> is not present or the open-redirect constraint is not satisfied, the DNS Provider MUST gracefully terminate the user flow and SHOULD present an appropriate error indication to the user. When the user agent is a web browser and the DNS Provider's page was opened in a separate window or tab, the DNS Provider SHOULD attempt to close that window or tab.</t>
</section>
</section>

<section anchor="_592324e5-17f0-ef21-1060-9a4953f60e72"><name>Asynchronous Flow: OAuth</name>

<section anchor="_c046781b-8437-3af9-3fd0-a0b243017540"><name>General information</name>

<t anchor="_3b1cc3b4-f79f-92ab-820a-c85304b44237">Using the OAuth flow is a more advanced use case needed by Service Providers that have more complex configurations that may require multiple steps and/or are asynchronous from the user's interaction.</t>

<t anchor="_224a4c69-e43e-c88d-73c9-cc8523e7216d">Details of an OAuth implementation are beyond the scope of this specification. Instead, an overview of how OAuth is used by Domain Connect is given here.</t>

<t anchor="_745516e2-c690-169b-a011-2c2546458da0">Not all DNS Providers will support the asynchronous flow. As such it is recommended that Service Providers relying on an OAuth implementation also implement a synchronous implementation.</t>
</section>

<section anchor="_a6e05136-0edb-d2a8-89ab-ec5464366b1b"><name>OAuth Flow: Setup</name>

<t anchor="_42c76da3-0cd3-0680-5d1d-69087b7dd84b">Service Providers wishing to use the OAuth flow MUST register as an OAuth client with each DNS Provider. This is typically a manual process, however other solutions like OAuth Dynamic Client Registration  <xref target="RFC7591" section="" relative=""></xref> MAY be offered by DNS Provider as well.</t>

<t anchor="_1fc07f19-81ff-ea40-0b60-144087fe4c09">To register, the Service Provider would provide (in addition to their template) any configuration necessary for the DNS Providers OAuth implementation. This includes valid URLs and Domains for redirects upon success or errors of OAuth flow, token validity, presence and validity of refresh tokens etc.</t>

<t anchor="_a3ef7d56-76d4-6ca2-c4e0-52891717987b">Note: The validity of redirects are very important in any OAuth implementation. Most OAuth vulnerabilities are a combination of an open redirect and/or a compromised secret.</t>

<t anchor="_4d0f0072-f85b-1799-795a-561f631ea18f">The DNS Provider SHOULD give the Service Provider a client id and a secret which will be used when requesting tokens. For simplicity the client id MAY be the same as the providerId, however it is up to the agreement between the parties involved. Any other form of client authentication within OAuth framework MAY be agreed between the parties.</t>
</section>

<section anchor="oauth-authorization-request"><name>OAuth Flow: Getting an Authorization Code</name>

<t anchor="_4e416206-8a5b-7c5e-4e69-61a95adde47a">Normative URI template of the Authorization Code End-Point per <xref target="RFC6570" section="" relative=""></xref>:</t>

<sourcecode anchor="_623ba512-8493-05b4-c5ae-83fc2632ecd7" type="http"><![CDATA[GET

{+urlAsyncUX}/v2/domainTemplates/providers/{providerId}{?domain,host,
client_id,redirect_uri,response_type,scope,providerName,serviceName,
state,properties*}
}]]></sourcecode>


<t anchor="_9916df9b-9543-b9fd-e52f-7eff08bcc2f9">To initiate the OAuth flow the Service Provider first links to the DNS Provider to gain consent.</t>

<t anchor="_b4c135f1-a577-3179-53c5-8c8d92d64220">This endpoint is similar to the synchronous flow described above. The DNS Provider MUST authenticate the user, verify the user has control of the DNS Zone for the domain, and ask the user for permission. Instead of permission to make a change to DNS, the permission is now to allow the Service Provider to make the changes on their behalf. Similarly the DNS Provider MAY warn the user that (the eventual) application of a template might change existing records and/or disrupt existing services attached to the domain.</t>

<t anchor="_047bc966-d3a5-152e-eaf7-c1ca9df4dcf0">While the variables for the applied template would be provided later, the values of some variables may be necessary to determine conflicts. As such, any variables impacting conflicting records SHOULD be provided in the consent flow. This primarily includes variables in hosts, and variables in the data portion for certain TXT records.</t>

<t anchor="_d78b3434-4b05-28d6-74cb-f2da4cf0145b">The protocol allows for the Service Provider to gain consent to apply multiple templates. These templates are specified in the <tt>"scope"</tt> parameter. It also allows for the Service Provider to gain consent to apply these templates to the domain or to the domain with multiple sub-domains. These are specified in the <tt>"domain"</tt> and <tt>"host"</tt> parameter. If conflict detection is implemented by the DNS Provider, they SHOULD account for all permutations, in order to inform the end user of all possible consequences of the authorized change.</t>

<t anchor="_33b651fb-46f4-63cd-cebe-4a1dc7beddb1">The scope parameter is a space separated list (as per the OAuth protocol) of the template serviceIds. The host parameter is an OPTIONAL comma separated list of hosts. A blank entry for the host implies the template can be applied to the Zone Apex For example:</t>

<table anchor="_f3f1769f-e10e-5afc-9e3d-2221eca23420"><name>examples of scope and host parameter values in the async flow</name><thead><tr><th align="left"><strong>Query String</strong></th><th align="left"><strong>Description</strong></th></tr></thead><tbody><tr><td align="left"><tt>"scope=t1%20t2&#x26;domain=example.com"</tt></td><td align="left">Templates <tt>"t1"</tt> and <tt>"t2"</tt> can be applied to <tt>"example.com"</tt></td></tr><tr><td align="left"><tt>"scope=t1%20t2&#x26;domain=example.com&#x26;host=s1,s2"</tt></td><td align="left">Templates <tt>"t1"</tt> and <tt>"t2"</tt> can be applied to <tt>"s1.example.com"</tt> or <tt>"s2.example.com"</tt></td></tr><tr><td align="left"><tt>"scope=t1%20t2&#x26;domain=example.com&#x26;host=s1,"</tt></td><td align="left">Templates <tt>"t1"</tt> and <tt>"t2"</tt> can be applied to <tt>"example.com"</tt> or <tt>"s1.example.com"</tt></td></tr></tbody></table>

<t anchor="_04763499-bdfa-391a-5d61-65517d461cc6">Upon successful authorization/verification/consent from the user, the DNS Provider MUST direct the user agent to the redirect URI. The authorization code MUST be appended to this URI as a query parameter of <tt>"code="</tt> as per the OAuth specification.</t>

<t anchor="_73322314-63a4-e4bb-7ac8-e2d268940455">Similar to the synchronous flow, upon error the DNS Provider MAY append an error code as query parameter <tt>"error"</tt>. These errors are also from the OAuth 2.0 <xref target="RFC6749" section="" relative=""></xref> (4.1.2.1. Error Response - "error" parameter). Valid values include: <tt>invalid_request</tt>, <tt>unauthorized_client</tt>, <tt>access_denied</tt>, <tt>unsupported_response_type</tt>, <tt>invalid_scope</tt>, <tt>server_error</tt>, and <tt>temporarily_unavailable</tt>. An OPTIONAL <tt>error_description</tt> suitable for developers may also be returned at the discretion of the DNS Provider. The same considerations as in the synchronous flow apply here.</t>

<t anchor="_23cb0607-3eb0-ad1d-7a78-64f01ff99a73">The state value passed into the call MUST be passed back on the query string as <tt>"state="</tt>.</t>

<t anchor="_71184e3f-58f0-9c22-fad2-dfd083728f41">The following table describes the values of the URI template for the request for the OAuth consent flow that must be included unless otherwise indicated.</t>

<t anchor="_fd380964-3c03-9e22-89df-c03aadd468e4">For <tt>"properties"</tt> name/value pairs, parameter names and values MUST be URL-decoded (percent-decoded per <xref target="RFC3986" section="" relative=""></xref>) before processing.</t>

<table anchor="_b09e9b0a-fd0e-f33a-4f77-bb117b94a613"><name>URI template parameters of the authorization end-point in async flow</name><thead><tr><th align="left">Property</th><th align="left">Key</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>URL Async UX</strong></td><td align="left">urlAsyncUX</td><td align="left">(REQUIRED) The base URL of the DNS Provider asynchronous UX endpoint, taken from the <tt>"urlAsyncUX"</tt> field of the settings endpoint response (see <xref target="dns-provider-discovery"></xref>).</td></tr><tr><td align="left"><strong>Service Provider Id</strong></td><td align="left">providerId</td><td align="left">(REQUIRED) Identifier of the Service Provider of the template to be applied. The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Domain</strong></td><td align="left">domain</td><td align="left">(REQUIRED) The domain name being configured. This is the Zone Apex.<br />  The value MUST conform to the  <tt>domain-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Host</strong></td><td align="left">host</td><td align="left">(OPTIONAL) A comma-separated list of host names upon which the template may be applied.<br />  The value MUST conform to the  <tt>dc-host-list</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Client Id</strong></td><td align="left">client_id</td><td align="left">(REQUIRED) The client identifier issued by the DNS Provider to the Service Provider during registration.<br />  The value MUST conform to the  <tt>"client_id"</tt> syntax as defined in Section 2.2 of <xref target="RFC6749" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Redirect URI</strong></td><td align="left">redirect_uri</td><td align="left">(REQUIRED) The location to direct the user agent upon successful authorization or upon error.<br />  The value MUST be an absolute URI conforming to  <xref target="RFC3986" section="" relative=""></xref>.<br />  The DNS Provider MUST validate the value against the redirect URIs registered during onboarding.</td></tr><tr><td align="left"><strong>Response Type</strong></td><td align="left">response_type</td><td align="left">(OPTIONAL) If present, the value MUST be the string <tt>"code"</tt> to indicate that an authorization code is being requested, as defined in Section 3.1.1 of <xref target="RFC6749" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Scope</strong></td><td align="left">scope</td><td align="left">(REQUIRED) The OAuth scope identifying the requested templates, as defined in Section 3.3 of <xref target="RFC6749" section="" relative=""></xref>.<br />  The value MUST conform to the  <tt>dc-scope</tt> syntax (see <xref target="terminology"></xref>): a space-separated list of <tt>"serviceId"</tt> values, each conforming to <tt>dc-id</tt>.</td></tr><tr><td align="left"><strong>Provider Name</strong></td><td align="left">providerName</td><td align="left">(OPTIONAL) This parameter allows for the caller to provide additional text for display with the template <tt>"providerName"</tt>. This text SHOULD be used to augment the <tt>"providerName"</tt> value from the template, not replace it.<br />  The value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service Name</strong></td><td align="left">serviceName</td><td align="left">(OPTIONAL) This parameter allows for the caller to provide additional text for display with the template <tt>"serviceName"</tt> values. It SHOULD be used to augment the <tt>"serviceName"</tt> value(s) from the template, not replace them.<br />  The value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>State</strong></td><td align="left">state</td><td align="left">(OPTIONAL) A random, unique string passed along to prevent CSRF or to pass state back to the caller.<br />  The value MUST conform to the  <tt>"state"</tt> syntax as defined in Appendix A of <xref target="RFC6749" section="" relative=""></xref> (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Name/Value Pairs</strong></td><td align="left">properties</td><td align="left">(OPTIONAL) Variable values required for conflict detection prior to template application. Each parameter name MUST correspond to a variable name defined in the template and MUST conform to the  <tt>variable-name</tt> syntax (see <xref target="terminology"></xref>).<br />  Each parameter value MUST conform to the  <tt>dc-prop-value</tt> syntax (see <xref target="terminology"></xref>), using the DNS presentation format  <xref target="RFC9499" section="" relative=""></xref>.<br />  This includes variables used in hosts and data in certain TXT records.</td></tr></tbody></table>
</section>

<section anchor="oauth-token-request"><name>OAuth Flow: Requesting an Access Token</name>

<t anchor="_ee64c152-9dae-ebff-ba14-1b654789ba4c">Normative URI template of the access token end-point per <xref target="RFC6570" section="" relative=""></xref>:</t>

<sourcecode anchor="_f78928f9-c8ab-e628-8c98-ffbf7bb9c083"><![CDATA[POST

{+urlAPI}/v2/oauth/access_token]]></sourcecode>


<table anchor="_2df2c2a2-0c0f-fd9a-8e6d-5df245912fbb"><name>URI template parameters of the access token end-point</name><thead><tr><th align="left">Property</th><th align="left">Request Parameter</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>URL API</strong></td><td align="left">urlAPI</td><td align="left">(REQUIRED) Value of urlAPI property from the settings endpoint.<br />  The value MUST be an absolute URI conforming to  <xref target="RFC3986" section="" relative=""></xref>.</td></tr></tbody></table>

<t anchor="_ea124a4c-b575-448b-ff5d-6c7730fa34c0">Once authorization has been granted, the Service Provider MUST use the Authorization Code provided to request an Access Token. The OAuth specification recommends that the Authorization Code be a short lived token, and a reasonable recommended setting is ten minutes, however the specific setup would depend on specifics of DNS Provider's implementation. As such this exchange needs to be completed before that time has expired or the process will need to be repeated.</t>

<t anchor="_d371d347-3c9a-8851-a0db-81f0f613e03e">This token exchange is typically done via a server to server API call from the Service Provider to the DNS Provider using a POST. When called in this manner a secret is provided along with the Authorization Code.</t>

<t anchor="_ef771292-8e90-ed55-0767-489e158ab7c5">OAuth does allow for retrieving the access token without a secret. This is typically done when the OAuth client is a client application. When onboarding with the DNS Provider this would need to be enabled.</t>

<t anchor="_611f63ba-00cc-c0c9-1b4f-f6b0c4cbd09e">The following table describes the POST parameters that MUST be included in the request for the access token unless otherwise indicated. The parameters SHALL be accepted via the query string or the body of the post. This is again particularly important for the  <tt>client_secret</tt>, as passing secrets via a query string is generally frowned upon given that various systems often log URLs.</t>

<t anchor="_e4f52952-0225-b463-4be9-0b3fbec2da87">The body of the post is application/json encoded.</t>

<t anchor="_8082ee2d-2377-9955-bb5a-0306548e1bdc">For an initial access token request, <tt>"code"</tt> MUST be set and <tt>"refresh_token"</tt> MUST NOT be set. For a refresh request, <tt>"refresh_token"</tt> MUST be set and <tt>"code"</tt> MUST NOT be set. If <tt>"redirect_uri"</tt> was included in the original authorization request, it MUST be present in the token request and MUST be identical to the value used in that request.</t>

<table anchor="_4930e4bd-3b2c-6b51-c73b-e7999a63e4b0"><name>parameters of the token end-point</name><thead><tr><th align="left">Property</th><th align="left">Key</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>Authorization Code</strong></td><td align="left">code</td><td align="left">(CONDITIONAL) The authorization code returned in the authorization response when the user accepted the authorization request. This value MUST NOT be set when  <tt>"refresh_token"</tt> is set.<br />  The value MUST conform to the  <tt>"code"</tt> syntax as defined in Appendix A, Section A.11 of <xref target="RFC6749" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Refresh Token</strong></td><td align="left">refresh_token</td><td align="left">(CONDITIONAL) The refresh token used to obtain a new access token when the current one has expired. This value MUST NOT be set when  <tt>"code"</tt> is set.<br />  The value MUST conform to the  <tt>"refresh_token"</tt> syntax as defined in Appendix A, Section A.17 of <xref target="RFC6749" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Redirect URI</strong></td><td align="left">redirect_uri</td><td align="left">(CONDITIONAL) The redirect URI used in the authorization request, included for verification.<br />  The value MUST conform to the  <tt>"redirect_uri"</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Grant Type</strong></td><td align="left">grant_type</td><td align="left">(REQUIRED) The grant type of the token request.<br />  The value MUST be either  <tt>"authorization_code"</tt> or <tt>"refresh_token"</tt>, as defined in Appendix A, Section A.10 of <xref target="RFC6749" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Client ID</strong></td><td align="left">client_id</td><td align="left">(REQUIRED) The client identifier issued by the DNS Provider to the Service Provider during registration.<br />  The value MUST conform to the  <tt>"client_id"</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Client Secret</strong></td><td align="left">client_secret</td><td align="left">(REQUIRED) The client secret issued to the Service Provider during registration. MAY be omitted in deployments using secret-less OAuth.<br />  The value MUST conform to the  <tt>"client_secret"</tt> syntax as defined in Appendix A, Section A.2 of <xref target="RFC6749" section="" relative=""></xref>.</td></tr></tbody></table>

<t anchor="_218e2f53-c676-e867-b530-d023bb2161b1">Upon successful token exchange, the DNS Provider MUST return a response with 4 properties in the body of the response.</t>

<table anchor="_837499b3-aed6-acec-128e-e672e6a57a32"><name>properties of the token end-point response</name><thead><tr><th align="left">Property</th><th align="left">Key</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>Access Token</strong></td><td align="left">access_token</td><td align="left">(REQUIRED) The access token to be used when making API requests.<br />  The value MUST conform to the  <tt>"access_token"</tt> syntax as defined in Appendix A, Section A.12 of <xref target="RFC6749" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Token Type</strong></td><td align="left">token_type</td><td align="left">(REQUIRED) The type of the access token.<br />  The value MUST conform to the  <tt>"token_type"</tt> syntax as defined in Appendix A, Section A.13 of <xref target="RFC6749" section="" relative=""></xref>.<br />  The value MUST be  <tt>"bearer"</tt>.</td></tr><tr><td align="left"><strong>Expires In</strong></td><td align="left">expires_in</td><td align="left">(REQUIRED) The lifetime of the access token in seconds.<br />  The value MUST conform to the  <tt>"expires_in"</tt> syntax as defined in Appendix A, Section A.14 of <xref target="RFC6749" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Refresh Token</strong></td><td align="left">refresh_token</td><td align="left">(OPTIONAL) The token used to request new access tokens when the current one expires.<br />  The value MUST conform to the  <tt>"refresh_token"</tt> syntax as defined in Appendix A, Section A.17 of <xref target="RFC6749" section="" relative=""></xref>.</td></tr></tbody></table>

<table anchor="_9596221a-1391-13dd-06b6-3e0cf175ebb7"><name>http status codes of the token end-point response</name><thead><tr><th align="left">Status</th><th align="left">Response</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>Success</strong></td><td align="left">2xx</td><td align="left">A response of an http status code of 2xx indicates that the call was successful. The response is the JSON described above.</td></tr><tr><td align="left"><strong>Errors</strong></td><td align="left">4**</td><td align="left">All other responses indicate an error.</td></tr></tbody></table>
</section>

<section anchor="_1086cbf9-2f4a-1044-7b9a-507cd3b6abac"><name>OAuth Flow: Making Requests with Access Tokens</name>

<t anchor="_8c4d0e94-9d90-5124-6e16-e2749ef38532">Once the Service Provider has the access token, they can call the DNS Provider's API to make changes to DNS on the domain by applying and (OPTIONALLY) removing authorized templates. These templates can be applied to the Zone Apex or to any Sub Domain that has been authorized.</t>

<t anchor="_8dc13995-4afc-1898-883a-2bc11c66a53a">All calls to this API pass the access token in the Authorization Header of the request to the call to the API. More details can be found in the OAuth specifications, but as an example:</t>

<sourcecode anchor="_85a4ad43-72d1-efac-b96a-0d131c00a4cf"><![CDATA[GET /resource/1 HTTP/1.1

Host: example.com

Authorization: Bearer mF_9.B5f-4.1JqM]]></sourcecode>


<t anchor="_48c3dd0a-65fc-6805-b003-18768e7715a5">While the calls below do not have the same security consideration of passing the secret, it is recommend that the urlAPI be from a stored value vs. the value returned during discovery here as well.</t>
</section>

<section anchor="oauth-apply-template"><name>OAuth Flow: Apply Template to Domain.</name>

<t anchor="_cddd4c51-1257-3ce9-77cd-0fdfc4255d7d">Normative URI template of the asynchronous apply end-point per <xref target="RFC6570" section="" relative=""></xref>:</t>

<sourcecode anchor="_75a443ed-3df5-1a66-9c1b-2b94a56aeef8"><![CDATA[POST

{+urlAPI}/v2/domainTemplates/providers/{providerId}/services
/{serviceId}/apply{?domain,host,groupId,force,providerName,
serviceName,instanceId,properties*}]]></sourcecode>


<t anchor="_d81643f4-3c56-2ad1-b3df-9a94e789b225">The primary function of the API is to apply a template to a user domain.</t>

<t anchor="_d8ce351c-8b86-ba9b-5a6d-1bf1e0ecf308">While the <tt>"providerId"</tt> is implied in the authorization, this is on the path for consistency with the synchronous flows and other APIs. If not matching what was authorized, an error MUST be returned.</t>

<t anchor="_23d1ab2f-861b-49b2-43ff-ee13c7ffb096">When applying a template to a domain, it is possible that a conflict may exist with previous settings. While it is recommended that conflicts be detected when the user grants consent, because OAuth is asynchronous it is possible that a new conflict was introduced by the user.</t>

<t anchor="_df906d65-0f19-e90f-ba4c-81d7f00ea42c">While it is up to the DNS Provider to determine what constitutes a conflict (see section on Conflicts below), when one is detected calling this API MUST return an error. This error SHOULD enumerate the conflicting records in a format described below.</t>

<t anchor="_7d895ed2-b36f-5e69-cfdc-beb10937c968">Because the user often isn't present at the time of this error, it is up the Service Provider to determine how to handle this condition. Some providers may decide to notify the user. Others may decide to apply their template anyway using the <tt>"force"</tt> parameter. This parameter will bypass error checks for conflicts, and after the call the service will be in its desired state.</t>

<t anchor="_cf69a664-ee86-ca9a-c420-6eab6c2ad76d">Calls to apply a template via OAuth require the following parameters posted to the above URL unless otherwise indicated. The DNS Provider MUST accept parameters in query string or body of this post. When  <tt>"properties"</tt> name/value pairs are passed as query string parameters, the names and values MUST be URL-decoded (percent-decoded per <xref target="RFC3986" section="" relative=""></xref>) before processing.</t>

<t anchor="_996f8edb-b165-9772-e93e-76153c2cd799">The body is application/json encoded.</t>

<table anchor="_8f689032-32a1-817a-6dcf-7a563c9517a4"><name>URI template parameters of the apply end-point in the async flow</name><thead><tr><th align="left">Property</th><th align="left">Key</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>URL API</strong></td><td align="left">urlAPI</td><td align="left">(REQUIRED) The base URL of the DNS Provider API, taken from the <tt>"urlAPI"</tt> field of the settings endpoint response (see <xref target="dns-provider-discovery"></xref>).<br />  The value MUST be an absolute URI conforming to  <xref target="RFC3986" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Service Provider Id</strong></td><td align="left">providerId</td><td align="left">(REQUIRED) Identifier of the Service Provider of the template to be applied.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service Id</strong></td><td align="left">serviceId</td><td align="left">(REQUIRED) Identifier of the template to be applied.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Domain</strong></td><td align="left">domain</td><td align="left">(REQUIRED) The Zone Apex domain name being configured.<br />  The value MUST conform to the  <tt>domain-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Host</strong></td><td align="left">host</td><td align="left">(OPTIONAL) The host name of the Sub Domain within the zone identified by <tt>"domain"</tt>.<br />  When present, the value MUST be a single name conforming to  <tt>domain-name</tt> (see <xref target="terminology"></xref>) or an empty string.<br /></td></tr><tr><td align="left"><strong>Name/Value Pairs</strong></td><td align="left">*</td><td align="left">(REQUIRED) Variable values to be substituted into the template. Each parameter name MUST correspond to a variable name defined in the template and MUST conform to the  <tt>variable-name</tt> syntax (see <xref target="terminology"></xref>).<br />  Each parameter value MUST conform to the  <tt>dc-prop-value</tt> syntax (see <xref target="terminology"></xref>), using the DNS presentation format  <xref target="RFC9499" section="" relative=""></xref>.<br />  The DNS Provider MUST ignore any parameter not referenced in the template.</td></tr><tr><td align="left"><strong>Group ID</strong></td><td align="left">groupId</td><td align="left">(OPTIONAL) Specifies the subset of groups from the template to apply.<br />  The value MUST conform to the  <tt>dc-id-list</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Force</strong></td><td align="left">force</td><td align="left">(OPTIONAL) Specifies that the template SHOULD be applied independently of any conflicts that may exist on the domain.<br />  The value MUST conform to the  <tt>dc-force</tt> syntax (see <xref target="terminology"></xref>).<br />  The default when omitted is  <tt>"0"</tt>.</td></tr><tr><td align="left"><strong>Provider Name</strong></td><td align="left">providerName</td><td align="left">(OPTIONAL) This parameter allows for the caller to provide additional context for the <tt>"providerName"</tt> that applied the template. It MAY be used by DNS Providers that want to display state regarding which templates have been applied. It is only allowed when the <tt>"sharedProviderName"</tt> attribute is set in the template being applied.<br />  The value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service Name</strong></td><td align="left">serviceName</td><td align="left">(OPTIONAL) This parameter allows for the caller to provide additional context for the <tt>"serviceName"</tt> that applied the template. It MAY be used by DNS Providers that want to display state regarding which templates have been applied. It is only allowed when the <tt>"sharedServiceName"</tt> attribute is set in the template being applied.<br />  The value MUST conform to the  <tt>dc-display-name</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Instance Id</strong></td><td align="left">instanceId</td><td align="left">(OPTIONAL) Only applicable to templates supporting multiple instances (see  <xref target="template-definition">multiInstance</xref> template property). Allows for later removal of one template instance by DNS Providers storing this information.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr></tbody></table>

<t anchor="_3cf019d7-44d8-1abd-223e-14047c9b3ea5">An example call is below. In this example, it is contemplated that there are two variables in this template, <tt>"IP"</tt> and <tt>"RANDOMTEXT"</tt> which both require values. These variables are passed as name/value pairs.</t>

<sourcecode anchor="_60a7e5c8-f491-ddd1-f02e-37473e21dcee"><![CDATA[POST

https://connect.dnsprovider.example/v2/domainTemplates/providers/
exampleservice.example/services/template1/apply?IP=192.0.2.42&
RANDOMTEXT=shm%3A1542108821%3AHello&force=1]]></sourcecode>


<t anchor="_d2ad4c45-ad45-d77d-38c8-b050c0aabac7">The API MUST validate the access token, and that the domain belongs to the user and is represented by the token being presented. The <tt>"domain"</tt> and <tt>"host"</tt> values MUST match those that were authorized in the access token. Any errors with variables, conflicting templates, or problems with the state of the domain are returned; otherwise the template is applied.</t>

<t anchor="_a9edbcca-c3e8-0b27-5f9b-7b2d115e6f08">Results of this call can include information indicating success or an error. Errors MUST be 400 status codes, with the following codes defined.</t>

<table anchor="_53d84554-5f42-80f8-d4e7-1957ca6d52cc"><name>http status codes of the apply end-point in the async flow</name><thead><tr><th align="left">Status</th><th align="left">Response</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>Success</strong></td><td align="left">2xx</td><td align="left">Any 200 level code MUST be considered a success. The response MAY be of status 200 with a response body, but also 204 without a body.</td></tr><tr><td align="left"><strong>Bad Request</strong></td><td align="left">400</td><td align="left">A response of a 400 indicates that the server cannot process the request because it was malformed or had errors. This response code is intended for programming errors.</td></tr><tr><td align="left"><strong>Unauthorized</strong></td><td align="left">401</td><td align="left">A response of a 401 indicates that caller is not authorized to make this call. This can be because the token was revoked, or other access issues.</td></tr><tr><td align="left"><strong>Conflict</strong></td><td align="left">409</td><td align="left">This indicates that the call was good, and the caller authorized, but the change could not be applied due to a conflicting template. Errors due to conflicts MUST NOT be returned when force is equal to 1.</td></tr><tr><td align="left"><strong>Error</strong></td><td align="left">4xx</td><td align="left">Other 4xx error codes SHOULD be returned when something is wrong with the request that makes applying the template problematic; most often something that is wrong with the account and requires attention.</td></tr></tbody></table>

<t anchor="_caedc61d-cc02-e379-ae21-15a7b649a51b">When a 409 is returned, the body of the response SHOULD contain details of the conflicting records. If present this MUST be JSON containing the error code, a message suitable for developers, and an array of tuples containing the conflicting records type, host, and data element.</t>

<t anchor="_e8ac38f1-ee68-1ce1-4071-aaac98742bd9" keepWithNext="true">EXAMPLE: Example conflict response</t><sourcecode anchor="_37115e23-0abb-aa11-8f50-c766230d083b" type="json"><![CDATA[{
    "code": "409",
    "message": "Conflicting records",
    "records": [
        {
            "type": "CNAME",
            "host": "www",
            "data": "@"
        },
        {
            "type": "A",
            "host": "@",
            "data": "random ip"
        }
    ]
}]]></sourcecode>

<t anchor="_ab72218d-7942-c4f1-4da9-ad66d3774bfc">In this example, the Service Provider tried to apply a new hosting template. The domain had an existing service applied for hosting.</t>
</section>

<section anchor="_26a787e3-33fc-0d2d-e7e5-96feccaaf3fe"><name>OAuth Flow: Revert Template</name>

<t anchor="_b6d78ad7-7675-be0a-0d06-2a9c863b2b20">This call reverts the application of a specific template from a domain.</t>

<t anchor="_1f1826c6-ef0e-eafd-693f-7e88e580fa59">Implementation of this call is OPTIONAL. If not supported a 501 MUST be returned.</t>

<t anchor="_9f50af4f-71c3-9e49-7132-8bbd389d44ec">Normative URI template of the asynchronous template revert end-point per <xref target="RFC6570" section="" relative=""></xref>:</t>

<sourcecode anchor="_94a0ec64-ffbb-248c-1084-7aeb524f2a87"><![CDATA[POST

{+urlAPI}/v2/domainTemplates/providers/{providerId}/services
/{serviceId}/revert{?domain,host,instanceId}]]></sourcecode>


<t anchor="_50aaf024-8419-bfa1-5a28-c502b764bae9">This API allows the removal of a template from a user domain/host using an OAuth request.</t>

<t anchor="_04804fc0-3a9b-5680-49a7-6ab89ac90c8a">An example URL might look like:</t>

<sourcecode anchor="_28faf00f-9ee9-3b1c-981e-898dafe040be"><![CDATA[POST

https://connect.dnsprovider.example/v2/domainTemplates/providers
/exampleservice.example/services/template1/revert?domain=example.com]]></sourcecode>


<t anchor="_ed9d9298-7f42-8a0f-23a8-7b4f4ea909a9">Allowed parameters:</t>

<table anchor="_ca371c6e-807d-2d64-f855-97c6a3054472"><name>URI template parameters of the revert end-point in the async flow</name><thead><tr><th align="left">Property</th><th align="left">Key</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><strong>URL API</strong></td><td align="left">urlAPI</td><td align="left">(REQUIRED) The base URL of the DNS Provider API, taken from the <tt>"urlAPI"</tt> field of the settings endpoint response (see <xref target="dns-provider-discovery"></xref>).  The value MUST be an absolute URI conforming to  <xref target="RFC3986" section="" relative=""></xref>.</td></tr><tr><td align="left"><strong>Service Provider Id</strong></td><td align="left">providerId</td><td align="left">(REQUIRED) Identifier of the Service Provider of the template to be reverted.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Service Id</strong></td><td align="left">serviceId</td><td align="left">(REQUIRED) Identifier of the template to be reverted.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr><tr><td align="left"><strong>Domain</strong></td><td align="left">domain</td><td align="left">(REQUIRED) The Zone Apex domain name being configured.<br />  The value MUST conform to the  <tt>domain-name</tt> syntax (see <xref target="terminology"></xref>).<br /></td></tr><tr><td align="left"><strong>Host</strong></td><td align="left">host</td><td align="left">(OPTIONAL) The host name of the Sub Domain within the zone identified by <tt>"domain"</tt>, as authorized in the token.<br />  When present, the value MUST be a single name conforming to  <tt>domain-name</tt> (see <xref target="terminology"></xref>) or an empty string.<br /></td></tr><tr><td align="left"><strong>Instance Id</strong></td><td align="left">instanceId</td><td align="left">(OPTIONAL) Only applicable to templates supporting multiple instances (see  <xref target="template-definition">multiInstance</xref> template property).<br />  This value indicates an applied template instance to be removed.<br />  The value MUST conform to the  <tt>dc-id</tt> syntax (see <xref target="terminology"></xref>).</td></tr></tbody></table>

<t anchor="_20ec98ed-2da1-f1ca-ffe1-f0f5f075d0b9">The DNS Provider MUST be able to accept these on the query string or in the body of the POST with <tt>application/json</tt> encoding.</t>

<t anchor="_564cb693-5964-181c-dcdf-7c1e9c660b52">The DNS Provider MUST validate the access token and verify that the domain belongs to the user represented by the token. The <tt>"domain"</tt> and <tt>"host"</tt> values MUST match those that were authorized in the access token. The DNS Provider MUST further verify that the template identified by <tt>"providerId"</tt>/<tt>"serviceId"</tt> and optionally <tt>"instanceId"</tt> has been applied to the <tt>"domain"</tt>/<tt>"host"</tt>; if it has not, an error response with code 410 SHOULD be returned.</t>

<t anchor="_2ab352b7-f0c8-bd36-8e64-7fbcfea7edbd">If <tt>"InstanceId"</tt> is provided only the single template instance which was applied with provided <tt>"InstanceId"</tt> MUST be removed, otherwise all instances of applied template MUST be removed.</t>

<t anchor="_3eeac875-b8f9-581e-00ab-5a2e78d2afea">The DNS Provider MUST remove all still active DNS Resource Records belonging to the identified template.</t>

<t anchor="_dbf899af-a6d5-d80d-94cf-08c1aeb74758">Response codes Success, Authorization, and Errors are identical to above with the addition of the 501 code.</t>
</section>

<section anchor="_4eaf06aa-2398-352d-922f-d10e16d819e9"><name>OAuth Flow: Revoking access</name>

<t anchor="_05425cbc-001d-c76d-1e06-a4227d79fd8d">Like all OAuth flows, the user may revoke the access at any time using UX at the DNS Provider site. As such the Service Provider needs to be aware that their access to the API may be denied.</t>
</section>
</section>

<section anchor="verification-of-changes"><name>Verification of Changes</name>

<t anchor="_436bddb1-184d-2dc5-e03e-82e26144dc16">After the synchronous or asynchronous flow completes, the Service Provider SHOULD verify that the expected DNS records are present in the zone by querying the authoritative DNS server for the domain.</t>

<t anchor="_93662dce-ca27-75ca-977e-3193bd996601">DNS verification MUST be treated as the authoritative signal of success. The reliability of the protocol-level completion signal depends on the flow used:</t>

<ul anchor="_8018be35-c34a-198f-b09c-e314de3d3e90"><li>In the synchronous flow, a <tt>"redirect_uri"</tt> callback received without an <tt>"error"</tt> parameter does not constitute proof that the template was applied. Users can modify redirect URIs in the user agent, so a successful-looking redirect MUST NOT be relied upon as confirmation of DNS changes, or the DNS Provider may encounter an internal error after returning the response. A <tt>"redirect_uri"</tt> callback received with an <tt>"error"</tt> parameter does not constitute proof that the template was NOT applied; the DNS Provider MAY have applied the template before the error condition arose.</li>
<li>In the asynchronous flow, a 2xx HTTP response to the apply request confirms that the DNS Provider accepted and processed the request. While this response cannot be tampered with by the user, it does not guarantee that the DNS zone has been updated; the DNS Provider may encounter an internal error after returning the response.</li>
</ul>

<t anchor="_ecd13a9b-fa6e-8d10-8559-5230026fc54d">Receipt of a protocol-level completion signal MAY be used as a trigger to initiate DNS verification. However, the Service Provider MUST account for DNS propagation delay and MUST implement a retry mechanism with appropriate intervals until the expected records are observed or a timeout is reached.</t>

<t anchor="_00d57fad-3351-9eeb-cdd6-d8a88d53cf9d">To minimize delays caused by DNS resolver caching, it is RECOMMENDED that the Service Provider query a DNS resolver configured with low TTL overrides, or query the authoritative name servers directly.</t>
</section>
</section>
    <section anchor="template-processing"><name>Resolving Template Variables</name>

<section anchor="variables"><name>Variables</name>

<section anchor="_f3df2941-15a5-0c6e-05c4-c6b011063881"><name>Variable Syntax</name>

<t anchor="_8ccafff0-aec1-c61c-9497-71d9ecb757cc">Variable expressions are the parameterized parts of a Domain Connect Template. Each expression contains one variable specifier (which can be either a named variable or a special variable <tt>"@"</tt>) that is replaced with a value during template application.</t>

<t anchor="_31e66812-4913-5a42-832c-922d1179a517">Variable expressions MUST conform to <tt>"variable-expression"</tt> syntax (see <xref target="terminology"></xref>).</t>
</section>

<section anchor="special-variables"><name>Special and Built-In Variables</name>

<t anchor="_118e3506-6784-8d92-17f8-4604aa8fa865">There are three Built-In variables:</t>

<ul anchor="_7dd6f332-8f76-5c24-5af2-01019791c8b3"><li><tt>"%host%"`</tt>: This is the host passed from the query string</li>
<li><tt>"%domain%"`</tt>: This is the domain passed from the query string</li>
<li><tt>"%fqdn%"</tt>: This is the fully qualified domain name or template application e.g. [host.]domain</li>
</ul>

<t anchor="_61223692-8f1f-4bac-01d2-9fc7615d7332">For example, with the query string "domain=example.com&#x26;host=", <tt>"%fqdn%"</tt> in a template would be "example.com", and with "domain=example.com&#x26;host=sub1", <tt>"%fqdn%"</tt> in a template would be "sub1.example.com".</t>

<t anchor="_c1f756d4-6eba-77bb-8eea-f1cc036f16df">The <tt>"@"</tt> variable has special meaning, and can be used in the <tt>"host"</tt>/<tt>"name"</tt> field or in the <tt>"pointsTo"</tt> field in isolation. For the <tt>"host"</tt>/<tt>"name"</tt> and <tt>"pointsTo"</tt> fields it is a shortcut for the value <tt>"%fqdn%."</tt>. The trailing dot here is equal to the DNS master file notation <xref target="RFC1035" section="" relative=""></xref>, which indicates the value is absolute. For some record types, like  <tt>"A"</tt> or <tt>"AAAA"</tt> usage of <tt>"@"</tt> in pointsTo would not render a valid IP address, therefore MUST NOT be used. Likewise in <tt>"NS"</tt> record types it would render a circular delegation therefore MUST NOT be used.</t>
</section>
</section>

<section anchor="variable-substitution"><name>Variable substitution</name>

<section anchor="_2780bb96-b534-4384-ceeb-287961136deb"><name>Input Values</name>

<ul anchor="_4069b6cf-2ce8-5eb8-3409-dcf4dc935571"><li>Template fields - the string-valued fields of each template record where variables are allowed. Fields MUST be decoded from JSON string encoding before variable substitution is performed.</li>
<li>Named variable values - the name/value pairs supplied by the caller in the apply request (query string parameters or JSON body). Values MUST be treated as strings regardless of how the underlying data source represents them; any transport encoding (e.g., URL percent-encoding) MUST be decoded before substitution. The resulting substituted value MUST reflect the exact original input value string.</li>
<li>Built-in variable values - the values of <tt>"%domain%"</tt>, <tt>"%host%"</tt>, and <tt>"%fqdn%"</tt> derived from the <tt>"domain"</tt> and <tt>"host"</tt> apply parameters (see <xref target="special-variables"></xref>).</li>
</ul>
</section>

<section anchor="_95a165eb-9fa9-ac53-2ee0-a2645b911a9f"><name>Processing</name>

<t anchor="_1a33efd1-2c37-7b9f-067e-00a461ad57e9">When a template is applied, the variables in the template are replaced with the values passed as input.</t>

<t anchor="_2a92d906-6692-78d9-8be9-d1b247db1588">Variables are identified by their name ('"variable-name"' part of the syntax or <tt>"@"</tt>) and the whole variable expression is replaced with a value of either Built-In Variable or Name/Value pairs provided to the Apply operation.</t>

<t anchor="_fbb7ed1e-ab20-a3fc-a100-1676ef082ee5">Only active records (as determined by group filtering, see <xref target="group-filtering"></xref>) MUST be processed. Template fields of inactive records MUST NOT be processed.</t>

<t anchor="_1e47f62d-93f4-4afd-fbbe-37644986043d">Variables are only allowed in template fields of type string, therefore the input field values from the template MUST be decoded from JSON string encoding before variable substitution.</t>

<t anchor="_d3c9cee2-d9dc-738b-bf42-530d259b279d">Variables are replaced in the template fields in the order they are found. If a variable is not found in the input, the processing MUST fail. After a variable is replaced, only the remaining string is used for further variable substitution.</t>

<t anchor="_41fe982e-6423-4279-1bdd-b78decb9bd95">The result of the processing MAY still contain strings containing variable expressions coming from Input Values of variable substitution. The processing MUST NOT fail in this case, and the variable expressions MUST be left as is without any further processing.</t>

<t anchor="_40febbbf-f480-fe1c-f475-ab2e99ebdf63">The DNS Provider MUST ignore any request parameter not referenced in the template.</t>
</section>
</section>

<section anchor="host-name-rendering"><name>Host Name Rendering</name>

<t anchor="_9ccae6f8-5c27-76f5-aaf6-5489ff558403">After variable substitution, each template record's <tt>"host"</tt> or <tt>"name"</tt> field value is combined with the <tt>"domain"</tt> and <tt>"host"</tt> apply parameters to produce the final DNS owner name for the resource record.</t>

<section anchor="_45e83eb8-7351-50b5-c0c2-54e7230d3dd4"><name>Input Values</name>

<ul anchor="_f2d2d8cd-4cd5-3dea-8ccb-546ca1e8f09a"><li><tt>"domain"</tt> - the Zone Apex, as supplied in the apply request.</li>
<li><tt>"host"</tt> - the Sub Domain label(s), as supplied in the apply request. An empty value or absence of this parameter indicates the Zone Apex.</li>
<li>The rendered <tt>"host"</tt> or <tt>"name"</tt> field value of the template record after variable substitution.</li>
</ul>
</section>

<section anchor="_f17cfd17-1071-6439-9ef9-23145b5770fc"><name>Processing</name>

<t anchor="_0e55fbb2-1fbf-aa09-61d5-ae4475237d3b">If the rendered template field value is <tt>"@"</tt> or empty, it resolves to the root of the applied scope - equivalent to the fully qualified <tt>"[host.]domain."</tt>.</t>

<t anchor="_25342d93-2d69-677b-324b-c85cbbe18c75">If the rendered template field value ends with a <tt>"."</tt> (trailing dot), it is treated as an absolute DNS name and used as-is, without further qualification.</t>

<t anchor="_566bf342-2680-adfd-f133-ff3b63643cc8">Otherwise, the rendered value is treated as relative and prepended as a label to the fully qualified <tt>"[host.]domain"</tt> formed by the apply parameters.</t>
</section>

<section anchor="_7f4e147b-c3b9-3fed-6635-d54e371083bf"><name>Examples of host processing</name>

<t anchor="_923c50e6-de96-c3a0-611b-bb8dd724545f" keepWithNext="true">EXAMPLE: Template records example</t><sourcecode anchor="_87fe3c0a-9ac0-8c2a-b61e-c338af2148b0" type="json"><![CDATA[[{
    "type": "CNAME",
    "host": "www",
    "pointsTo": "@",
    "ttl": 1800
},
{
    "type": "A",
    "host": "@",
    "pointsTo": "192.0.2.1",
    "ttl": 1800
}]]]></sourcecode>

<t anchor="_f73af708-84d1-a9e5-aee9-76ef6ea98bc2">DNS zone after the template applied with <tt>"domain=example.com"</tt> and <tt>"host"</tt> parameter missing or empty:</t>

<sourcecode anchor="_58196991-efe6-f7af-a1c6-a5b4d8f03e8a"><![CDATA[www 1800 IN CNAME example.com.
@   1800 IN A 192.0.2.1]]></sourcecode>


<t anchor="_8f1da917-70b3-9d10-b872-bdcf8fe3ca81"><em>alternatively</em></t>

<sourcecode anchor="_d363a5c6-cf98-5245-4db5-950abaa0a61e"><![CDATA[www.example.com.    1800 IN CNAME example.com.
example.com.        1800 IN A 192.0.2.1]]></sourcecode>


<t anchor="_36150ebd-37c3-fd66-5b79-b2f64f61ac3c">DNS zone after the template applied with <tt>"domain=example.com"</tt> and <tt>"host=bar"</tt>:</t>

<sourcecode anchor="_5f5a2313-ea26-706e-9e67-b1f0d66e7dd9"><![CDATA[www.bar 1800 IN CNAME bar.example.com.
bar     1800 IN A 192.0.2.1]]></sourcecode>


<t anchor="_3ecea365-2d2a-15c6-0b0d-efaf06de9293">alternatively</t>

<sourcecode anchor="_690d22c8-892d-5b5e-30ca-dc616cad4012"><![CDATA[www.bar.example.com.    1800 IN CNAME bar.example.com.
bar.example.com.        1800 IN A 192.0.2.1]]></sourcecode>

</section>
</section>

<section anchor="spf-record-merging"><name>SPF Record Merging</name>

<t anchor="_694d3149-dcc9-7ca7-4b42-27eaaba5d10b">The challenge with SPF <xref target="RFC7208" section="" relative="">RFC 7208</xref> records and Domain Connect is that an individual service might recommend an SPF record. If only one service were active, this would be accurate. But with several services together only the DNS Provider is able to determine the valid shape of a SPF TXT record.</t>

<t anchor="_4a430444-12a5-4124-ea37-8fe1eb40840a">One solution to this problem is to merge all related records. At the highest level, this means taking everything between the "v=spf1" and the "all" from each of the records and merging them together, terminating with hard-coded modifier on <tt>"all"</tt> at the end.  For an SPF record to fulfill it's purpose of protection against malicious email delivery, it is RECOMMENDED to use a fixed modifier <tt>"~"</tt> advising lower rating of the messages from other sources not specified in SPF, however DNS Provider MAY set this modifier at their own discretion and according to the current best practice.</t>

<sourcecode anchor="_b4953ede-430f-df76-eed2-2711b7ff5c88"><![CDATA[@ TXT v=spf1 include:spf.mailer1.example include:_spf.newsletter.exam
ple ~all]]></sourcecode>


<t anchor="_09cd864b-54a0-8939-2812-c44fa1517852">The other would be to write intermediate records, and reference these locally.</t>

<sourcecode anchor="_88a0e812-50c3-0c32-7dbf-1cb2e58c25fa"><![CDATA[r1.example.com. TXT v=spf1 include:spf.mailer1.example ~all
r2.example.com. TXT v=spf1 include:_spf.newsletter.example ~all
@ TXT v=spf1 include:r1.example.com include:r2.example.com ~all]]></sourcecode>


<t anchor="_8a23b49f-08bc-3084-5f2a-ec73f10d542e">There are advantages and disadvantages to both approaches.  SPF records have a limit of 10 DNS lookups and record length is limited to 255 characters.  So depending on the embedded records both approaches might have advantages.</t>

<t anchor="_d45f751b-0288-e46b-8ebc-8a8a10d39f8c">The implementation would be left to the DNS Provider, but to facilitate this SPF records SHOULD NOT be included in templates.  Instead, a new pseudo-record type is introduced in the template called <tt>"SPFM"</tt>. This has the following attribute:</t>

<dl anchor="_35eeb2bc-8dcd-77b1-ef60-8f013d34c082"><dt><tt>"spfRules"</tt>:</dt><dd anchor="_aeeaa7f0-727e-1cc7-09a9-162de78e237b"><t anchor="_2f402de4-b975-1c88-2e28-9aff2ca89698">Determines the desired rules, basically everything but leading "v=spf1" and trailing <tt>"all"</tt> rule -  see: <xref target="template-record">SPF Rules</xref></t>
</dd></dl>

<t anchor="_5d93bff9-aa69-b34d-22c4-109911817018">When a template is added or removed with an <tt>"SPFM"</tt> record in the template, some code would need to take the aggregate value of all <tt>"SPFM"</tt> records in all templates applied as well as existing SPF TXT record on the host and recalculate the resulting SPF TXT record. In case several sources specify the same rule with a different policy DNS Provider SHOULD apply the least restrictive one as a result. <tt>"soft failure"</tt> SHOULD be preferred over <tt>"hard failure"</tt>, <tt>"neutral"</tt> SHOULD be preferred over <tt>"soft failure"</tt>.</t>

<t anchor="_986f66dc-0279-82b2-aefb-353bf844798f">DNS Provider SHOULD also allow the end user to modify the SPF record after merging.</t>

<t anchor="_a58b4653-2f16-ba84-cb66-c60a35e3bdf1">Due to merging step in between, the resulting SPF TXT records are considered non-essential. That means the user may decide to override the final calculated value or remove the whole SPF record. This action MUST NOT lead to removal of any related templates in conflict detection and template integrity routines if implemented by the DNS Provider.</t>

<t anchor="_fa3df32f-272a-5607-3e17-24db4e73bd80">If the existing TXT record makes the merging operation not possible, the DNS Provider MUST handle this situation the same way as a conflict and either let the end-user resolve it in the UX.</t>

<t anchor="_33e077e0-5104-3277-6f8f-bc7e0b2c294b">Service Providers MUST NOT check content of TXT SPF record for an exact match, as it might be strongly influenced by the DNS Provider merging strategy and user actions.</t>

<t anchor="_f88053a7-039d-b9ce-b76f-853115b28d13">See <xref target="example-spf-merge"></xref>.</t>
</section>
</section>
    <section anchor="template-application"><name>Template Application</name>

<section anchor="_2540acf4-541d-a67a-dab9-17db344abe43"><name>Template State in DNS Providers system</name>

<t anchor="_ad6b6bb3-d2b5-df78-6945-b80e36f7ae1e">DNS Providers MAY choose to maintain state inside records in DNS indicating the templates writing the records.</t>

<t anchor="_ab2daa1c-eee6-ac0e-d992-0f973c096500">A DNS Provider that maintains this state may be able to provide an improved experience for users, telling them the services enabled. They also may be able to have more advanced handling of conflicts and assure integrity of applied template instances.</t>

<t anchor="_4259ac2f-ceee-7298-cddd-af389ee7adb7">A template instance is identified by the pair <tt>"domain"</tt> and <tt>"host"</tt> where the template has been applied. Therefore, the same template MUST be able to be applied more than once to the same DNS zone identified by <tt>"domain"</tt>, as long as the value of <tt>"host"</tt> parameter differs. Application of the same template with same <tt>"host"</tt> MAY be handled as an update by DNS provider, or just trigger a regular conflict detection and resolution routine by DNS Provider - removal of the previous instance and apply of the new instance.</t>

<t anchor="_a1481872-86f4-8ad8-6922-cb0bd45b241b">Manual changes made by the user at the DNS Provider MAY also trigger conflict detection against applied templates in order to maintain integrity.</t>
</section>

<section anchor="steps-to-apply"><name>Steps to Apply a Template</name>

<t anchor="_fbd89c36-9d6d-f82c-83a0-15efae699ec4">The following steps give an overview of the template application process. Each step is described in detail in the sections below.</t>

<ol anchor="_e0265fa1-c78f-73e0-219e-10e86f2b5d58" type="1"><li><strong>Verify template applicability</strong> - For synchronous flow requests, the DNS Provider MUST verify that the template's <tt>"syncBlock"</tt> field is not <tt>"true"</tt>. If it is, the DNS Provider MUST NOT process the request and MUST return an error.</li>
<li><strong>Verify zone ownership</strong> - The DNS Provider MUST verify that the target zone identified by <tt>"domain"</tt> is present in the user's account and that the user is authorized to make changes to it.</li>
<li><strong>Filter records to apply</strong> - select records applicable for further processing based on <tt>"groupId"</tt> property of the template and <tt>"groupId"</tt> apply parameter (see <xref target="group-filtering"></xref>).</li>
<li><t anchor="_ab880f51-9fb7-8cb7-bfcb-d91c16d61f9e"><strong>Resolve variables</strong> - All variable expressions in active template records are substituted with the values provided by the caller, producing a concrete set of DNS resource records (RRs) to be applied (see <xref target="variable-substitution"></xref>).</t>
<ol anchor="_8217b420-3260-b804-4079-b71a1a062c31" type="a"><li>abort if rendered RRs are not possible to be applied to the target zone</li>
</ol>
</li>
<li><t anchor="_8662de31-c840-09a6-fd5c-91c888808ada"><strong>Perform conflict detection</strong> - The DNS Provider checks the resolved RR set against the existing zone content according to the conflict detection rules (see <xref target="conflict-detection"></xref>).</t>
<ol anchor="_54395085-c7bf-3429-90e4-4c263354781a" type="a"><li>Identify individual zone records that conflict with the resolved RR set.</li>
<li>(only DNS Providers tracking template state): Check each resolved RR against essential records of previously applied templates. Identify which previously applied templates own conflicting records and would be removed in their entirety (see <xref target="essential-records"></xref>).</li>
<li>(only DNS Providers tracking template state): Mark instances of the same template applied on the same <tt>"host"</tt> for removal unless <tt>"multiInstance"</tt> is set for the template (see <xref target="multi-instance"></xref>).</li>
</ol>
</li>
<li><strong>Pre-calculate conflict resolution</strong> - Determine the full set of records and, where applicable, template instances that would be removed upon application (see  <xref target="calc-conflict-resolution"></xref>).</li>
<li><t anchor="_ab236120-0db3-499a-16a6-c79f68bcb758"><strong>Obtain user authorization</strong> - The DNS Provider MUST present the intended changes and the pre-calculated conflict consequences to the user and obtain explicit authorization before proceeding (see  <xref target="user_authorization_of_changes"></xref>).</t>
<ol anchor="_31206fe6-f01d-3151-e6ee-ac53eb7958ce" type="a"><li>abort if authorization not granted</li>
</ol>
</li>
<li><t anchor="_d5e07b4a-52e5-eb02-74b2-a46e7434b2d7"><strong>Apply changes</strong> - After authorization is granted, or at later point in Asynchronous flow:</t>
<ol anchor="_cf222417-0d12-70f8-e1db-e28e8f68b5dd" type="a"><li>Remove all records pre-calculated for removal from the zone.</li>
<li>Write the resolved RR set to the zone in totality.</li>
<li>(only DNS Providers tracking template state): Record the new template instance for the  <tt>"domain"</tt> and <tt>"host"</tt> pair and remove the state of any template instances that were resolved for removal.</li>
</ol>
</li>
</ol>
</section>

<section anchor="group-filtering"><name>Group Filtering</name>

<t anchor="_e414a5d3-553b-75ad-38ed-b0232f4d8fef">Before variable substitution and any further processing, the DNS Provider MUST determine the <strong>active record set</strong> - the subset of template records that are subject to processing - by applying the following rules to each record in the template:</t>

<ol anchor="_22876a21-a479-171a-f113-3704f17c0112" type="1"><li>A record with no <tt>"groupId"</tt> field is always active, regardless of   whether a <tt>"groupId"</tt> parameter was supplied in the apply request.</li>
<li>A record with a <tt>"groupId"</tt> field is active if and only if its <tt>"groupId"</tt> value appears in the list supplied as the <tt>"groupId"</tt> apply parameter. Matching is case-sensitive and exact.</li>
<li>If no <tt>"groupId"</tt> parameter is supplied in the apply request, all records are active irrespective of whether they carry a <tt>"groupId"</tt>.</li>
</ol>

<t anchor="_5c666005-826e-dd2c-2268-87ad52165c9d">Only active records MUST be subject to variable substitution, conflict detection, and zone write operations.  Inactive records MUST be excluded from all template processing steps and MUST NOT be written to the zone.</t>

<t anchor="_d6d4beac-8b2e-254c-1c6b-adb8963e8baf">If the <tt>"groupId"</tt> parameter is supplied but no record in the template carries a <tt>"groupId"</tt> that matches any of the specified identifiers (i.e., the active record set consists solely of ungrouped records or is empty), the DNS Provider MUST return an error and MUST NOT make any changes to the zone.</t>

<section anchor="_c1df741d-3278-ccf0-0a2e-6f08a04c872d"><name>Group Filtering and Template State</name>

<t anchor="_af677b1c-3756-6038-6706-86e5d1233d39">When a <tt>"groupId"</tt> parameter is supplied, the apply operation is additive: only the records belonging to the specified groups are written, while records of other groups that were written by a prior application of the same template instance MUST NOT be disturbed.</t>

<t anchor="_804bcbb8-85c6-40e5-1be8-ab134dfe5186">Consequently, for DNS Providers that maintain applied template state, an existing instance of the same template on the same <tt>"domain"</tt> and <tt>"host"</tt> MUST NOT be removed before the new records are written, regardless of conflict-detection outcome for the active record set, however such provider MUST remove the records previously written for the same group(s) before writing the new active record set, in order to avoid accumulation of stale records from superseded group applications.</t>
</section>
</section>

<section anchor="conflict-detection"><name>Conflict Detection</name>

<t anchor="_23c46d8e-fcf0-1b2f-6f62-1d8d85502c27">Conflict detection is performed by the DNS Provider prior to template application.  The rules below ensure predictable conflict resolution between DNS Providers.  Each rule applies to records on the same host, unless otherwise specified.</t>

<ul anchor="_79352c54-3512-1339-3ede-8cf0be26c12e"><li>A CNAME record conflicts with any other record on the same host, and any existing records conflict with a CNAME.</li>
<li>An NS record conflicts with all other records on the same host, and with any record whose host is subordinate to the NS host.  For example, an NS record for <tt>"foo"</tt> conflicts with any record at <tt>"foo"</tt>, <tt>"www.foo"</tt>, <tt>"bar.foo"</tt>, etc.  Conversely, any other record type conflicts with NS records in the same manner.</li>
<li>MX and SRV records conflict with any other record of the same type on the same host.</li>
<li>A and AAAA records conflict with any other A or AAAA record on the same host, to avoid IPv4 and IPv6 addresses pointing to different services.</li>
<li><t anchor="_23990a2d-984f-56bd-3b91-363ac16ec489">TXT record conflict detection is governed by the <tt>"txtConflictMatchingMode"</tt> property of the template record:</t>
<ul anchor="_e563b658-2a46-9543-92e4-6597d91eebad"><li><tt>"None"</tt> - the record does not conflict with any other TXT record.  This is the default.</li>
<li><tt>"All"</tt> - the record conflicts with any other TXT record on the same host.</li>
<li><tt>"Prefix"</tt> - the record conflicts with any other TXT record on the same host whose value starts with <tt>"txtConflictMatchingPrefix"</tt>.</li>
</ul>
</li>
</ul>

<t anchor="_74ccc8aa-4e51-f067-ecb5-7c302db34a7b">Note: DNS Provider MUST also check applicability of all generated records to the target DNS zone in its own system. For example it is very common for DNS provider not to allow CNAME records to be at the zone apex.</t>

<section anchor="_628dca40-ba11-e3a4-5fc7-11a07217f805"><name>Conflict Detection Special Handling</name>

<section anchor="multi-instance"><name>Multi-Instance</name>

<t anchor="_b9c1f15a-3efa-a2b3-2336-3876b80297af">This processing only REQUIRED for DNS Providers that maintain applied template state.</t>

<t anchor="_26427b73-d0eb-2585-25be-b73be764aa6c">By default a template is expected to be applied only once to a target <tt>"domain"</tt> and <tt>"host"</tt>, therefore any consecutive attempt to apply the same template would be treated as an update. For some templates however it is desirable to be able to create multiple instances (for example add second TXT record on the same host as opposed to replacing the current value).</t>

<t anchor="_dd45661d-f19c-85b4-7658-a3686740730e">A template flag <xref target="template-definition">multiInstance</xref> can be set in order to allow for that. This tells the DNS Provider that the template is expected to be written multiple times and that a re-apply MUST NOT remove previous instances with the same  <tt>"host"</tt>. Regular conflict detection rules MUST still be processed between instances, therefore such a template MUST be designed so that it does not conflict with itself.</t>
</section>

<section anchor="essential-records"><name>Essential Records</name>

<t anchor="_cc2d782b-4fd1-9c17-41de-c2b19a62d307">This processing only REQUIRED for DNS Providers that maintain applied template state.</t>

<t anchor="_7969e7bf-ba60-5ca7-6f70-e6dfd261d162">A template record is considered essential when it MUST be present and remain consistent with the applied template for the entire lifetime of the service. The <strong>essential</strong> property of a template record controls this behavior and MUST be set to <tt>"Always"</tt> (the default) for such records.</t>

<t anchor="_8f0aee14-9a5b-1a02-fabc-e622703b3c14">A DNS Provider that maintains applied template state MUST treat an attempt of removal or modification of such an essential record as a conflict indicator, and MUST require the full template to be removed or abort.</t>

<t anchor="_74a06b0f-92a7-d854-e342-63a3eedeb59b">Records with <tt>"essential=OnApply"</tt> MUST be applied when the template is first applied, but MAY be subsequently removed or altered - by the user or through the application of another template - without triggering conflict or removal of the owning template.</t>
</section>
</section>
</section>

<section anchor="calc-conflict-resolution"><name>Calculating Conflict Resolution</name>

<t anchor="_fe741ad1-b35f-e7b5-221b-32da76221841">A DNS Provider not maintaining applied template state, applying a template whose records conflict with any existing record in the zone MUST remove all those conflicting records.</t>

<t anchor="_4e71b1ae-3460-1573-0a66-124923520212">When a DNS Provider maintains applied template state, applying a template whose records conflict with records written by a previously applied template MUST cause the conflicting prior template to be removed in its entirety, unless a conflicting record is explicitly marked as non essential and eligible for removal. As an example: if template T1 wrote records A and B, and template T2 is applied with records B and C, record B conflicts, and T1 is removed together with all its records before T2 is applied.</t>
</section>

<section anchor="user_authorization_of_changes"><name>User Authorization of Changes</name>

<t anchor="_d32af00d-13e5-d971-18a6-44f173f3acfd">It is ultimately left to the DNS Provider to determine the amount of disclosure and/or conflict detection.</t>

<t anchor="_c9c09e01-d4ff-61c1-e2e0-b43fd7cd2b73">The DNS Provider MUST inform the user of the service that is about to be enabled when requesting authorization. If the user wishes to review the specifics, the DNS Provider SHOULD make the individual DNS records being set available, in order to allow informed decision before changes are applied.</t>

<t anchor="_288348c6-cb03-bbe9-1cb7-256d67d88ed0">If conflicts are detected - at either the template or record level - the DNS Provider SHOULD present these to the user before authorization is granted. For template instances this means identifying services that would be disabled; for records this means identifying records that would be deleted or overwritten.</t>

<t anchor="_f6fb42e6-b1da-db77-2c6c-59ffa8bedbba">The DNS Provider MUST allow the user to override a detected conflict and proceed with the template application, or to abort the process.</t>

<t anchor="_148a1c60-9739-f44e-4135-ca6f2ef469a2">When presenting the authorization request to the user, the DNS Provider SHOULD display the template's <tt>"providerName"</tt> and <tt>"serviceName"</tt> fields. When a caller supplies <tt>"providerName"</tt> or <tt>"serviceName"</tt> request parameters (permitted only when the template's <tt>"sharedProviderName"</tt> or <tt>"sharedServiceName"</tt> flags are set, respectively), the DNS Provider SHOULD use those values to augment the displayed name. It is RECOMMENDED however to also display the original <tt>"providerName"</tt> and <tt>"serviceName"</tt> defined in the template.</t>

<t anchor="_91e81e81-3caa-4a36-1d45-a5b15ffd8c1c">When the template's <tt>"warnPhishing"</tt> field is <tt>"true"</tt>, the DNS Provider SHOULD display additional warnings prompting the user to verify the source of the request before proceeding, and SHOULD provide a more verbose description of the changes about to be applied.</t>
</section>

<section anchor="_239cb669-51f4-dedf-26cc-7004ae36df1f"><name>Template Application</name>

<t anchor="_9ad739dc-475a-1a50-4790-4ba2960f8986">In the Synchronous Flow, after authorization is granted, the DNS Provider applies the template to the DNS zone.</t>

<t anchor="_b774ec88-b609-2ddb-31a0-ba5a10ec3449">In the Asynchronous Flow this happens in later point in time. In this case conflict resolution MUST be calculated again for the actual state of the zone and parameters provided with the apply request.</t>

<t anchor="_1eed213e-8573-ec0d-1f49-48555a2a2922">The DNS Provider MUST remove all conflicting templates and records from the target zone.</t>

<t anchor="_89de8103-59f6-4f1b-8764-134d2c635e9f">The DNS Provider MUST apply all records of the template in totality as one atomic operation.</t>
</section>

<section anchor="_a9bf3864-db6f-4e80-963b-8680fea88735"><name>Examples</name>

<t anchor="_a95402e5-2e7b-25df-41ed-e1a7ee754a36">Examples of template processing are in <xref target="examples"></xref>.</t>
</section>
</section>
    <section anchor="security-considerations"><name>Security Considerations</name>

<section anchor="_956ccf89-c572-5cf3-b5c4-662acc8edd7e"><name>OAuth Client Secret Leakage</name>

<t anchor="_4a2f78fc-d15e-8036-8ee5-a98f8e614222">When the <tt>"client_secret"</tt> is used in the OAuth token exchange, care must be taken to prevent secret leakage. A malicious actor could create a domain with a false  <tt>"_domainconnect"</tt> TXT record pointing to a server under their control, causing a Service Provider that uses the discovered  <tt>"urlAPI"</tt> value to inadvertently expose the secret to that server.</t>

<t anchor="_74f3e2cb-7fca-8a9a-0693-18e9e2128f12">The Service Provider SHOULD therefore maintain the <tt>"urlAPI"</tt> endpoint for OAuth token requests as a stored, pre-registered value per DNS Provider, rather than using the value returned during DNS Provider discovery.</t>
</section>

<section anchor="sec-variable-phishing"><name>Template Variable Phishing</name>

<t anchor="_d2e11e7f-ee6a-e3fa-fd9a-d4e4fa4c2217">Templates that accept variable parameters introduce a phishing risk. The more static the values in a template record, the more secure the template. When variable values cannot be avoided, a bad actor could craft an apply URL substituting a malicious value - for example, a hijacked IP address - and send it to users as a seemingly legitimate reconfiguration request. The user would be presented with a DNS Provider consent screen that appears valid, but would result in DNS being pointed at infrastructure under the attacker's control.</t>

<t anchor="_a9acb6e0-0932-28eb-5650-6b5c80a9c1c5">Not all templates are susceptible; the risk is proportional to how much of a record's content is controlled by variables. Three mitigations are available to template authors and Service Providers: disabling the synchronous flow via <tt>"syncBlock"</tt>, digitally signing apply requests (see the Section &#x3c;&#x3c;<xref target="signing-procedure"></xref>,format=title&#x3e;&#x3e;), and setting the <tt>"warnPhishing"</tt> flag to prompt the DNS Provider to display additional warnings to the user.</t>
</section>
</section>
    <section anchor="iana"><name>IANA Considerations</name>

<section anchor="iana-underscore"><name>Underscore <tt>"_domainconnect"</tt> DNS Node Name</name>

<t anchor="_4a861a3b-a5d1-88a7-2e8a-3f0176fffed3">Per <xref target="RFC8552" section="" relative=""></xref>, please add the following entry to the "Underscored and Globally Scoped DNS Node Names" registry:</t>

<table anchor="_25cb6e1e-a8bf-f787-bf36-87b0f1ab2b25"><name>IANA Registration for _domainconnect</name><thead><tr><th align="left">RR Type</th><th align="left">_NODE NAME</th><th align="left">Reference</th></tr></thead><tbody><tr><td align="left">TXT</td><td align="left">_domainconnect</td><td align="left">This document.</td></tr></tbody></table>
</section>

<section anchor="iana-settings-properties"><name>Domain Connect Settings Properties Registry</name>

<t anchor="_14530192-1794-59f7-7cdb-c3e432ddc65e">IANA is requested to create a new registry named "Domain Connect Settings Properties" under a new registry group "Domain Connect Protocol".</t>

<t anchor="_b7366f70-dc18-e7db-e818-efd6e97a2673">Registration policy: Specification Needed (see <xref target="RFC8126" section="" relative=""></xref>).</t>

<t anchor="_234aff10-d622-01bd-6d65-dc963726ebe2">Each entry in the registry MUST include:</t>

<ul anchor="_3023990a-6e51-e9e1-1e49-3a3066b762a8"><li><strong>Property name</strong>: the JSON key as it appears in the settings response.</li>
<li><t anchor="_2e1c43d1-9102-fe79-f5cc-c84d6a278a6c"><strong>Status</strong>: the lifecycle state of the registration. The following values are defined; IANA MAY define additional values as needed:</t>
<ul anchor="_5c0d8200-4600-5dc5-c2d1-3b61f7c4dd7b"><li><tt>"Active"</tt>: the property is currently in use and its definition is normative.</li>
<li><tt>"Deprecated"</tt>: the property SHOULD NOT be used in new implementations; it MAY appear in existing deployments for backwards compatibility.</li>
</ul>
</li>
<li><strong>Kind</strong>: the nature of the defining document. The value MUST be one of: <tt>"IETF Standard"</tt> for properties defined in a standards-track RFC, <tt>"Informational"</tt> for properties defined in an Informational RFC, or <tt>"Other"</tt> for any other specification.</li>
<li><strong>Reference</strong>: the document that defines the property.</li>
</ul>

<t anchor="_9ca5288e-2973-7ca5-e8fd-72eb13a9538d">The following properties from this specification constitute the initial contents of the registry:</t>

<table anchor="_dc5be347-c37b-928a-d975-830156b94c38"><name>Initial Domain Connect Settings Properties</name><thead><tr><th align="left"><strong>Property Name</strong></th><th align="left"><strong>Status</strong></th><th align="left"><strong>Kind</strong></th><th align="left"><strong>Reference</strong></th></tr></thead><tbody><tr><td align="left"><tt>"providerId"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr><tr><td align="left"><tt>"providerName"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr><tr><td align="left"><tt>"providerDisplayName"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr><tr><td align="left"><tt>"urlSyncUX"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr><tr><td align="left"><tt>"urlAsyncUX"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr><tr><td align="left"><tt>"urlAPI"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr><tr><td align="left"><tt>"width"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr><tr><td align="left"><tt>"height"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr><tr><td align="left"><tt>"urlControlPanel"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr><tr><td align="left"><tt>"nameServers"</tt></td><td align="left">Active</td><td align="left">IETF Standard</td><td align="left">This document</td></tr></tbody></table>
</section>
</section>
    <section anchor="_c4209395-659b-0eea-9d9d-e4c7c55d32bd" numbered="false" removeInRFC="true" toc="include"><name>Implementation Status</name>

<section anchor="_b28ef534-315c-1299-bead-ab9dc7b8e831" numbered="false" toc="exclude"><name>DNS Providers</name>

<section anchor="_65b664c5-3add-d3b5-b219-90487e568398" numbered="false" toc="exclude"><name>Open Source</name>

<ul anchor="_7d03fdbd-6040-a6e1-0a01-19918aee25bb"><li>Server library (Python):<eref target="https://github.com/Domain-Connect/DomainConnectApplyZone"></eref></li>
</ul>
</section>

<section anchor="_e8280e7e-f2f1-a263-c4ff-4c57a4559e08" numbered="false" toc="exclude"><name>Proprietary implementations</name>

<ul anchor="_1846ed1e-991d-42f0-8c76-e8304606b64f"><li>~20 providers, incl. GoDaddy, IONOS, Cloudflare, Squarespace Domains (former Google), Wordpress.com or Plesk</li>
<li>35% of the .com zone (May'24)</li>
</ul>
</section>
</section>

<section anchor="_cbcc882b-8482-321a-bf50-2300d2f7e4dc" numbered="false" toc="exclude"><name>Service Providers</name>

<section anchor="_3a3467ee-153c-94ef-ab72-ea5a0143306b" numbered="false" toc="exclude"><name>Open Source</name>

<ul anchor="_aea7010d-f27e-9bf1-4b7b-0bcd0262eec0"><li>Example service: <eref target="https://exampleservice.domainconnect.org/"></eref><eref target="https://github.com/Domain-Connect/exampleservice"></eref></li>
<li>Client library (Python):<eref target="https://github.com/Domain-Connect/domainconnect_python"></eref></li>
</ul>
</section>

<section anchor="_ac99db0c-ceb2-2ab7-0b60-be025f08ea78" numbered="false" toc="exclude"><name>Proprietary implementations</name>

<ul anchor="_78aaade7-5f22-18e9-2499-6500d58e464b"><li><t anchor="_e00c1490-945f-2886-a138-e78a559d03d6">492 templates from over 250 providers, incl. O365, Google Workspace, Apple Cloud+, Weebly, Squarespace.</t>
<t anchor="_0bab23b1-5ba0-7f88-db52-b96dcb9775e5">Source: <eref target="https://stats.domainconnect.org/"></eref></t>
</li>
</ul>
</section>
</section>
</section>
    <section anchor="ack" numbered="false"><name>Acknowledgements</name>

<t anchor="_b0d348d1-044c-2ea0-ca20-4c4889a84b66">The authors wish to thank the following persons for their feedback and suggestions as well as for the previous work on the standard:</t>

<ul anchor="_9a70af11-acfc-26d9-386b-ea297426239c"><li>Roger Carney of GoDaddy Inc.</li>
<li>Chris Ambler of GoDaddy Inc.</li>
<li>Darrel Miller</li>
<li>Peter Thomassen</li>
<li>Paul Hoffmann</li>
<li>Arnt Gulbrandsen</li>
</ul>
</section>
    <section anchor="_d743492b-bae1-b944-307e-3f5063c2f045" numbered="false" removeInRFC="true" toc="include"><name>Change History</name>

<section anchor="_1e68d5f6-6215-dcc2-d20f-0531566ad0cf" numbered="false" toc="exclude"><name>Change from draft-ietf-dconn-domainconnect-00 to -01</name>

<ul anchor="_7b8954be-40c7-93ce-79d6-de4b72f72390"><li>Added comprehensive ABNF grammar to the Terminology section covering all protocol identifiers, domain name forms (including IDN), template fields, OAuth parameters, and signing artifacts; replaced informal prose constraints throughout parameter tables and field definitions with normative ABNF references.</li>
<li>Restructured <xref target="template-application" format="title"></xref>: added <xref target="group-filtering" format="title"></xref>, Essential Records, Steps to Apply a Template, and focused <xref target="conflict-detection" format="title"></xref>, <xref target="user_authorization_of_changes" format="title"></xref> subsections; moved UX and runtime-processing rules into their appropriate sections; moved <xref target="domain-connect-objects-and-templates" format="title"></xref> before <xref target="applying-domain-connect" format="title"></xref> in the document structure.</li>
<li>Restructured request signing into <xref target="signing-procedure" format="title"></xref>, <xref target="sig-verification" format="title"></xref>, and <xref target="pubkey-publication" format="title"></xref></li>
<li>Replaced Sync Apply Interaction with a normative Request/Response/Error structure; rewrote <xref target="verification-of-changes" format="title"></xref> as normative text.</li>
<li>Restructured <xref target="security-considerations" format="title"></xref>: moved phishing threat into new <xref target="sec-variable-phishing" format="title"></xref> subsection; editorial cleanup.</li>
<li>Defined extensibility model for <xref target="dns-provider-discovery" format="title"></xref> settings response and added IANA "Domain Connect Settings Properties" registry.</li>
<li>Removed non-normative sections (Public Template Repository, General Considerations, Extensions/Exclusions); replaced all occurrences of "browser" with "user agent".</li>
<li>Shortened <xref target="trust-model" format="title"></xref> section.</li>
</ul>
</section>

<section anchor="_172d7474-c1e2-b4fb-e1f1-1d7cd08a98d2" numbered="false" toc="exclude"><name>Change from draft-kowalik-domainconnect-02 to draft-ietf-dconn-domainconnect-00</name>

<ul anchor="_3756c88f-dedb-4892-6e2f-9d3e6c224a74"><li>DCONN WG adoption. No other changes.</li>
</ul>
</section>

<section anchor="_e614e2b9-bf5b-0627-837e-c74eae112eb4" numbered="false" toc="exclude"><name>Change from -01 to -02</name>

<ul anchor="_d688455d-7ca3-0b33-7b8e-0a50503ec778"><li>Draft refresh from expire.  No content changes.</li>
</ul>
</section>

<section anchor="_801f707b-efa1-1b5f-1d6b-9969114fd963" numbered="false" toc="exclude"><name>Change from -00 to -01</name>

<ul anchor="_f4c75d17-a799-eb16-4525-50adf149fa83"><li>Changed term Root Domain to Zone Apex to align with <xref target="RFC8499" section="" relative=""></xref>.</li>
<li>Removed example provider names from Service Providers and DNS Providers terminology</li>
<li>Added Use Cases</li>
<li>Added Trust Model</li>
<li>Added sequence diagrams for synchronous and asynchronous flows instead of UX mocks</li>
<li>Reviewed use of normative language</li>
<li>Cleaned up usage of terminology</li>
<li>Variable substitution description updated</li>
<li>All URLs are now normatively defined with URI templates</li>
</ul>
</section>

<section anchor="_a109baff-3979-5fbc-e2b0-89242467c3f0" numbered="false" toc="exclude"><name>Change from draft-kowalik-regext-domainconnect-00 to draft-kowalik-domainconnect-00</name>

<ul anchor="_0fd318e2-9fe0-ff18-f0ed-1355de709f86"><li>Added possibility to specify any DNS record type in a generic manner.</li>
<li>Added possibility to define variables for numeric fields.</li>
<li>Added IANA registration for _domainconnect record as per <xref target="RFC8552" section="" relative=""></xref></li>
</ul>
</section>

<section anchor="_d08356e1-df04-413c-a86c-a13175c97157" numbered="false" toc="exclude"><name>Change from draft-carney-regext-domainconnect-03 to draft-kowalik-regext-domainconnect-00</name>

<ul anchor="_2c4a0e8f-8f15-5f77-2df3-f16d58f961c0"><li>Version synchronized with 2.2 version rev. 66 of the public Domain Connect specification.</li>
</ul>
</section>

<section anchor="_4af76744-a252-d64c-f3cb-776b1ada2cbd" numbered="false" toc="exclude"><name>Change from -02 to -03</name>

<ul anchor="_15c1d6c8-9c87-c7db-7a5d-1410133fecb5"><li>Added width/height JSON values returned by DNS Provider Discovery.</li>
<li>Corrected text of GET method for getting the authorization token.</li>
<li>Added clarifying text to Group ID description parameter of the apply template POST method.  Quite a few minor edits and clarifications that were found during implementation, especially in the Implementation Considerations section.</li>
</ul>
</section>

<section anchor="_e9c67058-5c9a-8ae2-fc6b-6616e78d0bbb" numbered="false" toc="exclude"><name>Change from -01 to -02</name>

<ul anchor="_ecbfaf73-a015-cd61-9363-6cfab77bbaa8"><li>Added new GET method for Service Providers to determine if the DNS Provider supports a specific template.  Some other minor edits for clarification.</li>
</ul>
</section>

<section anchor="_4ea891cd-6845-5012-2c81-c4dde7178435" numbered="false" toc="exclude"><name>Change from draft-carney-regext-domainconnect-00 to -01</name>

<ul anchor="_d954d06b-4d1b-a792-c9da-354415348fc4"><li>Minor edits and clarifications found during implementation.</li>
</ul>
</section>
</section>
  </middle>
  <back>
    <references anchor="_e4e248ba-4a6d-1c48-5319-f2b34595b83e">
      <name>Normative References</name>
      <reference target="https://www.rfc-editor.org/info/rfc1035" anchor="RFC1035"><front> <title>Domain names - implementation and specification</title> <author fullname="P. Mockapetris" asciiFullname="P. Mockapetris"></author> <date month="November" year="1987"></date> <keyword>DOMAIN</keyword><keyword>DNS</keyword> <abstract>  <t anchor="_aa3804f6-cf5f-52d9-e4c5-bc354524dec1">This RFC is the revised specification of the protocol and format used in the implementation of the Domain Name System. It obsoletes RFC-883. This memo documents the details of the domain name client - server communication.</t></abstract> </front> <seriesInfo name="STD" value="13"></seriesInfo> <seriesInfo value="10.17487/RFC1035" name="DOI"></seriesInfo> <seriesInfo value="13" name="BCP"></seriesInfo> <seriesInfo value="1035" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc2782" anchor="RFC2782"><stream>IETF</stream> <front> <title>A DNS RR for specifying the location of services (DNS SRV)</title> <author fullname="A. Gulbrandsen" asciiFullname="A. Gulbrandsen"></author> <author fullname="P. Vixie" asciiFullname="P. Vixie"></author> <author fullname="L. Esibov" asciiFullname="L. Esibov"></author> <date month="February" year="2000"></date> <keyword>DNS-SRV</keyword><keyword>domain name system</keyword><keyword>service</keyword><keyword>RR</keyword><keyword>resource record</keyword> <abstract>  <t anchor="_a2cd0d08-6829-dc0f-c808-dfc9938246a5">This document describes a DNS RR which specifies the location of the server(s) for a specific protocol and domain. [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo value="10.17487/RFC2782" name="DOI"></seriesInfo> <seriesInfo value="2782" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc2119" anchor="RFC2119"><stream>IETF</stream> <front> <title>Key words for use in RFCs to Indicate Requirement Levels</title> <author fullname="S. Bradner" asciiFullname="S. Bradner"></author> <date month="March" year="1997"></date> <keyword>Standards</keyword><keyword>Track</keyword><keyword>Documents</keyword> <abstract>  <t anchor="_7d392336-2b12-2e4d-d816-74f0604db461">In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract> </front> <seriesInfo value="10.17487/RFC2119" name="DOI"></seriesInfo> <seriesInfo value="14" name="BCP"></seriesInfo> <seriesInfo value="2119" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc8174" anchor="RFC8174"><stream>IETF</stream> <front> <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title> <author fullname="B. Leiba" asciiFullname="B. Leiba"></author> <date month="May" year="2017"></date> <abstract>  <t anchor="_e4d5124c-0ac7-e492-e5aa-8e81479d28cf">RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t></abstract> </front> <seriesInfo value="10.17487/RFC8174" name="DOI"></seriesInfo> <seriesInfo value="14" name="BCP"></seriesInfo> <seriesInfo value="8174" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc7208" anchor="RFC7208"><stream>IETF</stream> <front> <title>Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1</title> <author fullname="S. Kitterman" asciiFullname="S. Kitterman"></author> <date month="April" year="2014"></date> <keyword>spoofing</keyword><keyword>spf</keyword><keyword>anti-forgery</keyword><keyword>authentication</keyword> <abstract>  <t anchor="_6b584840-ce19-bc55-a044-d64720aaf8cd">Email on the Internet can be forged in a number of ways. In particular, existing protocols place no restriction on what a sending host can use as the "MAIL FROM" of a message or the domain given on the SMTP HELO/EHLO commands. This document describes version 1 of the Sender Policy Framework (SPF) protocol, whereby ADministrative Management Domains (ADMDs) can explicitly authorize the hosts that are allowed to use their domain names, and a receiving host can check such authorization.</t>  <t anchor="_1b556be6-6bb5-a480-fcd6-9e6a6b841399">This document obsoletes RFC 4408.</t></abstract> </front> <seriesInfo value="10.17487/RFC7208" name="DOI"></seriesInfo> <seriesInfo value="7208" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc6749" anchor="RFC6749"><stream>IETF</stream> <front> <title>The OAuth 2.0 Authorization Framework</title> <author fullname="D. Hardt" asciiFullname="D. Hardt"></author> <date month="October" year="2012"></date> <keyword>Client</keyword><keyword>Resource Owner</keyword><keyword>Authorization Server</keyword><keyword>Resource Server</keyword><keyword>Token Endpoint</keyword><keyword>Authorization Endpoint</keyword><keyword>Authorization Request</keyword><keyword>Authorization Grant</keyword><keyword>Protected Resource</keyword><keyword>Access Token</keyword><keyword>Refresh Token</keyword><keyword>Authorization Code</keyword><keyword>Implicit Grant</keyword><keyword>Client Identifier</keyword><keyword>Access Token Scope</keyword><keyword>Delegation</keyword> <abstract>  <t anchor="_79295542-7e34-05f5-7a86-4e30b55eb4b7">The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849. [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo value="10.17487/RFC6749" name="DOI"></seriesInfo> <seriesInfo value="6749" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc3597" anchor="RFC3597"><stream>IETF</stream> <front> <title>Handling of Unknown DNS Resource Record (RR) Types</title> <author fullname="A. Gustafsson" asciiFullname="A. Gustafsson"></author> <date month="September" year="2003"></date> <keyword>DNS</keyword><keyword>domain name system</keyword><keyword>name server software</keyword><keyword>compression</keyword><keyword>transparency</keyword><keyword>RR</keyword><keyword>Resource Record</keyword> <abstract>  <t anchor="_da7e2cfe-12cd-cd90-f4c7-8ae6b09bb0f3">Extending the Domain Name System (DNS) with new Resource Record (RR) types currently requires changes to name server software. This document specifies the changes necessary to allow future DNS implementations to handle new RR types transparently. [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo value="10.17487/RFC3597" name="DOI"></seriesInfo> <seriesInfo value="3597" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc8259" anchor="RFC8259"><stream>IETF</stream> <front> <title>The JavaScript Object Notation (JSON) Data Interchange Format</title> <author fullname="T. Bray" asciiFullname="T. Bray"></author> <date month="December" year="2017"></date> <abstract>  <t anchor="_cb46de37-279a-b791-07a1-17fc3acf0d80">JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.</t>  <t anchor="_1bb12102-96f6-6de0-9be4-8830cd70211c">This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t></abstract> </front> <seriesInfo name="STD" value="90"></seriesInfo> <seriesInfo value="10.17487/RFC8259" name="DOI"></seriesInfo> <seriesInfo value="90" name="BCP"></seriesInfo> <seriesInfo value="8259" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc8552" anchor="RFC8552"><stream>IETF</stream> <front> <title>Scoped Interpretation of DNS Resource Records through "Underscored" Naming of Attribute Leaves</title> <author fullname="D. Crocker" asciiFullname="D. Crocker"></author> <date month="March" year="2019"></date> <keyword>DNS</keyword><keyword>Domain Name System</keyword> <abstract>  <t anchor="_2535f6fe-d162-0f48-a054-627450df83a9">Formally, any DNS Resource Record (RR) may occur under any domain name. However, some services use an operational convention for defining specific interpretations of an RRset by locating the records in a DNS branch under the parent domain to which the RRset actually applies. The top of this subordinate branch is defined by a naming convention that uses a reserved node name, which begins with the underscore character (e.g., "_name"). The underscored naming construct defines a semantic scope for DNS record types that are associated with the parent domain above the underscored branch. This specification explores the nature of this DNS usage and defines the "Underscored and Globally Scoped DNS Node Names" registry with IANA. The purpose of this registry is to avoid collisions resulting from the use of the same underscored name for different services.</t></abstract> </front> <seriesInfo value="10.17487/RFC8552" name="DOI"></seriesInfo> <seriesInfo value="222" name="BCP"></seriesInfo> <seriesInfo value="8552" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc3986" anchor="RFC3986"><stream>IETF</stream> <front> <title>Uniform Resource Identifier (URI): Generic Syntax</title> <author fullname="T. Berners-Lee" asciiFullname="T. Berners-Lee"></author> <author fullname="R. Fielding" asciiFullname="R. Fielding"></author> <author fullname="L. Masinter" asciiFullname="L. Masinter"></author> <date month="January" year="2005"></date> <keyword>Internet protocol</keyword><keyword>IP</keyword><keyword>uniform resource identifier</keyword><keyword>URI</keyword><keyword>www</keyword><keyword>world wide web</keyword> <abstract>  <t anchor="_d63dcf47-6d5f-087f-deea-6934041b93f2">A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource. This specification defines the generic URI syntax and a process for resolving URI references that might be in relative form, along with guidelines and security considerations for the use of URIs on the Internet. The URI syntax defines a grammar that is a superset of all valid URIs, allowing an implementation to parse the common components of a URI reference without knowing the scheme-specific requirements of every possible identifier. This specification does not define a generative grammar for URIs; that task is performed by the individual specifications of each URI scheme. [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo name="STD" value="66"></seriesInfo> <seriesInfo value="10.17487/RFC3986" name="DOI"></seriesInfo> <seriesInfo value="66" name="BCP"></seriesInfo> <seriesInfo value="3986" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc7518" anchor="RFC7518"><stream>IETF</stream> <front> <title>JSON Web Algorithms (JWA)</title> <author fullname="M. Jones" asciiFullname="M. Jones"></author> <date month="May" year="2015"></date> <abstract>  <t anchor="_d5c04fe3-3eb1-5784-5ce5-f3b5a948b3e3">This specification registers cryptographic algorithms and identifiers to be used with the JSON Web Signature (JWS), JSON Web Encryption (JWE), and JSON Web Key (JWK) specifications. It defines several IANA registries for these identifiers.</t></abstract> </front> <seriesInfo value="10.17487/RFC7518" name="DOI"></seriesInfo> <seriesInfo value="7518" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc6335" anchor="RFC6335"><stream>IETF</stream> <front> <title>Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number Registry</title> <author fullname="M. Cotton" asciiFullname="M. Cotton"></author> <author fullname="L. Eggert" asciiFullname="L. Eggert"></author> <author fullname="J. Touch" asciiFullname="J. Touch"></author> <author fullname="M. Westerlund" asciiFullname="M. Westerlund"></author> <author fullname="S. Cheshire" asciiFullname="S. Cheshire"></author> <date month="August" year="2011"></date> <keyword>IANA</keyword><keyword>transport</keyword><keyword>ports</keyword><keyword>port numbers</keyword><keyword>allocation</keyword><keyword>assignment</keyword><keyword>procedures</keyword> <abstract>  <t anchor="_5ef20a1c-a075-20b8-e89d-68c4f3016fb6">This document defines the procedures that the Internet Assigned Numbers Authority (IANA) uses when handling assignment and other requests related to the Service Name and Transport Protocol Port Number registry. It also discusses the rationale and principles behind these procedures and how they facilitate the long-term sustainability of the registry.</t>  <t anchor="_ce8d3d17-e5b5-c7ad-9cb7-bc17e0eb9385">This document updates IANA's procedures by obsoleting the previous UDP and TCP port assignment procedures defined in Sections 8 and 9.1 of the IANA Allocation Guidelines, and it updates the IANA service name and port assignment procedures for UDP-Lite, the Datagram Congestion Control Protocol (DCCP), and the Stream Control Transmission Protocol (SCTP). It also updates the DNS SRV specification to clarify what a service name is and how it is registered. This memo documents an Internet Best Current Practice.</t></abstract> </front> <seriesInfo value="10.17487/RFC6335" name="DOI"></seriesInfo> <seriesInfo value="165" name="BCP"></seriesInfo> <seriesInfo value="6335" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc6570" anchor="RFC6570"><stream>IETF</stream> <front> <title>URI Template</title> <author fullname="J. Gregorio" asciiFullname="J. Gregorio"></author> <author fullname="R. Fielding" asciiFullname="R. Fielding"></author> <author fullname="M. Hadley" asciiFullname="M. Hadley"></author> <author fullname="M. Nottingham" asciiFullname="M. Nottingham"></author> <author fullname="D. Orchard" asciiFullname="D. Orchard"></author> <date month="March" year="2012"></date> <keyword>template</keyword><keyword>Uniform Resource Identifier</keyword><keyword>URI</keyword><keyword>URI Template</keyword><keyword>Internationalized Resource Identifier</keyword><keyword>IRI</keyword><keyword>IRI Template</keyword> <abstract>  <t anchor="_f93f69a5-d4e4-e99a-a673-5fe9342cb4e7">A URI Template is a compact sequence of characters for describing a range of Uniform Resource Identifiers through variable expansion. This specification defines the URI Template syntax and the process for expanding a URI Template into a URI reference, along with guidelines for the use of URI Templates on the Internet. [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo value="10.17487/RFC6570" name="DOI"></seriesInfo> <seriesInfo value="6570" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc5234" anchor="RFC5234"><stream>IETF</stream> <front> <title>Augmented BNF for Syntax Specifications: ABNF</title> <author fullname="P. Overell" asciiFullname="P. Overell"></author> <author fullname="D. Crocker" asciiFullname="D. Crocker"></author> <date month="January" year="2008"></date> <keyword>ABNF</keyword><keyword>backus-naur form</keyword><keyword>augmented backus-naur form</keyword><keyword>rule definitions</keyword><keyword>encoding</keyword><keyword>core lexical analyzer</keyword> <abstract>  <t anchor="_3ab3ceab-5e0b-b553-eaf7-c3d14656dae4">Internet technical specifications often need to define a formal syntax. Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications. The current specification documents ABNF. It balances compactness and simplicity with reasonable representational power. The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges. This specification also supplies additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications. [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo name="STD" value="68"></seriesInfo> <seriesInfo value="10.17487/RFC5234" name="DOI"></seriesInfo> <seriesInfo value="68" name="BCP"></seriesInfo> <seriesInfo value="5234" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc4648" anchor="RFC4648"><stream>IETF</stream> <front> <title>The Base16, Base32, and Base64 Data Encodings</title> <author fullname="S. Josefsson" asciiFullname="S. Josefsson"></author> <date month="October" year="2006"></date> <keyword>schemes</keyword><keyword>data</keyword><keyword>line-feeds</keyword><keyword>alphabets</keyword><keyword>base encoding</keyword><keyword>hex</keyword> <abstract>  <t anchor="_5d314fbe-be93-ff4f-1e4b-9063002ab795">This document describes the commonly used base 64, base 32, and base 16 encoding schemes. It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo value="10.17487/RFC4648" name="DOI"></seriesInfo> <seriesInfo value="4648" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc5891" anchor="RFC5891"><stream>IETF</stream> <front> <title>Internationalized Domain Names in Applications (IDNA): Protocol</title> <author fullname="J. Klensin" asciiFullname="J. Klensin"></author> <date month="August" year="2010"></date> <keyword>IDNA2008</keyword><keyword>idn</keyword><keyword>ascii</keyword><keyword>characters</keyword><keyword>idna applications</keyword> <abstract>  <t anchor="_54464522-1535-c477-9998-25f8e9688283">This document is the revised protocol definition for Internationalized Domain Names (IDNs). The rationale for changes, the relationship to the older specification, and important terminology are provided in other documents. This document specifies the protocol mechanism, called Internationalized Domain Names in Applications (IDNA), for registering and looking up IDNs in a way that does not require changes to the DNS itself. IDNA is only meant for processing domain names, not free text. [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo value="10.17487/RFC5891" name="DOI"></seriesInfo> <seriesInfo value="5891" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc5890" anchor="RFC5890"><stream>IETF</stream> <front> <title>Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework</title> <author fullname="J. Klensin" asciiFullname="J. Klensin"></author> <date month="August" year="2010"></date> <keyword>IDNA2008</keyword><keyword>idn</keyword><keyword>ascii</keyword><keyword>characters</keyword> <abstract>  <t anchor="_6517a0ad-fde3-e633-48b7-40463f70c181">This document is one of a collection that, together, describe the protocol and usage context for a revision of Internationalized Domain Names for Applications (IDNA), superseding the earlier version. It describes the document collection and provides definitions and other material that are common to the set. [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo value="10.17487/RFC5890" name="DOI"></seriesInfo> <seriesInfo value="5890" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc9839" anchor="RFC9839"><stream>IETF</stream> <front> <title>Unicode Character Repertoire Subsets</title> <author fullname="T. Bray" asciiFullname="T. Bray"></author> <author fullname="P. Hoffman" asciiFullname="P. Hoffman"></author> <date month="August" year="2025"></date> <keyword>Unicode</keyword><keyword>UTF-8</keyword><keyword>Surrogates</keyword><keyword>Noncharacters</keyword><keyword>Control characters</keyword> <abstract>  <t anchor="_2bd4f454-649c-25fe-40af-1b2028b0014c">This document discusses subsets of the Unicode character repertoire for use in protocols and data formats and specifies three subsets recommended for use in IETF specifications.</t></abstract> </front> <seriesInfo value="10.17487/RFC9839" name="DOI"></seriesInfo> <seriesInfo value="9839" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc8126" anchor="RFC8126"><stream>IETF</stream> <front> <title>Guidelines for Writing an IANA Considerations Section in RFCs</title> <author fullname="M. Cotton" asciiFullname="M. Cotton"></author> <author fullname="B. Leiba" asciiFullname="B. Leiba"></author> <author fullname="T. Narten" asciiFullname="T. Narten"></author> <date month="June" year="2017"></date> <keyword>internet assigned numbers authority</keyword><keyword>values</keyword><keyword>implementations</keyword><keyword>code point</keyword><keyword>protocol constant</keyword><keyword>protocol parameter</keyword><keyword>codepoint</keyword> <abstract>  <t anchor="_cce894af-17c9-7800-9750-0546ebc84945">Many protocols make use of points of extensibility that use constants to identify various protocol parameters. To ensure that the values in these fields do not have conflicting uses and to promote interoperability, their allocations are often coordinated by a central record keeper. For IETF protocols, that role is filled by the Internet Assigned Numbers Authority (IANA).</t>  <t anchor="_6db43c70-4037-9b98-a6b8-df7be88c454f">To make assignments in a given registry prudently, guidance describing the conditions under which new values should be assigned, as well as when and how modifications to existing values can be made, is needed. This document defines a framework for the documentation of these guidelines by specification authors, in order to assure that the provided guidance for the IANA Considerations is clear and addresses the various issues that are likely in the operation of a registry.</t>  <t anchor="_42f37886-5e8a-c421-5455-3acb6eea3cf9">This is the third edition of this document; it obsoletes RFC 5226.</t></abstract> </front> <seriesInfo value="10.17487/RFC8126" name="DOI"></seriesInfo> <seriesInfo value="26" name="BCP"></seriesInfo> <seriesInfo value="8126" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc9499" anchor="RFC9499"><stream>IETF</stream> <front> <title>DNS Terminology</title> <author fullname="P. Hoffman" asciiFullname="P. Hoffman"></author> <author fullname="K. Fujiwara" asciiFullname="K. Fujiwara"></author> <date month="March" year="2024"></date> <keyword>vocabulary</keyword><keyword>domain name system</keyword> <abstract>  <t anchor="_4da0a787-786a-cbfb-4175-b91d8064d580">The Domain Name System (DNS) is defined in literally dozens of different RFCs. The terminology used by implementers and developers of DNS protocols, and by operators of DNS systems, has changed in the decades since the DNS was first defined. This document gives current definitions for many of the terms used in the DNS in a single document.</t>  <t anchor="_15176a8c-0e77-741d-3011-894ebf91ad28">This document updates RFC 2308 by clarifying the definitions of "forwarder" and "QNAME". It obsoletes RFC 8499 by adding multiple terms and clarifications. Comprehensive lists of changed and new definitions can be found in Appendices A and B.</t></abstract> </front> <seriesInfo value="10.17487/RFC9499" name="DOI"></seriesInfo> <seriesInfo value="219" name="BCP"></seriesInfo> <seriesInfo value="9499" name="RFC"></seriesInfo></reference>
    </references>
    <references anchor="_85932e6a-e2d2-95f8-97e0-e0a96e845668">
      <name>Informative References</name>
      <reference target="https://www.rfc-editor.org/info/rfc9364" anchor="RFC9364"><stream>IETF</stream> <front> <title>DNS Security Extensions (DNSSEC)</title> <author fullname="P. Hoffman" asciiFullname="P. Hoffman"></author> <date month="February" year="2023"></date> <keyword>DNSSEC</keyword><keyword>DNS Security Extensions</keyword><keyword>DNS</keyword> <abstract>  <t anchor="_83b7fddf-54b1-b02f-16e6-0b24262cb108">This document describes the DNS Security Extensions (commonly called "DNSSEC") that are specified in RFCs 4033, 4034, and 4035, as well as a handful of others. One purpose is to introduce all of the RFCs in one place so that the reader can understand the many aspects of DNSSEC. This document does not update any of those RFCs. A second purpose is to state that using DNSSEC for origin authentication of DNS data is the best current practice. A third purpose is to provide a single reference for other documents that want to refer to DNSSEC.</t></abstract> </front> <seriesInfo value="10.17487/RFC9364" name="DOI"></seriesInfo> <seriesInfo value="237" name="BCP"></seriesInfo> <seriesInfo value="9364" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc8499" anchor="RFC8499"><stream>IETF</stream> <front> <title>DNS Terminology</title> <author fullname="P. Hoffman" asciiFullname="P. Hoffman"></author> <author fullname="A. Sullivan" asciiFullname="A. Sullivan"></author> <author fullname="K. Fujiwara" asciiFullname="K. Fujiwara"></author> <date month="January" year="2019"></date> <keyword>vocabulary</keyword><keyword>domain name system</keyword> <abstract>  <t anchor="_1f5d3ff8-eb51-5b33-aa17-a4d14c99fe43">The Domain Name System (DNS) is defined in literally dozens of different RFCs. The terminology used by implementers and developers of DNS protocols, and by operators of DNS systems, has sometimes changed in the decades since the DNS was first defined. This document gives current definitions for many of the terms used in the DNS in a single document.</t>  <t anchor="_955272cc-ccf5-7988-87c6-66a9c1b50330">This document obsoletes RFC 7719 and updates RFC 2308.</t></abstract> </front> <seriesInfo value="10.17487/RFC8499" name="DOI"></seriesInfo> <seriesInfo value="8499" name="RFC"></seriesInfo></reference>
      <reference target="https://www.rfc-editor.org/info/rfc7591" anchor="RFC7591"><stream>IETF</stream> <front> <title>OAuth 2.0 Dynamic Client Registration Protocol</title> <author fullname="M. Jones" asciiFullname="M. Jones"></author> <author fullname="J. Bradley" asciiFullname="J. Bradley"></author> <author fullname="M. Machulak" asciiFullname="M. Machulak"></author> <author fullname="P. Hunt" asciiFullname="P. Hunt"></author> <author fullname="J. Richer" asciiFullname="J. Richer"></author> <date month="July" year="2015"></date> <keyword>OpenID Connect Dynamic Client Registration</keyword><keyword>OpenID Connect</keyword><keyword>oidc</keyword><keyword>openid</keyword><keyword>user managed access</keyword><keyword>uma</keyword><keyword>Dynamic Registration</keyword><keyword>Dynamic Client Registration</keyword> <abstract>  <t anchor="_8860866d-13c4-68f0-b90a-dae250048305">This specification defines mechanisms for dynamically registering OAuth 2.0 clients with authorization servers. Registration requests send a set of desired client metadata values to the authorization server. The resulting registration responses return a client identifier to use at the authorization server and the client metadata values registered for the client. The client can then use this registration information to communicate with the authorization server using the OAuth 2.0 protocol. This specification also defines a set of common client metadata fields and values for clients to use during registration.</t></abstract> </front> <seriesInfo value="10.17487/RFC7591" name="DOI"></seriesInfo> <seriesInfo value="7591" name="RFC"></seriesInfo></reference>
    </references>
    <section anchor="examples"><name>Examples</name>

<section anchor="_9b99b5ca-98e0-0036-4d41-6185b137100f"><name>Example Template</name>

<t anchor="_56685b16-8e87-afcc-18f9-5ee531820c7f" keepWithNext="true">EXAMPLE: Full template example</t><sourcecode anchor="_e3e82e73-6145-d4d5-2f46-90faf27199ee" type="json"><![CDATA[{
    "providerId": "example.com",
    "providerName": "Example Web Hosting",
    "serviceId": "hosting",
    "serviceName": "Wordpress by example.com",
    "version": 1,
    "logoUrl": "https://www.example.com/images/billthecat.jpg",
    "description": "This connects your domain to our web hosting",
    "records": [
        {
            "type": "A",
            "groupId": "service",
            "host": "www",
            "pointsTo": "%var1%",
            "ttl": 600
        },
        {
            "type": "A",
            "groupId": "service",
            "host": "m",
            "pointsTo": "%var2%",
            "ttl": 600
        },
        {
            "type": "CNAME",
            "groupId": "service",
            "host": "webmail",
            "pointsTo": "%var3%",
            "ttl": 600
        },
        {
            "type": "TXT",
            "groupId": "verification",
            "host": "example",
            "ttl": 600,
            "data": "%var4%"
        }
    ]
}]]></sourcecode>
</section>

<section anchor="_1a4d504c-657d-3f6d-df94-83c947f560c7"><name>Example Records: Single static host record</name>

<t anchor="_8a1cd115-8ed5-69aa-4cd1-395b528b20d7">Consider a template for setting a single host record. The records section of the template would have a single record of type "A" and could have a value of:</t>

<t anchor="_b8379708-662c-8471-d31d-171282d12f64" keepWithNext="true">EXAMPLE: Single static host record example</t><sourcecode anchor="_094723d4-f263-05f7-c394-bc114c9a346b" type="json"><![CDATA[[{
    "type": "A",
    "host": "www",
    "pointsTo": "192.0.2.1",
    "ttl": 600
}]]]></sourcecode>

<t anchor="_fb82714c-f097-6841-ea23-0e36e5fbc65d">This would have no variable substitution and the application of this template to a domain would simply set the host name "www" to the IP address "192.0.2.1"</t>
</section>

<section anchor="_15249411-71ad-3aad-95d4-3d4175c31d85"><name>Example Records: Single variable host record for A</name>

<t anchor="_129d4971-39c4-eb7d-d316-3aa4fa8b4ac2">In the case of a template for setting a single host record from a variable, the template would have a single record of type "A" and could have a value of:</t>

<t anchor="_cd81a2e9-bcaf-3257-b78d-ff90f4072125" keepWithNext="true">EXAMPLE: Single variable host record for A example</t><sourcecode anchor="_298731f5-9f9c-4f96-3e2f-50c6f3cf0855" type="json"><![CDATA[[{
    "type": "A",
    "host": "@",
    "pointsTo": "198.51.100.%srv%",
    "ttl": 600
}]]]></sourcecode>

<t anchor="_a6e777f6-47cb-b34d-aaa0-f149bc8e9ba3">A query string with a key/value pair of</t>

<sourcecode anchor="_15c1650e-f5da-9b94-3131-e331d5deffa5"><![CDATA[srv=2]]></sourcecode>


<t anchor="_aa9c3f63-3a57-4d08-0cdf-37d12f07b06c">would cause the application of this template to a domain to set the host name for the apex A record to the IP address "198.51.100.2" with a TTL of 600</t>
</section>

<section anchor="_2058f3d5-562e-7847-a0c4-8d6cad2d43f8"><name>Example Records: Unspecified record type CAA</name>

<t anchor="_c9782a55-c8ef-a117-6f64-1fbb3c9104ab">This example shows how to include a set of unspecified record types on an example of CAA records:</t>

<t anchor="_d4310efd-f480-3035-e32e-b52a0ddf5889" keepWithNext="true">EXAMPLE: Unspecified record type CAA example</t><sourcecode anchor="_ebe67f4d-bd73-a4f6-9ee6-38e79930dd4b" type="json"><![CDATA[[
    {
        "type": "CAA",
        "host": "@",
        "data": "0 issue \"ca1.example.net\"",
        "ttl": 1800
    },
    {
        "type": "CAA",
        "host": "@",
        "data": "0 issuewild \"ca2.example.\"",
        "ttl": 1800
    }
]]]></sourcecode>

<t anchor="_4a7bb606-9a11-7985-ceaf-688bf3e4236c">This would have no variable substitution and the application of this template to a domain would add 2 CAA records.</t>
</section>

<section anchor="_bd5ff377-6bd9-cc98-b9b3-013aed202a1b"><name>Example: Template application to DNS Zone and Conflict Resolution</name>

<t anchor="_4559b1e8-3fdb-177e-febc-050f2fc06d35">Consider a DNS Zone before a template application:</t>

<sourcecode anchor="_073dbaab-e649-b1e3-54fb-a6a6f336f025"><![CDATA[$ORIGIN example.com.

@ 3600 IN SOA ns11.example.net. support.example.net. 2017050817 7200
1800 1209600 3600
@ 3600 IN NS ns11.example.net.
@ 3600 IN NS ns12.example.net.
@ 3600 IN A 192.0.2.1
@ 3600 IN A 192.0.2.2
@ 3600 IN AAAA 2001:db8:1234:0000:0000:0000:0000:0000
@ 3600 IN AAAA 2001:db8:1234:0000:0000:0000:0000:0001
@ 3600 IN MX 10 mx1.example.net.
@ 3600 IN MX 10 mx2.example.net.
@ 3600 IN TXT "v=spf1 a include:spf.example.org ~all"
www 3600 IN CNAME other.host.example.]]></sourcecode>


<t anchor="_36edeecd-7d04-d3d8-e995-a6b9aeeaeb54">Now application of the following template:</t>

<sourcecode anchor="_c951e767-823d-6a12-8d9e-a8f30cda6c9c" type="json"><![CDATA[[
    {
        "type":"A",
        "host":"@",
        "pointsTo":"203.0.113.2",
        "ttl":"1800"
    },
    {
        "type":"A",
        "host":"www",
        "pointsTo":"203.0.113.2",
        "ttl":"1800"
    },
    {
        "type":"SPFM",
        "host":"@",
        "spfRules":"a include:spf.hoster.example"
    }
]]]></sourcecode>


<t anchor="_e62c7f88-17e7-2154-dcab-2f70f14fd5d9">The following DNS Zone would be generated after the template is applied.</t>

<t anchor="_4cb48b71-0947-c5b9-5dbc-7a63b54bc181">A following list of conflicts would be detected in this case:</t>

<sourcecode anchor="_c8bf750c-5e56-4ae3-f6e3-5a52f1e867ba"><![CDATA[@ 3600 IN A 192.0.2.1
@ 3600 IN A 192.0.2.2
@ 3600 IN AAAA 2001:db8:1234:0000:0000:0000:0000:0000
@ 3600 IN AAAA 2001:db8:1234:0000:0000:0000:0000:0001]]></sourcecode>


<t anchor="_1ab3a476-41b1-c633-c895-57f49d9f731d">After changes applied the zone would be updated to the following state. Note existing A and AAAA records removed due to the conflicts as well as SPF TXT record content merged with the existing entry.</t>

<sourcecode anchor="_ac78bac7-93c2-8f4a-6ef8-dd5866ed68fa"><![CDATA[$ORIGIN example.com.

@ 3600 IN SOA ns11.example.net. support.example.net. 2017050920 7200
1800 1209600 3600
@ 3600 IN NS ns11.example.net.
@ 3600 IN NS ns12.example.net.
@ 1800 IN A 203.0.113.2
@ 3600 IN MX 10 mx1.example.net.
@ 3600 IN MX 10 mx2.example.net.
@ 1800 IN TXT "v=spf1 a include:spf.example.org include:spf.hoster.ex
ample ~all"
www 1800 IN A 203.0.113.2]]></sourcecode>

</section>

<section anchor="example-spf-merge"><name>Example: SPF Record Merging</name>

<t anchor="_4d228712-461e-93ef-a48d-c8168d1630f9">Consider a DNS Zone before a template application:</t>

<sourcecode anchor="_88a6396b-b4a1-7ab3-7647-009eb7167201"><![CDATA[$ORIGIN example.com.

@ 3600 IN SOA ns11.example.net. support.example.net. 2017050817 7200
1800 1209600 3600
@ 3600 IN NS ns11.example.net.
@ 3600 IN NS ns12.example.net.]]></sourcecode>


<t anchor="_f4b921be-1689-7721-a9be-f5e5bc51a503">Now application of the following template of Mail service:</t>

<sourcecode anchor="_4b0a7f2d-4219-921d-c9bb-c703ca436a8e" type="json"><![CDATA[[
    {
        "type":"MX",
        "host":"@",
        "priority": "10",
        "pointsTo":"mx1.example.net",
        "ttl":"1800"
    },
    {
        "type":"MX",
        "host":"www",
        "priority": "10",
        "pointsTo":"mx2.example.net",
        "ttl":"1800"
    },
    {
        "type":"SPFM",
        "host":"@",
        "spfRules":"a include:spf.example.net"
    }
]]]></sourcecode>


<t anchor="_2164ceea-eb15-1387-c549-bd0c0ef87339">Expected result in the DNS Zone</t>

<sourcecode anchor="_106d1e96-97c5-0a0f-1139-cb14c907af1e"><![CDATA[$ORIGIN example.com.

@ 3600 IN SOA ns11.example.net. support.example.net. 2017050817 7200
1800 1209600 3600
@ 3600 IN NS ns11.example.net.
@ 3600 IN NS ns12.example.net.
@ 3600 IN MX 10 mx1.example.net.
@ 3600 IN MX 10 mx2.example.net.
@ 3600 IN TXT "v=spf1 a include:spf.example.net ~all"]]></sourcecode>


<t anchor="_0662cc37-7e3b-9261-8066-5004809fb669">In the next step application of the following template of Newsletter service:</t>

<sourcecode anchor="_00715d3a-7849-a6d8-21ee-c57272977611" type="json"><![CDATA[[
    {
        "type":"SPFM",
        "host":"@",
        "spfRules":"include:_spf.newsletter.example"
    }
]]]></sourcecode>


<t anchor="_b9aebc03-bcc4-bfe8-ade7-1c642f8b805e">Expected result in the DNS Zone. Note merged SPF entry.</t>

<sourcecode anchor="_8c24e7c4-01c0-889e-b6b7-fc7227cab625"><![CDATA[$ORIGIN example.com.

@ 3600 IN SOA ns11.example.net. support.example.net. 2017050817 7200
1800 1209600 3600
@ 3600 IN NS ns11.example.net.
@ 3600 IN NS ns12.example.net.
@ 3600 IN MX 10 mx1.example.net.
@ 3600 IN MX 10 mx2.example.net.
@ 3600 IN TXT "v=spf1 a include:spf.example.net include:_spf.newslett
er.
example ~all"]]></sourcecode>

</section>
</section>
  </back>
</rfc>
