DNS zone: managing and understanding it

Updated on

DNS zone: Definition

A DNS zone contains the DNS records that determine which IP addresses and servers a domain or subdomain points to. These records are stored on your authoritative Name Servers (NS). At LRob, you can manage your DNS records through the Plesk control panel.

What the DNS zone is for

The DNS zone lets you configure various aspects of your domain. For example, for the domain site.tld, the DNS zone can contain the following information:

  • The IP address site.tld points to (A record).
  • The IP address or domain name www.site.tld points to (A or CNAME record).
  • The server that handles webmail.site.tld (A or CNAME record).
  • The server that receives e-mail for site.tld (MX record).
  • The servers allowed to send e-mail for the domain (TXT record with the SPF configuration).
  • The encryption key for the domain’s e-mail (TXT record of type DKIM).

Reading and understanding a DNS entry

DNS records

A DNS zone is made up of several types of records, each with a specific function. Here are the main types:

Types of DNS records

  • A: Points a domain or subdomain to an IP address (IPv4).
  • AAAA: Points to an IP address in version 6 (IPv6).
  • CNAME: Alias that points a domain or subdomain to another domain (like a nickname).
  • MX: Indicates the server that receives e-mail for a domain or subdomain.
  • NS: Defines the Name Servers (see the Name Servers page) for a domain or subdomain. Note: for the main domain, this field is optional and has no authority. The NS are set at the registrar, not in the DNS zone.
  • TXT: Contains information or rules interpreted by services, such as the SPF or DKIM settings for e-mail.

Notation

When you add a DNS entry, the display generally consists of three fields:

  • The source, that is, the subdomain concerned (for the root domain, leave it empty or enter "*" or "@" depending on the system)
  • The DNS record type (A, CNAME, MX, TXT, etc.)
  • And the target, that is, the destination (IP, domain name, TXT value, etc.).

DNS pointings are generally written in this form (without the brackets):

[source] [type d'enregistrement] [cible]

Exceptions:

  • If the record concerns the main domain (no subdomain), the "source" field is empty or set to "@".
  • For MX records (e-mail receiving servers), a priority field is added: for example, MX (0) where the number is the priority (0 being the highest).
  • A time-to-live value (TTL) may sometimes be specified.

DNS zone example

Let’s take a concrete example with site.tld and the server ds.lrob.net:

  • The main domain (site.tld) must point to 138.201.17.216 (IPv4) and 2a01:4f8:171:28e8::2 (IPv6). You create the entries:
    A 138.201.17.216
    AAAA 2a01:4f8:171:28e8::2
  • The subdomain www.site.tld must point the same way as the main domain:
    www CNAME site.tld.
  • The e-mail receiving server for mail.site.tld points to the same IP addresses:
    mail A 138.201.17.216
    mail AAAA 2a01:4f8:171:28e8::2The matching MX record:
    MX 0 mail.site.tld.
  • The domain’s webmail service points to the server mail.site.tld:
    webmail CNAME mail.site.tld.
  • The dev subdomain must point to the local IP for development tests:
    dev A 127.0.0.1
A 138.201.17.216
AAAA 2a01:4f8:171:28e8::2
www CNAME site.tld.
mail A 138.201.17.216
mail AAAA 2a01:4f8:171:28e8::2
MX 0 mail.site.tld.
webmail CNAME mail.site.tld.
dev A 127.0.0.1

Note: CNAME and MX records generally end with a dot. Plesk adds this dot automatically.

Managing your DNS zone

DNS fields in Plesk

In Plesk, DNS is managed in the DNS Settings section:

  • The first column, Host, corresponds to the source (the subdomain).
  • The second column shows the Record type.
  • The third column, Value, shows the target (the IP address or domain to point to).

Add a DNS entry in Plesk

To add an entry:

  1. Go to DNS Settings under your domain in Plesk.
  2. Click Add Record.
  3. Choose the record type (A, CNAME, MX, TXT, etc.).
  4. Enter the source (the subdomain) and the target (IP address or domain).
  5. Click Update at the top of the page to confirm.

Edit a DNS entry in Plesk

To edit an existing entry:

  1. Click the DNS record to edit in the Host column.
  2. Change the source and target values as needed.
  3. Click Update to save the changes.