+254725682556 +254725052660 info@ziprof.co.ke
Client Area

DNS - Nameserver

How to Add or Edit DNS Records (A, CNAME, MX, and TXT Records)

DNS records tell the internet where to send traffic for your domain: which server hosts your website, which server handles your email, and which services are allowed to send email on your behalf. You'll usually need to add or edit one when you connect a subdomain to a new app, set up a third-party email or verification service, or troubleshoot email deliverability. This guide covers the most common record types and how to manage them in both cPanel and DirectAdmin.

The Common DNS Record Types

Most day-to-day changes involve one of these four record types:

  • A record: points a domain or subdomain to a server's IPv4 address (e.g. pointing app.yourdomain.co.ke to a specific server).
  • CNAME record: points a subdomain to another domain name instead of an IP address (common for services like a help desk or a subdomain hosted elsewhere).
  • MX record: tells the internet which mail server handles email for your domain, and in what priority order.
  • TXT record: holds text-based verification or policy information, most often used for domain ownership verification and email authentication (SPF records, for example).
Changing DNS records does not happen instantly everywhere at once. Give changes anywhere from a few minutes up to 24 hours to fully propagate before assuming something is wrong.

In cPanel

  1. Log in to cPanel.
  2. Under the Domains section, click Zone Editor.
  3. Find the domain you want to update and click Manage.
  4. To add a record, click Add Record and choose the record type (A, CNAME, MX, or TXT).
  5. Fill in the Name field (the subdomain or @ for the root domain), the record value (an IP address for an A record, a domain for a CNAME, a mail server and priority for an MX record, or text for a TXT record), and the TTL (you can usually leave this at the default).
  6. Click Add Record to save it.
  7. To edit an existing record, find it in the zone list and click Edit, make your change, then click Save Record.
  8. To remove a record, click Delete next to it and confirm.

In DirectAdmin

  1. Log in to DirectAdmin.
  2. Go to Domain Setup (or open your domain and select it from the domain list).
  3. Click DNS Management (sometimes labeled DNS Control) for the domain you want to update.
  4. To add a record, choose the record type (A, CNAME, MX, or TXT) from the add-record section.
  5. Enter the hostname (the subdomain or leave blank for the root domain), the value (an IP address, target domain, mail server with priority, or text string depending on the type), and the TTL if prompted.
  6. Click Add to save the record.
  7. To edit a record, update the value directly in the list next to the existing entry and click Save or Change.
  8. To remove a record, tick the checkbox next to it and click Delete.

A Few Practical Examples

Pointing a subdomain to another server

If you're launching an app or service on a subdomain like shop.yourdomain.co.ke, you'll usually add either an A record (if you have an IP address to point to) or a CNAME record (if the provider gives you a hostname to point to instead).

Fixing email that isn't arriving

If email to your domain isn't arriving at all, check that your MX record points to the correct mail server and that no old or conflicting MX record is still active from a previous setup.

Improving email deliverability

If your outgoing email is landing in recipients' spam folders, adding an SPF TXT record that lists which servers are allowed to send mail for your domain can help. Your email provider will give you the exact text value to use.

Common Mistakes to Avoid

  • Leaving an old A or MX record in place after moving to a new host or mail provider, which causes traffic or email to split between the old and new server.
  • Entering a trailing dot or extra space in a hostname or value by mistake, which can make the record invalid.
  • Forgetting to set MX priority correctly when you have more than one mail server listed; lower numbers are tried first.

If you're setting up DNS records as part of moving your domain to a new host entirely, see How to Point Your Domain to a New Host for the bigger picture.