Web HostingPublished on December 10, 20258 min read

Create and manage your DNS records on cPanel

DNS records tell the internet where your domain's website, email and other services live. On OuiHeberg web hosting, you can create and manage your DNS records in the client area or in cPanel, with the Zone Editor. This guide covers both, then the syntax of each type, from common ones (A, CNAME, MX, TXT) to advanced ones (AAAA, SRV, CAA).

The zone only applies if your domain uses the OuiHeberg nameservers, ns1.ouiheberg.com to ns4.ouiheberg.com. If it points to another provider, its records are managed with that provider.


Edit the DNS zone in the client area

The hosting page has a DNS zone tab. It is part of Expert Mode and shows a padlock until that mode is on.

  1. Log in to dash.ouiheberg.com. In the left menu, click My Services, then your hosting plan.

  2. Click the DNS zone tab. The Expert Mode window opens.

  3. Click Enable expert mode. The Later button closes the window without changing anything.

  4. The tab is now unlocked. The Add button creates a record.

Expert Mode window shown when clicking the DNS zone tab of the hosting

The guide How to edit the DNS records of your domain covers adding, editing and deleting a record in the client area, with the role of A, CNAME, MX and TXT records and the ready-made templates (Google Workspace, Microsoft 365, Shopify). Expert Mode itself is described in OuiHeberg Expert Mode.


Open the cPanel Zone Editor

  1. On the hosting page, click Advanced panel at the top right. cPanel opens straight away, with no login details to type.

  2. In the Domains section, click Zone Editor. You can also type "zone" in the Search Tools bar.

The page lists your domains. Each line has three quick-add buttons, + A Record, + CNAME Record and + MX Record, and a Manage button that opens all the domain's records.

cPanel Zone Editor with a domain, its quick-add buttons and Manage


Add a record

For an A, CNAME or MX record, the quick-add button in the list is enough. For other types, go through the domain's page.

  1. Click Manage next to the domain.

  2. Click Add Record. The arrow to the right of the button lets you pick the type straight away.

  3. An empty line appears at the top of the table. Fill in Name, TTL, Type and Record.

  4. Click Save Record. Cancel drops the entry.

In Name, type only the subdomain, such as blog. cPanel completes it as blog.mysite.com.. The suggested TTL is 14400, which is four hours. The fields under Record change with the type: an address for an A record, a priority and a destination for an MX record, a text for a TXT record.

Adding a TXT verification record in the cPanel Zone Editor

A change does not show up everywhere at the same moment. Propagation usually takes under an hour, sometimes up to 48 hours depending on providers.


Edit or delete a record

At the top of the domain's page, the line "Configured nameservers for this zone" shows the zone's nameservers. The All, A, CNAME, MX, SRV and TXT filters narrow the list to one type.

Each line has an Edit button, which opens the line for editing, and a Delete button, which asks for confirmation.

A records of a domain in the Zone Editor with Edit and Delete

Your website and email depend on the A, MX and TXT records of the main domain. Write down a record's value before you edit or delete it, so you can put it back.


A, CNAME, MX and TXT records

The role of these four types is explained in the guide How to edit the DNS records of your domain. Here is their syntax, in zone file format. In the Zone Editor, each column of these lines matches a field.

A record

It points a name to an IPv4 address, for example the domain and its subdomains to the hosting address.

; The root domain points to the server
mysite.com.         14400   IN   A   203.0.113.10
; A subdomain points to the same server
blog.mysite.com.    14400   IN   A   203.0.113.10

Set up a CNAME record

A CNAME makes a name an alias of another name. It keeps a subdomain in step when the target's address changes.

; www.mysite.com follows mysite.com
www.mysite.com.     14400   IN   CNAME   mysite.com.
; A subdomain pointing to an external service
shop.mysite.com.    14400   IN   CNAME   shops.myshopify.com.

Two rules apply. A CNAME cannot share its name with any other record. It cannot be set on the root domain (@) either.

MX record

It names the servers that receive the domain's email. The lower the priority number, the higher the preference.

; A single mail server
mysite.com.    14400   IN   MX   10   mail.mysite.com.
; A main server and a backup server
mysite.com.    14400   IN   MX   10   mail1.mysite.com.
mysite.com.    14400   IN   MX   20   mail2.mysite.com.

For Microsoft 365, use the MX value shown in the Microsoft admin center, in the form mysite-com.mail.protection.outlook.com, with priority 0. For Google Workspace, see the example further down.

Is your email handled by an external service? In cPanel, open Email Routing and check that the domain uses a remote mail exchanger. Otherwise, messages sent from the hosting to your domain, such as those from your site's forms, stay on the hosting.

TXT record

It holds text: an SPF rule, a DKIM key, a DMARC policy or a verification code.

; SPF: servers allowed to send for the domain
mysite.com.                       14400   IN   TXT   "v=spf1 include:_spf.google.com ~all"
; DKIM: public signing key
google._domainkey.mysite.com.     14400   IN   TXT   "v=DKIM1; k=rsa; p=MIGfMA0GCS..."
; DMARC: what to do with messages that fail
_dmarc.mysite.com.                14400   IN   TXT   "v=DMARC1; p=quarantine; rua=mailto:dmarc@mysite.com"
; Domain ownership verification
mysite.com.                       14400   IN   TXT   "google-site-verification=abc123..."

