A DNS record is an instruction stored on a nameserver that tells the internet where to send traffic for your domain: which server to load your website from, where to deliver your email, or how to verify that you own the domain for a third-party service. If you're connecting a new app, setting up email with an outside provider, or verifying a domain for a service like Google Workspace, you'll usually be asked to add or edit a DNS record yourself.
Common DNS record types
- A record: points a domain or subdomain to a specific server IP address. Used for your main website or a subdomain like shop.yourdomain.co.ke.
- CNAME record: points a subdomain to another domain name instead of an IP address. Common for things like www pointing to your root domain, or connecting third-party tools.
- MX record: tells the internet which mail server handles email for your domain. Changing this affects where your incoming email is delivered.
- TXT record: holds text-based information, most often used to verify domain ownership or to set up email authentication (SPF, DKIM) for services outside your hosting.
Only add or edit a DNS record if you know what it's for. Removing or changing an MX record incorrectly can stop your email from arriving, and an incorrect A or CNAME record can take your website offline.
Before you begin
This only works if your domain's nameservers are already pointed to your hosting account. If you're not sure, check your domain's current nameservers first. If your domain uses nameservers from elsewhere, you'll need to manage DNS records wherever those nameservers are hosted instead.
How to add or edit a DNS record
In cPanel
- Log in to your hosting control panel.
- Click Zone Editor under the Domains section.
- Find your domain in the list and click Manage.
- To add a new record, click Add Record and choose the record type (A, CNAME, MX, or TXT) from the tabs at the top.
- Fill in the required fields. For an A record, enter the subdomain (or @ for the root domain) and the destination IP address. For a CNAME, enter the subdomain and the target domain. For an MX record, enter the priority and the mail server address. For a TXT record, paste the exact value given to you by the third-party service.
- Click Add Record to save.
- To edit an existing record instead, find it in the list and click Edit, update the value, then click Save.
In DirectAdmin
- Log in to your hosting control panel.
- Click DNS Management (sometimes listed as DNS Control) under the Domains section.
- Select the domain you want to update.
- To add a new record, choose the record type (A, CNAME, MX, or TXT) from the add-record options on the page.
- Fill in the name (subdomain or @ for the root domain) and the value: an IP address for an A record, a target domain for a CNAME, a mail server and priority for an MX record, or the exact text string for a TXT record.
- Click Add to save the new record.
- To edit an existing record, click on it in the list, update the value, then click Save or Change.
DNS changes aren't instant. If you don't see the change take effect right away, see how long DNS changes take to propagate before assuming something went wrong.