// Engineering Log

DNS setup for email and website: Part 1 — What DNS is and the main records (A, MX)

Published on 2026-09-21

// Fast route

This article belongs to the topic Networking and routing.

The website, email, and other services on a domain are connected by DNS (Domain Name System) — the system of domain names. When a visitor types example.ru into a browser, DNS servers tell the browser the IP address of the server, for example 192.0.2.1, where the site is hosted. If DNS is configured incorrectly, the site won’t open and emails won’t reach recipients.

Why this is important

Correctly populated DNS records are the foundation of stable website and email operation. An error in them can result in site downtime, lost emails, and, consequently, lost customers.

Changes to DNS do not take effect immediately. Each record has a time-to-live (TTL), during which servers across the Internet cache its previous value. Usually this is from a few minutes to a few hours.

Main record types

  • A record (Address): ties the domain to the web server

    What it is. An A record specifies which IPv4 address corresponds to a domain name. For IPv6 addresses the analogous AAAA record is used.

    Why it’s needed. Without it the browser won’t know which server to contact for the website. It’s the basic record for any site.

    Example:

    example.ru. IN A 192.0.2.1

    Here example.ru is your domain, and 192.0.2.1 is the IP address of the server where the site is hosted.

  • MX record (Mail Exchange): indicates where to deliver mail

    What it is. An MX record tells sending mail servers which server accepts mail for your domain.

    Why it’s needed. Without it you cannot deliver mail to addresses like info@example.ru.

    Example:

    example.ru.       IN MX 10 mail.example.ru.
    mail.example.ru.  IN A     192.0.2.10

    Here mail.example.ru is the name of the mail server, and 10 is its priority: the lower the number, the higher the priority. If there are multiple mail servers they are assigned different priorities, and senders try them in order. An MX record must point to a server name that has an A or AAAA record, not to an IP address or an alias (CNAME).

The examples are written in zone file format. In the registrar’s or DNS host’s control panel the same data is entered into separate fields: name, type, value, and priority.

Tags:

// Similar task

If you are dealing with something similar

This article belongs to one of the main working topics. You can keep reading on the topic, go to the homepage to understand what I do, or open the service pages directly.

Article topic

Networking and routing

MikroTik, VPN, routing, DNS, BGP, connectivity, and access troubleshooting.

Typical tasks behind this topic

  • Set up VPN and secure access to office or cloud
  • Fix routing, DNS, or unstable connectivity
  • Configure MikroTik, firewall, and external links

// Next step

If you need help with this topic, not just another article, it is better to go straight to the service page. The homepage and topic collection stay available as secondary routes.

Open services

// Contact

Need help?

Get in touch with me and I'll help solve the problem

I reply within one business day (03:00-13:00 GMT)

Или оставьте заявку здесь:

Confirm that you are not a bot.

Write and get a quick reply