Understanding Domain Name System (DNS)
Background
Section titled “Background”The official description of the Domain Name System (DNS) is: a hierarchical and decentralized naming system for computers, services, or other resources connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. (Thanks, Wikipedia!)
You can think of DNS like the contact list on your smartphone. Just as you don’t need to memorize your friends’ phone numbers because you have them saved under names you can easily remember, DNS saves you the hassle of memorizing IP addresses. It maps human-readable domain names, like www.google.com, to their machine-readable IP addresses, like 8.8.8.8.
DNS is designed to be decentralized. This decentralization is crucial because it adds layers of redundancy and resilience against system failure. If one DNS server goes down, the system can quickly reroute queries to another available server, ensuring the smooth operation of the Internet.
Wait, What is a Domain Name?
Section titled “Wait, What is a Domain Name?”A domain name is a human-friendly address that you type into your web browser. A domain name is usually made up of three components: subdomain.domain.TLD. For example, in www.google.com, www is the subdomain, google is the domain, and com is the Top-Level Domain (TLD).
What About Sub-Domains?
Section titled “What About Sub-Domains?”Sub-domains serve more functions than just “nesting.” Different sub-domains can be mapped to different IP addresses. This versatility is beneficial for load balancing, regional distribution, and more. For example, us.amazon.com and uk.amazon.com could route traffic to servers in the United States and the United Kingdom, respectively.
We use sub-domains a lot in our work. We often use a staging subdomain on a client site to test changes before they are shipped to production. We also use them to nest certain sections of a website for structural or categorical reasons, such as blog.planetargon.com, or portland.craigslist.org.
How Does DNS Work?
Section titled “How Does DNS Work?”When you type a domain name into your browser, several servers work together to resolve it to an IP address. Initially, a DNS query is sent to a recursive resolver. If needed, this query gets forwarded to authoritative servers, which ultimately provide the final IP address. Various query types exist, such as A, AAAA, CNAME, and MX, serving different purposes from basic IP address retrieval to mail exchange routes.
There’s a lot more that goes into DNS than this summary can cover. For a more thorough explanation, checkout any of these great resources:
- How DNS Works - WEB COMIC by dnsimple
- How DNS Works - VIDEO by Computerphile
- What is DNS? - ARTICLE by Cloudflare
Debugging DNS
Section titled “Debugging DNS”Here are a few tips for debugging DNS-related issues:
-
Use the
digcommand to lookup DNS info for a host nameFor Linux and macOS users, the
digcommand can be quite handy. Windows users can usenslookupfor similar functionality. When you run adigcommand, you may receive output liked1oog6b7224omr.cloudfront.netfollowed by IP addresses. This indicates the domain and its corresponding resolved IP.Remember that DNS queries can sometimes be cached. If you’re facing issues, ensure that you clear your DNS cache, as this can significantly impact debugging.
-
Use a WHOIS lookup tool in your terminal to find out who owns a domain
➜ ~ whois planetargon.com% IANA WHOIS server% for more information on IANA, visit http://www.iana.org% This query returned 1 object
refer: whois.verisign-grs.com
domain: COM
organisation: VeriSign Global Registry Servicesaddress: 12061 Bluemont Wayaddress: Reston VA 20190address: United States of America (the)
contact: administrativename: Registry Customer Serviceorganisation: VeriSign Global Registry Servicesaddress: 12061 Bluemont Wayaddress: Reston VA 20190address: United States of America (the)phone: +1 703 925-6999fax-no: +1 703 948 3978e-mail: info@verisign-grs.com
contact: technicalname: Registry Customer Serviceorganisation: VeriSign Global Registry Servicesaddress: 12061 Bluemont Wayaddress: Reston VA 20190address: United States of America (the)phone: +1 703 925-6999fax-no: +1 703 948 3978e-mail: info@verisign-grs.com
nserver: A.GTLD-SERVERS.NET 192.5.6.30 2001:503:a83e:0:0:0:2:30nserver: B.GTLD-SERVERS.NET 192.33.14.30 2001:503:231d:0:0:0:2:30nserver: C.GTLD-SERVERS.NET 192.26.92.30 2001:503:83eb:0:0:0:0:30nserver: D.GTLD-SERVERS.NET 192.31.80.30 2001:500:856e:0:0:0:0:30nserver: E.GTLD-SERVERS.NET 192.12.94.30 2001:502:1ca1:0:0:0:0:30nserver: F.GTLD-SERVERS.NET 192.35.51.30 2001:503:d414:0:0:0:0:30nserver: G.GTLD-SERVERS.NET 192.42.93.30 2001:503:eea3:0:0:0:0:30nserver: H.GTLD-SERVERS.NET 192.54.112.30 2001:502:8cc:0:0:0:0:30nserver: I.GTLD-SERVERS.NET 192.43.172.30 2001:503:39c1:0:0:0:0:30nserver: J.GTLD-SERVERS.NET 192.48.79.30 2001:502:7094:0:0:0:0:30nserver: K.GTLD-SERVERS.NET 192.52.178.30 2001:503:d2d:0:0:0:0:30nserver: L.GTLD-SERVERS.NET 192.41.162.30 2001:500:d937:0:0:0:0:30nserver: M.GTLD-SERVERS.NET 192.55.83.30 2001:501:b1f9:0:0:0:0:30ds-rdata: 30909 8 2 e2d3c916f6deeac73294e8268fb5885044a833fc5459588f4a9184cfc41a5766
whois: whois.verisign-grs.com
status: ACTIVEremarks: Registration information: http://www.verisigninc.com
created: 1985-01-01changed: 2023-09-12source: IANA
# whois.verisign-grs.com
Domain Name: PLANETARGON.COM Registry Domain ID: 89598895_DOMAIN_COM-VRSN Registrar WHOIS Server: whois.1api.net Registrar URL: http://www.1api.net Updated Date: 2023-11-08T12:11:32Z Creation Date: 2002-08-23T05:35:49Z Registry Expiry Date: 2024-08-23T05:35:52Z Registrar: 1API GmbH Registrar IANA ID: 1387 Registrar Abuse Contact Email: abuse@1api.net Registrar Abuse Contact Phone: +49.68949396850 Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited Name Server: NS1.DNSIMPLE.COM Name Server: NS2.DNSIMPLE-EDGE.NET Name Server: NS3.DNSIMPLE.COM Name Server: NS4.DNSIMPLE-EDGE.ORG DNSSEC: unsigned URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/>>> Last update of whois database: 2023-11-21T00:13:28Z <<<
# whois.1api.net
Domain Name: PLANETARGON.COMRegistry Domain ID: 89598895_DOMAIN_COM-VRSNRegistrar WHOIS Server: whois.1api.netRegistrar URL: http://www.1api.netUpdated Date: 2023-11-08T12:11:32ZCreation Date: 2002-08-23T05:35:49ZRegistrar Registration Expiration Date: 2024-08-23T05:35:52ZRegistrar: 1API GmbHRegistrar IANA ID: 1387Registrar Abuse Contact Email: abuse@1api.netRegistrar Abuse Contact Phone: +49.68949396x850Domain Status: clientTransferProhibited - http://www.icann.org/epp#clientTransferProhibitedRegistry Registrant ID:Registrant Name: REDACTED FOR PRIVACYRegistrant Organization: REDACTED FOR PRIVACYRegistrant Street: REDACTED FOR PRIVACYRegistrant City: REDACTED FOR PRIVACYRegistrant State/Province: OregonRegistrant Postal Code: REDACTED FOR PRIVACYRegistrant Country: USRegistrant Phone: REDACTED FOR PRIVACYRegistrant Phone Ext:Registrant Fax:Registrant Fax Ext:Registrant Email: contact via https://www.1api.net/send-message/planetargon.com/registrantRegistry Admin ID:Admin Name: REDACTED FOR PRIVACYAdmin Organization: REDACTED FOR PRIVACYAdmin Street: REDACTED FOR PRIVACYAdmin City: REDACTED FOR PRIVACYAdmin State/Province: REDACTED FOR PRIVACYAdmin Postal Code: REDACTED FOR PRIVACYAdmin Country: REDACTED FOR PRIVACYAdmin Phone: REDACTED FOR PRIVACYAdmin Phone Ext:Admin Fax:Admin Fax Ext:Admin Email: contact via https://www.1api.net/send-message/planetargon.com/adminRegistry Tech ID:Tech Name: REDACTED FOR PRIVACYTech Organization: REDACTED FOR PRIVACYTech Street: REDACTED FOR PRIVACYTech City: REDACTED FOR PRIVACYTech State/Province: REDACTED FOR PRIVACYTech Postal Code: REDACTED FOR PRIVACYTech Country: REDACTED FOR PRIVACYTech Phone: REDACTED FOR PRIVACYTech Phone Ext:Tech Fax:Tech Fax Ext:Tech Email: contact via https://www.1api.net/send-message/planetargon.com/techName Server: ns1.dnsimple.com 162.159.24.4 2400:cb00:2049:0001:0000:0000:a29f:1804Name Server: ns2.dnsimple-edge.net 199.247.153.53 2620:0111:8005:0000:0000:0000:0000:0053Name Server: ns3.dnsimple.com 162.159.26.4 2400:cb00:2049:0001:0000:0000:a29f:1a04Name Server: ns4.dnsimple-edge.orgDNSSEC: unsignedURL of the ICANN WHOIS Data Problem Reporting System:http://wdprs.internic.net/>>> Last update of WHOIS database: 2023-11-21T00:13:42Z <<<NOTE! When you perform a
whoissearch, the results can be overwhelming. What’s essential to focus on are theName Serverslisted, as they are crucial in understanding which servers are authoritative for the domain you’re interested in.