To set up SPF, DKIM and DMARC step by step, follow How to configure SPF, DKIM, and DMARC on cPanel.


Advanced AAAA, SRV and CAA records

AAAA record

It is the IPv6 equivalent of an A record.

mysite.com.    14400   IN   AAAA   2001:db8::10

SRV record

It tells where to reach a specific service, such as voice over IP or instant messaging. Its name follows the _service._protocol form.

FieldRoleExample
Nameservice and protocol_sip._tcp
Priorityorder of preference, lowest first10
Weightshare between servers of the same priority60
Portservice port5060
Targetserver that provides the servicesip.mysite.com
; _service._proto.name   TTL   class   SRV   priority weight port target
_sip._tcp.mysite.com.    14400   IN   SRV   10 60 5060 sip.mysite.com.

CAA record

It states which certificate authorities may issue an SSL certificate for the domain. The flag is usually 0. The tag is issue, issuewild (wildcard certificates) or iodef (alert address).

; Allow Let's Encrypt
mysite.com.    14400   IN   CAA   0 issue "letsencrypt.org"
; Allow Let's Encrypt for wildcard certificates
mysite.com.    14400   IN   CAA   0 issuewild "letsencrypt.org"
; Address notified when a request is refused
mysite.com.    14400   IN   CAA   0 iodef "mailto:ssl@mysite.com"

If you add a CAA record, also allow the authority that issues the hosting's free certificates. Otherwise, their renewal will fail. If in doubt, open a ticket before adding this type.

Nameservers (NS) and reverse DNS (PTR)

The zone's NS records name its nameservers. cPanel shows them at the top of the domain's page but does not let you change them.

mysite.com.    86400   IN   NS   ns1.ouiheberg.com.
mysite.com.    86400   IN   NS   ns2.ouiheberg.com.
mysite.com.    86400   IN   NS   ns3.ouiheberg.com.
mysite.com.    86400   IN   NS   ns4.ouiheberg.com.

A PTR record, or reverse DNS, links an IP address to a name. It is set in the IP address's zone, not in the domain's. On web hosting, the address is shared by several sites and its PTR cannot be changed.


Practical examples

Website and email on the hosting

; === Website ===
mysite.com.            14400   IN   A       203.0.113.10
www.mysite.com.        14400   IN   CNAME   mysite.com.

; === Email ===
mysite.com.            14400   IN   MX      10 mail.mysite.com.
mail.mysite.com.       14400   IN   CNAME   mysite.com.
mysite.com.            14400   IN   TXT     "v=spf1 mx a ~all"
_dmarc.mysite.com.     14400   IN   TXT     "v=DMARC1; p=none; rua=mailto:postmaster@mysite.com"

; === Certificates ===
mysite.com.            14400   IN   CAA     0 issue "letsencrypt.org"

Shop hosted on Shopify

mysite.com.            14400   IN   A       23.227.38.65
www.mysite.com.        14400   IN   CNAME   shops.myshopify.com.

Email with Google Workspace

; Google's incoming mail server
mysite.com.    14400   IN   MX    1   smtp.google.com.
; SPF for Google
mysite.com.    14400   IN   TXT   "v=spf1 include:_spf.google.com ~all"

Domains set up before 2023 often use five MX servers (aspmx.l.google.com and its four backups). They still work. Use the values shown in your Google Workspace console.


Troubleshooting

My DNS changes are not working

  1. Check that the domain uses ns1.ouiheberg.com to ns4.ouiheberg.com.

  2. Check the public answer with our DNS lookup tool.

  3. Give propagation time, usually under an hour, sometimes up to 48 hours.

  4. Clear your computer's DNS cache with the command for your system.

On Windows:

ipconfig /flushdns

On macOS:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

On Linux (systemd-resolved):

sudo resolvectl flush-caches

Test a record

The dig command (Linux, macOS) queries DNS servers. On Windows, nslookup does the same job.

# A record
dig mysite.com A
# MX record
dig mysite.com MX
# TXT record
dig mysite.com TXT
# Answer from a public resolver
dig @8.8.8.8 mysite.com A
# Answer from our nameservers, without waiting for propagation
dig @ns1.ouiheberg.com mysite.com A
# Windows equivalent
nslookup -type=MX mysite.com

"CNAME and other data" error

This error appears when a CNAME is created on a name that already has another record. Delete the other record first, or pick another name for the CNAME.


Need help?

Open a ticket from Tickets › Open a ticket (dash.ouiheberg.com/tickets/new), or click the Contact support tile at the bottom of your hosting page. You can also ask your question on our Discord.

Was this article helpful?

512 views
Share this article
Hébergement web
Need web hosting?

cPanel hosting with email accounts and databases, managed from the OuiHeberg client area.

View plans →
Hébergement web
Need web hosting?

cPanel hosting with email accounts and databases, managed from the OuiHeberg client area.

View plans →

Related Articles