Getting to know the Domain Connect standard

2020-02-08
5.0 / 5 (5 votes)

Buying a domain name is just the start of a journey. To put your website online, you need to associate it with your domain. If you have bought a domain name from a registrar and host your website at another hosting provider, you may need to point the domain name to your server. In all cases, you will have to configure DNS settings. This may be a challenging task, especially for a beginner. To accomplish this task easily, you can use the Domain Connect.

What is Domain Connect?

Domain Connect is an open standard that makes it easier for users of services like Squarespace or O365 to configure DNS without having to understand the details. Domain Connect involves two parties. The first is the Service Provider whose user wants to configure DNS to enable the service, and the other is the DNS Provider.

Historically a Service Provider would first ask the user for a domain name. The Service Provider would then try to figure out the company providing DNS, typically by querying the top-level-domain (the TLD) for the nameservers for the domain. The TLD for godaddy.com is .com. Based on a hard-coded table, the Service Provider would then give instructions to the user telling them how to set up DNS. This might involve screenshots, videos, or simple instructions.

This is a complex operation for users and they often get lost or confused, resulting in a bad user experience. This often leads to higher support costs for both the Service and DNS Providers. And ironically the more help the Service Provider gives the user, the more likely things go off the rails if and when the DNS Provider updates their interface. Domain Connect solves this problem for the user. The protocol has two components.

The first is in the “discovery” stage of the protocol. Having a hard-coded table of nameservers to determine the DNS Provider is error-prone. So instead of doing a query to the TLD for the nameserver, the Service Provider can query the _domainconnect TXT record directly from DNS for the domain and determine the DNS Provider.

The second component makes the changes to DNS. For this, the Service Provider will have first onboarded a template of changes to enable their service with the DNS Provider. Now when the user types their domain name, the Service Provider links to the DNS Provider providing (amongst other data) the domain name, the template, and any other settings. The DNS Provider signs the user in, verifies the user owns the domain name, confirms the change with the user, and makes changes to DNS by applying the template.

How does the “discovery” stage look like in examples?

For instance, if you look up a TXT records of domain weathernyc.nyc, you will find a TXT record wich contain DNS Provider endpoint
dig _domainconnect.weathernyc.nyc TXT
#RESULT:
_domainconnect.weathernyc.nyc. 3600 IN TXT "domainconnect.api.godaddy.com"
After you get the URL of DNS Provider, let's try to get more information and settings it is the first endpoint which you should call.
curl --location --request GET 'https://domainconnect.api.godaddy.com/v2/weathernyc.nyc/settings'
#RESULT:
{
    "providerName": "GoDaddy",
    "urlControlPanel": "https://dcc.godaddy.com/manage/dns",
    "nameServers": [
        "ns63.domaincontrol.com",
        "ns64.domaincontrol.com"
    ],
    "urlSyncUX": "https://dcc.godaddy.com/manage",
    "providerId": "godaddy.com",
    "urlAsyncUX": "https://dcc.godaddy.com/manage",
    "providerDisplayName": "GoDaddy",
    "urlAPI": "https://domainconnect.api.godaddy.com"
}

After that, you can take urlSyncUX URL and send a request for applying your template

Bonus

I wrote the PHP library which can help you create the correct URL for applying any Domain Connect templates.

PHP Domain Connect Extension - https://github.com/gaalferov/ext-domain-connect

Read 1523 times Last modified on 2020-02-24

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.