Expressvpn Glossary

Primary DNS server

Primary DNS server

What is a primary DNS server?

A primary Domain Name System (DNS) server is the authoritative server that stores and manages the original, editable DNS records for a domain.

All changes to a domain’s DNS records are made on the primary DNS server. These records are then distributed to other servers or used directly to answer queries, ensuring accurate domain resolution.

How does a primary DNS server work?

A primary DNS server manages DNS record changes and distributes updates to other DNS servers. When a change is needed, such as updating an IP address or modifying email routing, it is applied directly on the primary server.

  1. Record update: The change is saved in the domain’s DNS zone on the primary server.
  2. Notification: The primary server signals that updated data is available.
  3. Synchronization: Secondary DNS servers check the zone’s start of authority (SOA) record for a changed serial number and retrieve changed records through zone transfer.
  4. Query resolution: DNS servers hosting the zone use the synchronized records to respond to user queries.Primary DNS server workflow with zone transfer and query resolution.

Primary DNS server vs. secondary DNS server

The difference between a primary and a secondary DNS server relates to how DNS data is stored and maintained:

  • Primary DNS server: Stores and manages the original, editable DNS records for a domain.
  • Secondary DNS server: Stores a read-only copy of those records and updates it through zone transfers from the primary server.

Why is a primary DNS server important?

A primary DNS server is central to maintaining accurate and consistent DNS records.

  • Single source of truth: It holds the authoritative version of a DNS zone, ensuring all records are created and updated in one place.
  • Consistency: Updates are replicated to secondary servers through DNS zone transfers, keeping DNS data aligned across the network.
  • Control: Provides a centralized point for managing domain configuration, including record updates and changes to service endpoints.
  • Reliability: Secondary servers synchronize from the primary, ensuring query resolution with consistent data.

Where is it used?

A primary DNS server manages how a domain connects to services and infrastructure. Common uses include:

  • Website routing (A/AAAA records): Points a domain to the correct server IP. After a hosting change, for example, the record is updated to direct traffic to the new server.
  • Email routing (MX records): Defines which mail servers handle incoming email. Switching email providers requires updating MX records so messages reach the correct inbox.
  • Infrastructure changes: Updates DNS records during server migrations or service changes.
  • Service configurations: Connects subdomains to specific services. For example, api.example.com can be pointed to a dedicated backend server.

Risks and privacy concerns

A primary DNS server introduces operational and security risks if not properly managed:

  • Misconfigurations can break resolution: Incorrect DNS zone entries can prevent domains from resolving, disrupting websites or email services.
  • Single point of administration: All record changes depend on the primary server. If access is lost, updates cannot be made until it is restored.
  • Unauthorized changes can redirect traffic: If the primary server is compromised, DNS records can be altered to send users to unintended or malicious destinations. DNS Security Extensions (DNSSEC) helps mitigate this by digitally signing DNS records, allowing resolvers to verify that responses haven’t been tampered with.
  • Unencrypted queries may expose activity: Standard DNS requests are transmitted without encryption, which can reveal the domains being accessed.
  • Weak access controls increase exposure: Insufficient authentication mechanisms can allow unauthorized changes to DNS records.

Further reading

FAQ

Is a primary DNS server the same as a preferred DNS server?

No. A primary Domain Name System (DNS) server is where a domain’s DNS records are stored and managed. A preferred DNS server is a device-level setting that determines which DNS server a client queries first when resolving a domain name. The two concepts are unrelated.

Can a primary DNS server affect privacy or security?

Yes. Misconfigured or tampered Domain Name System (DNS) records can redirect traffic to unintended destinations. Standard DNS queries are also typically unencrypted, which may expose the domains being accessed.

What happens if a primary DNS server goes down?

Secondary Domain Name System (DNS) servers that have already synchronized can continue resolving queries using their cached copies of the records. However, no record updates can be made until the primary server is back online.

Does a VPN change your primary DNS server?

No. A virtual private network (VPN) does not affect where a domain’s Domain Name System (DNS) records are stored or managed. It may change which DNS resolver a device uses to look up domain names, but it does not affect the primary DNS server itself.
Get Started