How to Manage DNS in DirectAdmin

DNS (Domain Name System) records control how your domain name connects to servers and services on the internet. Whether you need to point your domain to a new server, configure email delivery, or verify domain ownership for Google or Microsoft, DirectAdmin's DNS Zone Editor gives you full control. This guide explains every record type and how to configure each one correctly.

Accessing the DNS Zone Editor

Log in to your DirectAdmin control panel and navigate to Advanced Features → DNS Administration. You will see a list of all domains on your account. Click the domain name you want to manage to open its DNS zone. The zone editor shows all current DNS records in a table, with options to add, edit, or delete each record.

Types of DNS Records

A Record

An A Record maps a domain name or subdomain to an IPv4 address. This is the most fundamental DNS record — it tells browsers which server IP to connect to when someone visits your domain. Your primary domain always has an A Record pointing to your hosting server IP.

CNAME Record

A CNAME (Canonical Name) Record points one domain name to another domain name (not an IP address). CNAMEs are commonly used for subdomains that should resolve to the same IP as the root domain, or to verify domain ownership with third-party services like Google Search Console.

MX Record

An MX (Mail Exchanger) Record tells the internet which mail servers should receive email for your domain. Without a correctly configured MX record, email sent to your domain will bounce. Each MX record has a priority number — lower numbers are higher priority.

TXT Record

A TXT Record stores plain text data in your DNS zone. The most common uses are SPF records (to authorize which servers can send email for your domain) and DKIM records (a digital signature for outgoing email). TXT records are also used to verify domain ownership for Google Workspace, Microsoft 365, and SSL providers.

NS Record

NS (Nameserver) Records define which nameservers are authoritative for your domain. For hosting with AsiaGB, these are pre-configured automatically. You should only change NS records if you want to transfer DNS management to an external provider.

How to Edit an A Record

  1. In the DNS Zone Editor, locate the A record for your domain (it will show your domain name in the Name column and an IP address in the Value column).
  2. Click Edit next to the record.
  3. Update the IP address in the Value field to the new server IP.
  4. Click Save.

When to edit the A Record: If you are migrating your website to a new server or changing hosting providers, update the A Record to point to the new server IP. Changes usually propagate globally within 1–24 hours.

How to Add a CNAME Record

  1. In the DNS Zone Editor, click Add Record.
  2. Set the record type to CNAME.
  3. In the Name field, enter the subdomain (e.g., www or mail).
  4. In the Value field, enter the destination domain name followed by a dot (e.g., yourdomain.com.).
  5. Click Add to save.

