Back to Blog
Tutorials 11 min read

How to Add Custom DNS Records in cPanel (2026 Guide)

Managing your domain's DNS records is a fundamental task for any website owner or webmaster. cPanel provides a robust and user-friendly interface, the Zone Editor, to handle these critical configurations. This guide will walk you through the process of adding various custom DNS record types, ensuring your website, email, and other services function correctly.

P
By Priya Sharma
Senior systems engineer with 11 years in shared and VPS infrastructure. Writes about real-world hosting performance.
How to Add Custom DNS Records in cPanel (2026 Guide)
Table of contents

In the ever-evolving digital landscape of 2026, managing your online presence extends far beyond just having a website. For Indian small business owners, seasoned developers, and dedicated webmasters, understanding and effectively managing Domain Name System (DNS) records is paramount. These tiny, yet powerful, configurations dictate where your website lives, how your emails are delivered, and how various online services connect to your domain. While the concept of DNS might seem complex, cPanel, the industry-standard web hosting control panel, simplifies the process significantly.

Hostmileage understands the critical role DNS plays in your online operations. This comprehensive guide will walk you through the precise steps to add custom DNS records in cPanel, ensuring your digital assets are correctly configured and performing optimally. Whether you're setting up a new email service, verifying domain ownership, or pointing your subdomain to a different server, mastering cPanel's Zone Editor is an essential skill.

Before diving into the practical steps, let's establish a foundational understanding of what DNS records are and why their accurate management is non-negotiable for anyone running a website or online service.

What are DNS Records and Why Do You Need Them?

DNS records are essentially instruction sets located in authoritative DNS servers, providing information about a domain. Think of them as the internet's phonebook, translating human-readable domain names (like yourdomain.com) into machine-readable IP addresses (like 192.0.2.1). Without DNS, you'd have to remember a string of numbers for every website you wanted to visit, which is clearly impractical. For a deeper dive, explore our guide on What is DNS and How Does it Work in 2026? A Hostmileage Guide.

Different types of DNS records serve distinct purposes. Understanding each is crucial before you start making changes in cPanel.

A Records: Connecting Domains to IPs

An 'A' record, short for 'Address' record, is the most fundamental DNS record type. It maps a domain name or a subdomain to an IPv4 address. This is what directs your website visitors to the correct server where your website files are hosted.

  • Example: yourdomain.com points to 192.0.2.1
  • Use Case: Directing your main website or a specific subdomain (e.g., blog.yourdomain.com) to a web server.

CNAME Records: Creating Aliases

A 'CNAME' record, or 'Canonical Name' record, creates an alias for a domain name. Instead of pointing to an IP address, a CNAME record points one domain or subdomain to another domain name. This is particularly useful when you have multiple services running on the same server but want to access them via different subdomains.

  • Example: www.yourdomain.com points to yourdomain.com
  • Use Case: Pointing www to your naked domain, or pointing ftp.yourdomain.com to your main domain if FTP is hosted on the same server.

MX Records: Directing Email

An 'MX' record, or 'Mail Exchange' record, specifies the mail servers responsible for accepting email messages on behalf of a domain name. These records are critical for ensuring your emails are delivered to the correct inbox. Each MX record typically includes a priority number, indicating preference if multiple mail servers are available.

  • Example: yourdomain.com has MX records pointing to mail.yourdomain.com with priority 10.
  • Use Case: Setting up email services with providers like Google Workspace, Zoho Mail, or a dedicated email hosting solution. Incorrect MX records are a common reason Why Your Emails Go to Spam in 2026: A Hostmileage Guide.

TXT Records: Verification and SPF/DKIM

A 'TXT' record, or 'Text' record, allows domain administrators to insert arbitrary text into the DNS. While it can store any text, its most common uses today are for domain verification (e.g., proving ownership to Google or other services) and for email authentication protocols like SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail). These protocols help prevent email spoofing and improve email deliverability.

  • Example: yourdomain.com has a TXT record with v=spf1 include:_spf.google.com ~all
  • Use Case: Verifying domain ownership, setting up SPF and DKIM for email security, or storing other domain-related metadata.

SRV Records: Service Location

