Add the domain to DigitalOcean DNS
The Domain Name System is how you associate your (sub-)domains with an actual IP address on the Internet.
All examples in this book use DigitalOcean as the DNS provider. You may choose any DNS service that provides a programmatic API supported by go-acme LEGO.
Sign up for a DigitalOcean account (using this referral link helps support this site), and follow along to set up your domain’s DNS.
Add your domain name
- Login to the DigitalOcean console.
- Click on
Networking
in the left hand menu. - Select the
Domains
tab. - Enter your domain name, and click
Add Domain
.
Wait a few minutes for the setting to take effect, then you can verify the domain name is added:
dig -t ns example.com
(if you don’t have dig
installed, you can also use the web version
provided by google, enter the domain name, and select NS
.)
;; ANSWER SECTION: example.com. 2400 IN NS ns1.digitalocean.com. example.com. 2400 IN NS ns3.digitalocean.com. example.com. 2400 IN NS ns2.digitalocean.com.
The number in the second column is the TTL (Time To Live) which is the number of seconds that the record is cached in the queried DNS server. If you jump the gun and check this too quickly before the changes takes effect, you may need to wait for this TTL to reset.