How to Configure DNS Records for Your Domain

Configuring DNS Records for Your Domain

DNS records tell the internet how to reach your domain. This guide covers the records you will most commonly need.

A Record — Point Domain to an IP

Type: A
Name: @          (root domain: yourdomain.com)
Value: YOUR_SERVER_IP
TTL: 3600
Type: A
Name: www        (www.yourdomain.com)
Value: YOUR_SERVER_IP

CNAME Record — Alias to Another Domain

Type: CNAME
Name: blog
Value: yourdomain.com

This makes blog.yourdomain.com resolve to wherever yourdomain.com points.

MX Record — Mail Server

Type: MX
Name: @
Value: mail.yourdomain.com
Priority: 10

TXT Record — Verification and Email Security

# Domain verification (Google, etc.):
Type: TXT, Name: @, Value: "google-site-verification=abc123"

# SPF (prevents email spoofing):
Type: TXT, Name: @, Value: "v=spf1 ip4:YOUR_SERVER_IP ~all"

# DMARC:
Type: TXT, Name: _dmarc, Value: "v=DMARC1; p=quarantine; rua=mailto:admin@yourdomain.com"

Testing DNS Records

dig yourdomain.com A          # Check A record
dig yourdomain.com MX         # Check MX record
dig yourdomain.com TXT        # Check TXT records
nslookup yourdomain.com

DNS Propagation

DNS changes take 1–48 hours to propagate globally. Check propagation status at whatsmydns.net.

TTL (Time To Live)

Lower TTL (e.g., 300) means faster propagation of changes but more DNS queries. Higher TTL (e.g., 86400) reduces query load. Lower it before a planned migration, then raise it again after.

  • 0 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Uyğun məqalələr

Understanding Your Server's Network Configuration

Understanding Your Server's Network Configuration Knowing how to read and manage your server's...

Setting Up Reverse DNS (rDNS/PTR Record)

Setting Up Reverse DNS (rDNS / PTR Record) A reverse DNS (PTR) record maps your IP address back...

How to Configure a Static IP Address on Linux

Configuring a Static IP Address on Linux Dedicated servers typically have a static IP configured...

Setting Up Nginx as a Reverse Proxy

Setting Up Nginx as a Reverse Proxy A reverse proxy forwards incoming requests to a backend...

Setting Up a Mail Server with Postfix and Dovecot

Setting Up a Mail Server with Postfix and Dovecot This guide sets up a basic mail server: Postfix...