An 'SRV' record, or 'Service' record, specifies the location (hostname and port number) of servers for specific services. These are less common for basic website setups but are essential for services like SIP (Voice over IP), XMPP (instant messaging), or certain Microsoft applications.

  • Example: _sip._tcp.yourdomain.com points to sip.yourdomain.com:5060
  • Use Case: Configuring specific VoIP services, instant messaging servers, or other applications that require service discovery via DNS.

Prerequisites Before Adding DNS Records in cPanel

Before you jump into the cPanel interface, a few preparatory steps will ensure a smooth and error-free process.

Accessing Your cPanel Account

First and foremost, you need to be able to log into your cPanel account. Your hosting provider, like Hostmileage, typically provides you with a direct link, username, and password. If you're unsure, check your welcome email or contact Hostmileage support.

Hostmileage offers robust Linux Hosting plans that come with cPanel pre-installed, making domain and website management intuitive for users of all technical levels.

Understanding Your Current DNS Configuration

It's always a good idea to know what records currently exist for your domain. You can usually view these within cPanel's Zone Editor, or by using online DNS lookup tools. This helps prevent conflicts and ensures you don't accidentally overwrite critical existing records.

Gathering Required Record Information

This is perhaps the most critical step. The exact values for your custom DNS records will be provided by the service you are trying to connect (e.g., your email provider, CDN service, or third-party application). Ensure you have all the necessary details:

  • Record Type: A, CNAME, MX, TXT, SRV, etc.
  • Name/Host: The specific domain or subdomain the record applies to (e.g., @ for the main domain, www, mail, _spf).
  • Value/Points To/Destination: The IP address, hostname, or text string the record should point to.
  • Priority (for MX records): A numerical value (lower numbers indicate higher priority).
  • TTL (Time To Live): How long DNS resolvers should cache the record. Typically, 14400 seconds (4 hours) or 3600 seconds (1 hour) are common defaults.
Screenshot of cPanel Zone Editor interface with options to add A, CNAME, MX records
Navigating the cPanel Zone Editor to add new DNS records.

Step-by-Step Guide: How to Add Custom DNS Records in cPanel (2026)

Now, let's get into the practical steps for adding various DNS record types using cPanel's Zone Editor. The interface might have minor cosmetic variations depending on your cPanel version, but the core functionality remains consistent.

  1. Log in to your cPanel account.
  2. Locate the 'Domains' section.
  3. Click on 'Zone Editor'. This will take you to the main DNS management interface.

On the Zone Editor page, you'll see a list of your domains. For the domain you wish to modify, you'll typically see options like '+A Record', '+CNAME Record', '+MX Record', and a 'Manage' button. The 'Manage' button allows you to view and edit all existing records.

Adding an A Record

To add an A record, which maps a domain or subdomain to an IP address:

  1. On the Zone Editor page, next to your domain, click the '+A Record' button.
  2. In the 'Name' field, enter the subdomain you want to point (e.g., blog for blog.yourdomain.com). If you want to point the main domain itself, you can often leave this blank or enter @, though cPanel usually handles the main domain's A record automatically.
  3. In the 'Address' field, enter the IPv4 address provided by your service provider.
  4. The 'TTL' (Time To Live) field will usually auto-populate with a default value (e.g., 14400 seconds). You can adjust this if specifically instructed, but the default is often fine.
  5. Click 'Add an A Record' to save your changes.

Adding a CNAME Record

To add a CNAME record, which creates an alias from one domain/subdomain to another:

  1. On the Zone Editor page, next to your domain, click the '+CNAME Record' button.
  2. In the 'Name' field, enter the subdomain you want to alias (e.g., www for www.yourdomain.com).
  3. In the 'CNAME' field (sometimes labeled 'Record' or 'Points To'), enter the target domain name (e.g., yourdomain.com or ghs.google.com for Google Sites).
  4. The 'TTL' field will usually auto-populate.
  5. Click 'Add a CNAME Record' to save your changes.

Adding an MX Record

To add an MX record, which directs email for your domain:

  1. On the Zone Editor page, next to your domain, click the '+MX Record' button.
  2. Enter the 'Priority' number (e.g., 1, 5, 10, 20) as provided by your email service. Lower numbers indicate higher priority.
  3. In the 'Destination' field, enter the mail server hostname (e.g., mail.yourdomain.com or aspmx.l.google.com).
  4. Click 'Add an MX Record' to save your changes.
  5. Important: If you are switching email providers, ensure you remove any old MX records that are no longer valid to prevent email delivery issues. You can do this by clicking 'Manage' next to your domain, finding the old MX record, and clicking 'Delete'.
