Skip to content
BeoHosting
BeoHosting
Technical

Guide to DNS Configuration

BeoHosting Team··8 min read read
Guide to DNS Configuration

What is DNS and how does it work?

The Domain Name System (DNS) is a system that translates domain names (e.g. yoursite.com) into IP addresses (e.g. 185.60.170.1) that computers use to communicate. Without DNS, you would have to memorize numeric IP addresses for every site you want to visit. DNS is essentially the phone book of the internet.

When you type a site address into a browser, the following happens: the browser asks a DNS resolver (usually your ISP) for the IP address of that domain. The resolver checks its cache, and if there is no answer, it asks the authoritative DNS server for that domain. The authoritative server returns the IP address and the browser connects to that server to load the site. The whole process typically takes 20-50 milliseconds.

Types of DNS records

A record (Address Record)

An A record is the most basic DNS record type and maps a domain name to an IPv4 address. For example:

yoursite.com → 185.60.170.1

Every domain that needs to display a site must have an A record. You can have multiple A records for the same domain (for load balancing) or different A records for different subdomains.

AAAA record is the same as an A record but for IPv6 addresses. As the internet moves to IPv6, more sites add AAAA records alongside A records for better compatibility.

CNAME record (Canonical Name)

A CNAME record creates an alias of one domain to another. Instead of mapping directly to an IP address, it points to another domain name that has its own A record. For example:

www.yoursite.com → yoursite.com

CNAME is most commonly used for the www version of a domain and for subdomains that should point to the same server. Important limitation: a CNAME cannot coexist with other records for the same name. That is why the root domain (yoursite.com without www) cannot have a CNAME - it must have an A record.

MX record (Mail Exchange)

MX records determine which servers receive email for your domain. Each MX record has a priority (lower number = higher priority) and the mail server name. For example:

yoursite.com MX 10 mail.yoursite.com
yoursite.com MX 20 mail2.yoursite.com

If the primary mail server (priority 10) is unavailable, email is sent to the secondary (priority 20). Without correct MX records, email on your domain will not work.

If you use external email services like Google Workspace or Microsoft 365, you must change MX records to point to their servers instead of your hosting server.

TXT record (Text Record)

TXT records contain textual information that various services use for verification and security. The most common examples:

  • SPF (Sender Policy Framework): Defines which servers are allowed to send email on behalf of your domain. Prevents spam and phishing. Example: v=spf1 include:_spf.beohosting.com ~all
  • DKIM (DomainKeys Identified Mail): Digital signature that proves an email really comes from your domain and was not modified in transit.
  • DMARC: Policy that tells mail servers what to do with messages that fail SPF or DKIM. Example: v=DMARC1; p=quarantine; rua=mailto:dmarc@yoursite.com
  • Google verification: TXT record for verifying domain ownership in Google Search Console or Google Workspace.

NS record (Nameserver)

NS records determine which DNS servers are authoritative for your domain. When you register a domain, you set nameservers at the registrar. For example, if you use BeoHosting nameservers:

yoursite.com NS ns1.beohosting.com
yoursite.com NS ns2.beohosting.com

Changing nameservers redirects all DNS queries to the new servers. This is required when you change hosting providers or move to Cloudflare.

DNS propagation

When you change DNS records, the changes do not apply immediately across the whole internet. DNS servers worldwide cache records, and time is needed for the cache to expire and the new records to propagate. This process is called DNS propagation.

How long does propagation take? The TTL (Time to Live) value of each DNS record defines how long a record is cached. Standard TTL is 3600 seconds (1 hour), which means most DNS servers refresh records every hour. In practice, propagation can take from 15 minutes to 48 hours, depending on TTL values and DNS providers.

Tips for fast propagation:

  • Before the change, reduce TTL to 300 seconds (5 minutes) and wait for the old TTL to expire.
  • Make the change and then restore TTL to a normal value after propagation completes.
  • Use tools like whatsmydns.net to track propagation in real time globally.

Common DNS configuration mistakes

Wrong nameservers: If the nameservers at the registrar do not match your hosting provider's nameservers, the site will not work. Always verify nameservers are set correctly.

Forgotten MX records: When changing hosting or nameservers, people often forget to set MX records again. The result: email stops working while the site works normally.

CNAME on root domain: Trying to add a CNAME record for the root domain (no www) can cause issues, because CNAME cannot coexist with other records. Use an A record for the root domain.

Duplicate A records: Two A records with different IP addresses for the same domain can cause unpredictable behavior where the site sometimes shows the right page and sometimes an error. Always have only one A record per domain (except for deliberate load balancing).

Missing SPF/DKIM/DMARC: Without these TXT records, your emails are much more likely to land in the recipient's spam folder. These records are practically mandatory today for reliable email delivery.

DNS configuration in cPanel

At BeoHosting, DNS records are configured through the cPanel Zone Editor. Log in to cPanel, find the "Domains" section, and click "Zone Editor". Here you can add, edit, and delete all DNS record types for your domains. cPanel automatically creates basic A, MX, and NS records when you add a domain, but TXT records (SPF, DKIM, DMARC) often need to be added manually.

Conclusion

DNS settings are the foundation on which your site and email rest. Understanding basic record types (A, CNAME, MX, TXT, NS) and how DNS propagation works helps you avoid the most common mistakes and resolve issues faster. If you are not sure about DNS changes, contact your hosting provider's support before making changes - a wrong DNS configuration can bring down both your site and email at the same time.

BeoHosting Team

10+ years of experience — Web hosting and infrastructure specialists

  • Web Hosting
  • WordPress Hosting
  • VPS
  • Dedicated Serveri
  • Domeni
  • SSL
  • cPanel
  • LiteSpeed
  • Linux administracija
  • DNS

Last updated: