Creating DNS records in the management panel

Step-by-step guide to creating DNS records in the control panel with real-world examples for A, CNAME, MX, and TXT types; along with troubleshooting common issues and security tips.

7 min Updated 1 Sep 2026

Why Is Creating DNS Records in the Control Panel Important?

When you register a domain, you've essentially only purchased a name; but to connect that name to your website, email, or other services, you need to define DNS records in the domain control panel. Creating DNS records is essentially a map that tells the internet where each request for your domain should be directed. Without these records, your domain is practically useless, and users will encounter the DNS_PROBE_FINISHED_NXDOMAIN error.

In this article, we'll practically and with real-world examples examine how to create A, CNAME, MX, and TXT records in the domain control panel. We'll assume your domain is example.com and you want to connect it to a virtual server or shared hosting.

Getting to Know the Types of DNS Records and Their Uses

Before you enter the panel, you need to know what each record does. Choosing the wrong record type is one of the most common reasons for website or email malfunction.

A Record (Address Record)

The A record connects a domain or subdomain to an IPv4 address. This is the simplest and most widely used record type. If your server has a static IP address (e.g., 185.10.10.10), you use an A record.

Example: To connect example.com to your server, you create an A record with the value 185.10.10.10.

CNAME Record (Canonical Name)

The CNAME record points one name to another name (domain or subdomain), not to an IP. This record is typically used for subdomains like www or for connecting to cloud services (such as CDNs).

Example: If you want www.example.com to point to example.com, you create a CNAME record with the value example.com.

MX Record (Mail Exchange)

The MX record specifies which mail server your domain's emails should be delivered to. This record consists of two parts: Priority and Destination (Mail Server). A smaller priority number indicates higher priority.

Example: If you're using Google Workspace, you create an MX record with priority 1 and the value ASPMX.L.GOOGLE.COM.

TXT Record (Text Record)

The TXT record is used to store arbitrary text. Common uses include domain ownership verification (such as Google Search Console), setting up SPF for email, and adding DKIM security keys.

Example: SPF record for email: v=spf1 include:_spf.google.com ~all

Steps to Create DNS Records in the Control Panel