Screenshot showing how to add an MX record in cPanel with priority and destination fields
Configuring MX records to correctly route your domain's email.

Adding a TXT Record

To add a TXT record for domain verification, SPF, DKIM, or other text-based data:

  1. On the Zone Editor page, click the 'Manage' button next to your domain.
  2. On the 'Manage' page, click the '+ Add Record' button.
  3. From the 'Type' dropdown, select 'TXT'.
  4. In the 'Name' field, enter the host name (e.g., @ for the main domain, _spf, google._domainkey).
  5. In the 'Record' field, paste the exact text string provided by your service (e.g., your SPF record or domain verification code).
  6. Click 'Save Record'.

Adding an SRV Record (Advanced)

SRV records are less common but essential for specific services. The process is similar to adding a TXT record:

  1. On the Zone Editor page, click the 'Manage' button next to your domain.
  2. On the 'Manage' page, click the '+ Add Record' button.
  3. From the 'Type' dropdown, select 'SRV'.
  4. You will typically need to fill in fields for 'Name', 'TTL', 'Priority', 'Weight', 'Port', and 'Target'. These values are highly specific and must be obtained precisely from your service provider.
  5. Click 'Save Record'.

After adding any record, you can always go back to the 'Manage' section of the Zone Editor to review, edit, or delete existing records.

Screenshot of cPanel Zone Editor showing a list of existing DNS records with options to edit or delete
Reviewing and managing all DNS records for your domain in cPanel.

Understanding DNS Propagation and TTL