How to Set Up MX Records for Email

  1. In the DNS Zone Editor, click Add Record and select type MX.
  2. Leave the Name field as your domain name (or blank, to apply to the root domain).
  3. In the Value field, enter the mail server hostname provided by your email service (e.g., mail.yourdomain.com. or Google's aspmx.l.google.com.).
  4. Set the Priority value (typically 10 for a primary mail server).
  5. Click Add.

Google Workspace / Microsoft 365: If you are using an external email service, replace the default MX records with the ones provided by Google or Microsoft. Remove the old MX records first to avoid email delivery conflicts.

Adding SPF and DKIM TXT Records

SPF Record

An SPF record tells receiving mail servers which IP addresses and hostnames are authorized to send email on behalf of your domain. This helps prevent spam and spoofing. To add an SPF record:

  1. Click Add Record and select type TXT.
  2. Set the Name to your domain (root, no subdomain prefix).
  3. In the Value field, enter: v=spf1 include:yourmailprovider.com ~all
  4. Click Add.
DNS Management page showing all domain DNS records
DNS Management page showing all domain DNS records
Click Add Record (circled) to create a new DNS record
Click Add Record (circled) to create a new DNS record
Select record type and enter DNS values then click Add
Select record type and enter DNS values then click Add

DKIM Record

DKIM adds a cryptographic signature to your outgoing emails. Your email provider will give you a DKIM key, which is added as a TXT record at a specific subdomain (e.g., default._domainkey.yourdomain.com). Add it the same way as the SPF record, using the exact Name and Value strings provided by your email service.

Understanding SOA and NS Records

SOA Record (Start of Authority)

Every DNS zone begins with an SOA (Start of Authority) Record. It contains the authoritative nameserver for the zone, an administrative email address, the zone's serial number, and the refresh, retry, expiry, and minimum TTL values. DirectAdmin manages the SOA record automatically — you generally do not need to edit it manually. However, if you migrate DNS from one provider to another, verifying the SOA is a useful diagnostic step.

NS Records (Nameserver)

NS Records define which nameservers are authoritative for your domain. When you register hosting with AsiaGB, the NS records are pre-configured to ns1.asiagb.com and ns2.asiagb.com. Changing NS records is required only if you want to transfer DNS management to a third-party provider such as Cloudflare or Amazon Route 53. Note that NS record changes take the longest to propagate — sometimes up to 48 hours — because the domain registry itself must update its delegation records.

Complete Email DNS Setup: MX, SPF, DKIM, and DMARC

To ensure email deliverability and avoid landing in recipients' spam folders, your domain should have all four email-related DNS records in place. Missing even one of them can cause deliverability problems.

MX Record — Inbound Email Routing

The MX record tells the internet where to deliver email addressed to your domain. If you host email with AsiaGB, the MX record is configured automatically. If you switch to Google Workspace or Microsoft 365, you must replace the default MX record with the ones provided by that service. You may have multiple MX records with different priority values — email servers will try the lowest priority number first and fall back to higher numbers if the primary is unreachable.

SPF Record — Authorized Senders

An SPF (Sender Policy Framework) TXT record declares which mail servers are authorized to send email from your domain. Without it, recipient servers may mark your outgoing email as suspicious. A typical SPF record looks like: v=spf1 include:spf.yourmailprovider.com ~all. The ~all suffix means messages from unauthorized sources should be soft-failed (flagged but not rejected), while -all means hard-fail (rejected entirely). Only one SPF record per domain is allowed — if you need multiple senders, combine them in a single record using additional include: mechanisms.

DKIM Record — Email Signing

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to every outgoing message. The receiving mail server fetches your DKIM public key from DNS, uses it to verify the signature, and confirms the email was not tampered with in transit. In DirectAdmin, generate a DKIM key pair under E-mail Manager → DKIM Keys. The system will display the public key to be added as a TXT record, typically at the name default._domainkey.yourdomain.com.

DMARC Record — Policy and Reporting

DMARC (Domain-based Message Authentication, Reporting and Conformance) ties SPF and DKIM together by specifying what should happen when an email fails authentication. A starter DMARC record at _dmarc.yourdomain.com with value v=DMARC1; p=none; rua=mailto:[email protected] begins in monitoring mode — you receive aggregate reports without rejecting any mail. Once you have analyzed the reports and confirmed legitimate senders all pass, you can tighten the policy to p=quarantine or p=reject.

DNS Propagation: TTL and How to Check

After making any DNS change, the update must propagate to DNS servers worldwide. This process typically takes 1 to 24 hours, though most changes are visible within a few hours. During propagation, some visitors may see the old DNS values while others see the new ones.

What Is TTL?

TTL (Time To Live) is a value in seconds that tells DNS resolvers how long to cache a record before requesting an update from the authoritative server. A TTL of 3600 means the record is cached for one hour. If you know a DNS change is coming (for example, a server migration), lowering the TTL to 300 (5 minutes) 24–48 hours before the change reduces propagation time significantly. After the change is confirmed stable, raise the TTL back to a normal value like 3600 or 86400.

Checking Propagation Status

Use free tools like dnschecker.org or whatsmydns.net to check propagation status from DNS servers in multiple countries simultaneously. Both tools show a map or table of results — green indicates the new value has been adopted, while red or different values indicate propagation is still in progress for that region.

Debugging DNS with dig and nslookup

When DNS is not behaving as expected, command-line tools give you direct insight into what DNS servers are returning.

Using dig (Linux / macOS)

The dig command is the most powerful DNS diagnostic tool available. Useful examples:

Using nslookup (Windows / cross-platform)

Common DNS Errors and How to Fix Them

Need Reliable Hosting with Full DNS Control?

AsiaGB hosting includes the DirectAdmin DNS Zone Editor with all plans — manage A, CNAME, MX, and TXT records easily from your browser.

View Hosting Plans