Most domain control panels (such as DirectAdmin, cPanel, or the registrar's custom panel) have a similar structure. Follow these steps:

  1. Log in to your domain control panel and find the DNS Management or Zone Editor option.
  2. Select the desired domain from the list (if you have multiple domains).
  3. Click on Add Record or Create New Record.
  4. Select the record type (A, CNAME, MX, TXT).
  5. Fill in the relevant fields (we'll explain each one separately below).
  6. Save the record. A confirmation message with the propagation time (TTL) is usually displayed.

Important Note: DNS changes typically propagate across the internet within 5 minutes to 24 hours. If your website doesn't work immediately, don't worry; wait and then check using tools like dig or nslookup.

Practical Example: Creating an A Record to Connect a Domain to a Server

Assume your server has a static IP 185.10.10.10 and you want the main domain and the www subdomain to connect to it.

Steps to Create an A Record for the Main Domain

  1. In the DNS Management section, click on Add Record.
  2. Select the record type as A.
  3. In the Name or Host field, enter @ (this symbol means the main domain itself, without a subdomain).
  4. In the Value or IP Address field, enter 185.10.10.10.
  5. Set TTL to 3600 (one hour).
  6. Save.

Steps to Create an A Record for the www Subdomain

  1. Click Add Record again.
  2. Select the record type as A.
  3. In the Name field, enter www.
  4. In the Value field, enter the same IP 185.10.10.10.
  5. Save.

After propagation, test:

dig example.com A
dig www.example.com A

The output should include an ANSWER SECTION with your IP address.

Common Mistake: Some users use the full domain name instead of @ (e.g., example.com). In some panels, this can create a duplicate record or cause an error. Always use @ for the main domain.

Practical Example: Creating a CNAME Record for a CDN or Cloud Service

Assume you're using Cloudflare or another CDN and need to point the cdn subdomain to the CDN's designated address.

Steps to Create a CNAME Record

  1. Click Add Record.
  2. Select the record type as CNAME.
  3. In the Name field, enter cdn.
  4. In the Value or Target field, enter the destination address, e.g., cdn.example-cdn.net.
  5. Set TTL to 3600.
  6. Save.

Test with the command:

dig cdn.example.com CNAME

Common Mistake: A CNAME record cannot be created for the main domain (@). If you need the main domain to point to another name, you must use an A record with the destination IP, or use the ALIAS feature (if your panel supports it).

Practical Example: Creating an MX Record for Domain Emails

Assume you're using Zoho Mail as your email service. Its MX settings are as follows:

  • MX priority 10: mx.zoho.com
  • MX priority 20: mx2.zoho.com
  • MX priority 50: mx3.zoho.com

Steps to Create an MX Record

  1. Click Add Record.
  2. Select the record type as MX.
  3. In the Name field, enter @ (or leave it blank, depending on the panel).
  4. In the Priority field, enter 10.
  5. In the Value or Mail Server field, enter mx.zoho.com.
  6. Save and repeat these steps for priorities 20 and 50.

Test:

dig example.com MX

The output should show three MX records with different priorities.

Common Mistake: Forgetting the trailing dot (.) at the end of the MX value. In some panels, the value must end with a dot (e.g., mx.zoho.com.). If your panel doesn't add it automatically, be sure to include the dot.

Practical Example: Creating a TXT Record for SPF and Ownership Verification

The TXT record has two main uses: setting up SPF to prevent spam and verifying domain ownership in Google services.

Creating an SPF Record

  1. Click Add Record.
  2. Select the record type as TXT.
  3. In the Name field, enter @.
  4. In the Value field, enter the following:
v=spf1 include:_spf.zoho.com ~all

This value indicates that only Zoho servers are authorized to send emails from your domain.

Creating a TXT Record for Google Search Console

  1. Click Add Record.
  2. Select the record type as TXT.
  3. In the Name field, enter @.
  4. In the Value field, enter the Google verification code, e.g.:
google-site-verification=xxxxxxxxxxxxxxxxxxxx

Test:

dig example.com TXT

Common Mistake: Creating two separate TXT records for SPF. Only one SPF record is allowed; if you have multiple SPF records, your emails may be rejected. If you need to combine multiple services, use include within that single record.

Checking and Troubleshooting DNS Records

After creating records, always verify them using command-line tools or online websites. A few useful commands:

# Check A record
dig example.com A

# Check CNAME record
dig www.example.com CNAME

# Check MX record
dig example.com MX

# Check TXT record
dig example.com TXT

# Check all records comprehensively
dig example.com ANY

If the output is empty or shows an error, check the following:

  • Have you saved the record?
  • Has the TTL elapsed? (Wait at least 5 minutes)
  • Did you enter the host name correctly? (@ for the main domain, www for the subdomain)
  • Are you using the correct DNS server? (Your browser or system cache might be outdated)

To flush the DNS cache on different operating systems:

# Linux (systemd-resolved)
sudo systemd-resolve --flush-caches

# macOS
sudo dscacheutil -flushcache

# Windows
ipconfig /flushdns

Security and Optimization Tips for Creating DNS Records

DNS records aren't just for connectivity; they can also enhance your security. Here are some practical recommendations:

  • Always configure SPF and DKIM. Without these records, your emails may end up in spam or be rejected by other services.
  • Use CNAME records for cloud services, not A records. If the cloud service's IP changes, the CNAME will update automatically.
  • Lower TTL during changes. If you're planning a server migration, reduce TTL to 300 seconds so changes propagate faster.
  • Remove unnecessary records. Old records that are no longer used can pose a security risk.

If you're looking for a simple and reliable domain control panel, ServerNet provides full DNS record management in its user panel; however, the steps mentioned in this article are applicable to any standard panel.

Conclusion

Creating DNS records in the control panel is an essential skill for every website administrator. By understanding the record types (A, CNAME, MX, and TXT) and following the practical examples in this article, you can connect your domain to your server, email service, and ownership verification tools. Always verify with dig after any change, and avoid common mistakes such as using @ instead of the full domain name or creating multiple SPF records. With a little care, DNS is no longer a mystery; it's a powerful tool in your hands.

Was this page helpful?