Once you add or modify a DNS record in cPanel, the changes are not instantaneous across the entire internet. This delay is due to a process called DNS propagation. When a DNS resolver (like your ISP's server) looks up a domain, it caches the information for a certain period, defined by the record's TTL (Time To Live).

TTL is measured in seconds. A common TTL for many records is 14400 seconds (4 hours) or 3600 seconds (1 hour). This means that after you make a change, it might take up to the TTL duration for all DNS resolvers worldwide to update their cached information. While some changes can propagate within minutes, it's generally safe to expect 4-24 hours for global propagation. During this period, some users might see the old record, while others see the new one.

You can use online tools like DNS Checker to monitor the propagation status of your records across various locations globally.

Common Mistakes to Avoid When Managing DNS Records

Mistakes in DNS configuration can lead to significant downtime or service interruptions. Here are some common pitfalls to avoid:

  • Typos: Even a single character error in an IP address, hostname, or text string can render a record useless. Double-check all entries.
  • Incorrect Record Type: Using an A record instead of a CNAME, or vice-versa, is a frequent error. Ensure you select the correct type.
  • Missing 'Host' or 'Name' Value: Forgetting to specify the subdomain or using an incorrect symbol (e.g., @ vs. blank) can cause issues.
  • Conflicting Records: Having multiple A records for the same subdomain or conflicting MX records can lead to unpredictable behavior. Always clean up old records.
  • Low TTL for Critical Changes: While a low TTL speeds up propagation, it also increases DNS query load. For critical changes, temporarily lowering TTL before the change, then raising it back, can be strategic. However, for everyday records, a standard TTL is fine.
  • Not Removing Old MX Records: When switching email providers, failing to remove old MX records can cause emails to be delivered to the wrong server or bounce.
  • Forgetting to Save: Always ensure you click the 'Add Record' or 'Save Record' button after making changes.

When to Use Hostmileage's Premium DNS Services

While cPanel's Zone Editor is excellent for most standard DNS management, there are scenarios where advanced DNS services offer significant benefits. Hostmileage offers Cloud Hosting solutions that often integrate with or recommend premium DNS services for enhanced performance, security, and reliability. These services typically provide:

  • Faster Propagation: Often near-instantaneous updates compared to standard DNS.
  • Improved Redundancy and Uptime: Distributed global networks ensure your DNS is always available, even during attacks or outages.
  • Enhanced Security Features: Protection against DDoS attacks, DNS hijacking, and other threats.
  • Advanced Features: Geo-DNS (directing users to closest server), load balancing, and more granular control.
FeaturecPanel Zone Editor (Standard DNS)Premium DNS Service (e.g., Hostmileage recommended)
Ease of UseUser-friendly for basic record managementUser-friendly, but with more advanced options
Propagation SpeedDepends on TTL, typically 4-24 hoursOften near-instantaneous
Global RedundancyLimited to your hosting provider's DNS serversGlobally distributed network, high redundancy
Security FeaturesBasic protection provided by hosting serverAdvanced DDoS protection, DNSSEC, anti-hijacking
Advanced FeaturesA, CNAME, MX, TXT, SRV recordsGeo-DNS, Load Balancing, Traffic Management, API Access
CostIncluded with hosting packageTypically an additional service fee
Best ForSmall to medium websites, standard email setupsHigh-traffic sites, mission-critical applications, global reach, enhanced security needs

For businesses scaling up or requiring enterprise-grade reliability and performance, exploring premium DNS options is a wise investment. This is especially true for those considering advanced infrastructure like Kubernetes Hosting for Small Businesses in 2026: A Hostmileage Guide, where precise and rapid DNS control is often crucial.

Conclusion

Adding custom DNS records in cPanel is a straightforward process once you understand the different record types and their purposes. By carefully following the steps outlined in this 2026 guide, you can confidently manage your domain's A, CNAME, MX, TXT, and SRV records, ensuring your website, email, and other online services function seamlessly. Remember to always double-check your entries, understand DNS propagation, and leverage Hostmileage's support if you encounter any challenges.

Proper DNS management is a cornerstone of a robust online presence. With Hostmileage, you have the tools and support to keep your digital infrastructure running efficiently and securely. Whether you're configuring WordPress Hosting or setting up complex email routing, mastering your cPanel Zone Editor is a valuable skill that will serve you well for years to come.

Frequently asked questions

What is the Zone Editor in cPanel?

The Zone Editor in cPanel is a graphical interface that allows you to manage your domain's DNS records. It provides options to add, edit, and delete various record types like A, CNAME, MX, and TXT, making it easy to control how your domain connects to different online services without needing command-line access.

How long does it take for DNS changes to propagate?

DNS changes typically take between 4 to 24 hours to fully propagate across the internet. This duration, known as DNS propagation time, is influenced by the record's TTL (Time To Live) setting, which dictates how long DNS resolvers cache the information. Some changes may appear faster in certain regions.

Can I point my domain to an external server using cPanel?

Yes, you can point your domain to an external server using cPanel by modifying its A record. You would update the A record for your domain (or a subdomain) to the IP address of the external server. Similarly, CNAME records can point subdomains to external hostnames, like a CDN or third-party service.

What is the difference between an A record and a CNAME record?

An A record maps a domain or subdomain directly to an IPv4 address, linking it to a specific server. A CNAME record, on the other hand, creates an alias, pointing one domain or subdomain to another domain name. CNAMEs are useful for pointing multiple subdomains to a single canonical domain.

Why are my emails not working after changing MX records?

If your emails stop working after changing MX records, it's likely due to incorrect record values, propagation delay, or conflicting old MX records. Ensure the new MX records are exactly as provided by your email service, check for typos, and verify that any outdated MX records have been removed from your cPanel Zone Editor.

What is TTL in DNS records?

TTL, or Time To Live, is a value in DNS records that tells DNS resolvers how long to cache the record's information before querying the authoritative DNS server again. A higher TTL means slower propagation of changes but fewer queries, while a lower TTL speeds up propagation but increases query load.

Is it safe to delete existing DNS records in cPanel?

Deleting existing DNS records in cPanel should be done with caution. Only delete records if you are certain they are no longer needed or are being replaced by new ones. Deleting critical records like your website's A record or email's MX records can lead to immediate downtime for those services.

P
Written by
Priya Sharma

Senior systems engineer with 11 years in shared and VPS infrastructure. Writes about real-world hosting performance.

#cpanel #dns records #zone editor #web hosting #domain management #a record #mx record
References
  1. https://www.cloudflare.com/learning/dns/dns-records/
  2. https://en.wikipedia.org/wiki/List_of_DNS_record_types
  3. https://dnschecker.org/
Share this article