General DNS overview

This page provides an overview of the Domain Name System (DNS).

For an overview of Cloud DNS, see the Cloud DNS overview. For key terms related to Cloud DNS, see Key terms.

DNS is a hierarchical distributed database that stores IP addresses and other data and allows queries by name.

In other words, DNS is a directory of readable domain names that translate to numeric IP addresses used by computers to communicate with each other. For example, when you type a URL into a browser, DNS converts the URL into an IP address of a web server associated with that name. The DNS directories are stored and distributed around the world on domain name servers that are updated regularly.

The following concepts are useful when working with DNS.

DNS server types

A DNS server stores a database of domain names, and then processes domain names based on DNS queries that come from a client in a network.

Authoritative server

An authoritative server is a server that holds the DNS name records, including A, AAAA, and CNAME.

A non-authoritative server constructs a cache file based on previous queries for domains. It does not hold original name records.

Zones

Private zone

A private zone is any zone that cannot be queried over the public internet.

Delegated subzone

DNS allows the owner of a zone to use NS records to delegate a subdomain to a different name server. Resolvers follow these records and send queries for the subdomain to the target name server specified in the delegation.

For example, you can create separate zones for both example.com and subdomain.example.com, each with its own authoritative name server. Because subdomain.example.com is a child domain of example.com, the method to enable the authoritative name server for the subdomain to be located from the parent domain's zone is called delegation. Delegation is essentially a pointer to the authoritative name server for a subdomain. To enable delegation in Cloud DNS, you can add NS records for the subdomains in the zone of the parent domain.

Records

A record is a mapping between a DNS resource and a domain name. Each individual DNS record has a type (name and number), an expiration time (time to live), and type-specific data.

Some of the commonly used record types are:

  • A: Address record, which maps host names to their IPv4 address.
  • AAAA: IPv6 Address record, which maps host names to their IPv6 address.
  • CNAME: Canonical name record, which specifies alias names.
  • MX: Mail exchange record, which is used in routing requests to mail servers.
  • NS: Name server record, which delegates a DNS zone to an authoritative server.
  • PTR: Pointer record, which defines a name associated with an IP address.
  • SOA: Start of authority, used to designate the primary name server and administrator responsible for a zone. Each zone hosted on a DNS server must have an SOA (start of authority) record. You can modify the record as needed (for example, you can change the serial number to an arbitrary number to support date-based versioning).

Record sets

Records with the same name and of the same type but with different data values are called record sets. When you create a record, if a set with the same name and type exists, the record is added to this matching set. If there's no matching set, a new set is created and appended to the list of record sets.

This is an example of a record set with more than one record having the same name and type:

DNS name Type TTL (seconds) Data
db-01.dev.gcp.example.com A 50 10.128.1.35
db-01.dev.gcp.example.com A 50 10.128.1.10

For a list of supported record types in Cloud DNS, see Supported DNS record types.

SOA serial number

The SOA serial number is a version number for a DNS zone. For all name servers to be current with the version of a zone, they must have the same SOA serial number. The serial numbers of SOA records created in DNS managed zones monotonically increase with each transactional change to a zone's record sets.

However, you can change the serial number of an SOA record to an arbitrary number, including an ISO 8601-formatted date, as recommended in RFC 1912.

What's next