How to Use cPanel on VPS to Manage DNS Records
A Virtual Private Server (VPS hosting) provides flexibility and control over your hosting, and cPanel simplifies server management with an intuitive interface. One of the most crucial tasks when using a VPS is correctly configuring DNS records, ensuring your site is accessible and your email services function properly. In this article, we will thoroughly explore how to effectively manage DNS records in cPanel on a VPS to ensure the stable and reliable operation of your web project.We will cover adding, editing, and deleting DNS records, as well as explain how to interpret various record types such as A, MX, CNAME, and TXT. You will receive step-by-step instructions and practical examples to help you confidently manage your domain's DNS settings, avoiding common mistakes and optimizing your site's performance.
Contents
Accessing the DNS Zone Editor in cPanel

- Log in to your cPanel. You can usually do this by going to
https://your_domain:2083orhttps://your_domain/cpanel, using the credentials provided by your hosting provider. - Find the "Domains" section.
- In this section, you will find an icon or link called "Zone Editor". Click on it.
- A Record: Add an A record.
- CNAME Record: Add a CNAME record.
- MX Record: Add an MX record.
- Manage: Manage existing DNS records for the selected domain. This is where you can view, edit, and delete records.
Expert Tip: Before making changes to DNS, back up the existing records. This allows you to quickly restore the previous settings if problems arise.
Ready for cPanel? Choose Your Perfect VPS Hosting!
Launch your project with cPanel on a powerful and reliable VPS. Gain full control and flexibility. — from €4.49/mo.
Explore VPS Plans →
Adding and Configuring A Records

- Specifying the primary servers with IP addresses of your web server.
- Directing subdomains (e.g., blog.your_domain) to a specific IP address.
- Specifying the IP address for a domain without a prefix (your_domain).
- In the Zone Editor for the desired domain, click the "Add Record" button or select "A Record" from the drop-down list.
- Fill in the required fields:
- Name: Specify the domain name or subdomain for which you are creating the A record. For example, for your main domain enter "@" (without quotes), for a subdomain "blog" enter "blog.your_domain".
- Address: Enter the IP address of the server you want to direct traffic to. This should be an IPv4 address (e.g., 192.168.1.1).
- TTL: Specify the TTL (Time to Live) value. The default value is usually used (e.g., 14400 seconds or 4 hours). TTL determines how long DNS servers will cache this record.
- Click the "Add Record" button to save the record.
| Field | Value |
|---|---|
| Name | @ |
| Address | 203.0.113.45 |
| TTL | 14400 |
| Field | Value |
|---|---|
| Name | blog.example.com |
| Address | 198.51.100.78 |
| TTL | 14400 |
Configuring MX Records for Email
MX records (Mail Exchange Records) determine which mail servers are responsible for receiving email for your domain. Correctly configuring MX records is critical to ensuring email delivery and receipt. When to use MX records:
- Specifying the mail server for your domain (e.g., mail.example.com).
- Defining the priority of mail servers (if you have multiple servers).
- Integrating with email services such as Google Workspace (G Suite) or Microsoft 365.
- In the Zone Editor for the desired domain, click the "Add Record" button or select "MX Record" from the drop-down list.
- Fill in the required fields:
- Priority: Specify the priority for the mail server. The lower the number, the higher the priority. Usually a value of 0, 10, or 20 is used.
- Destination: Enter the fully qualified domain name of the mail server (e.g., mail.example.com or aspmx.l.google.com).
- TTL: Specify the TTL (Time to Live) value. The default value is usually used.
- Click the "Add Record" button to save the record.
| Field | Value |
|---|---|
| Priority | 10 |
| Destination | mail.example.com |
| TTL | 14400 |
| Priority | Destination |
|---|---|
| 1 | aspmx.l.google.com |
| 5 | alt1.aspmx.l.google.com |
| 5 | alt2.aspmx.l.google.com |
| 10 | aspmx2.googlemail.com |
| 10 | aspmx3.googlemail.com |
Creating and Editing CNAME Records
A CNAME record (Canonical Name Record) creates an alias for an existing domain name. It allows you to direct one domain or subdomain to another domain. When to use CNAME records:
- Directing a subdomain to the main domain (e.g., www.your_domain to your_domain).
- Directing a subdomain to another subdomain.
- Integrating with third-party services that provide domain names to access their services (e.g., CDN).
- In the Zone Editor for the desired domain, click the "Add Record" button or select "CNAME Record" from the drop-down list.
- Fill in the required fields:
- Name: Specify the subdomain for which you are creating the CNAME record (e.g., www or blog).
- Target: Enter the domain name you want to direct traffic to (e.g., your_domain or another_subdomain.your_domain).
- TTL: Specify the TTL (Time to Live) value. The default value is usually used.
- Click the "Add Record" button to save the record.
| Field | Value |
|---|---|
| Name | www |
| Target | example.com |
| TTL | 14400 |
| Field | Value |
|---|---|
| Name | blog |
| Target | yourblog.blogplatform.com |
| TTL | 14400 |
| Field | Value |
|---|---|
| Name | cdn |
| Target | cdn.example.cdnprovider.com |
| TTL | 14400 |
Expert Tip: Use CNAME records to simplify DNS management. If the IP address of the server pointed to by the CNAME record changes, you only need to change the A record for the target domain, and all CNAME records will automatically update.
Adding TXT Records for Verification
TXT records (Text Records) contain text information that can be used for various purposes, including domain verification, SPF (Sender Policy Framework), and DKIM (DomainKeys Identified Mail). When to use TXT records:
- Domain verification in Google Search Console, Bing Webmaster Tools, and other services.
- Creating an SPF record to protect against email spoofing.
- Creating a DKIM record for digital signing of emails.
- Confirming domain ownership for various online services.
- In the Zone Editor for the desired domain, click the "Add Record" button or select "TXT Record" from the drop-down list.
- Fill in the required fields:
- Name: Specify the domain name or subdomain for which you are creating the TXT record. Usually it is "@" for the root domain or the name of the subdomain.
- Record: Enter the text string provided to you by the service requiring domain verification.
- TTL: Specify the TTL (Time to Live) value. The default value is usually used.
- Click the "Add Record" button to save the record.
| Field | Value |
|---|---|
| Name | @ |
| Record | google-site-verification=rVeWzT6Hw-zRt3q9b8hGv4Xm8x_3yW7zQ7q2aF |
| TTL | 14400 |
| Field | Value |
|---|---|
| Name | @ |
| Record | v=spf1 mx a ip4:192.168.1.1 include:_spf.google.com ~all |
| TTL | 14400 |
| Field | Value |
|---|---|
| Name | default._domainkey |
| Record | v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD... |
| TTL | 14400 |
Scale Your Project: Powerful Cloud Instances for cPanel
When your project outgrows a VPS, cloud instances offer unparalleled scalability and performance.
Start with Cloud →