You bought a domain, signed up for hosting and set up business email, and now someone tells you to "add an MX record" or "point the A record". For many website owners in Uganda this is where confusion begins. This guide gives you DNS records explained in simple terms, focusing on the four you will meet most often: A, CNAME, MX and TXT.
What DNS does
DNS stands for Domain Name System. Think of it as the internet's phone book. People remember names like yourshop.co.ug, but computers find each other using numerical IP addresses. DNS translates the name into the right address so that browsers and mail servers know where to go.
Every domain has a set of DNS records stored on its nameservers. The nameservers are chosen at your domain registrar. If your domain uses your hosting company's nameservers, you manage DNS records in your hosting control panel (in cPanel, look for the Zone Editor). If it uses your registrar's or a service like Cloudflare, you manage them there. A very common mistake is editing records in one place while the domain actually uses nameservers somewhere else, so check this first.
The parts of a DNS record
Each record has a few fields. Once you understand them, any DNS screen makes sense.
- Name (or Host): which part of the domain the record applies to. The symbol @ usually means the main domain itself. "www" means www.yourshop.co.ug, and "shop" would mean shop.yourshop.co.ug.
- Type: A, CNAME, MX, TXT and so on.
- Value (or Points to, Target, Data): where the record points, such as an IP address or another domain name.
- TTL (Time To Live): how long, in seconds, other servers may remember the record before checking again. A lower TTL means changes spread faster.
- Priority: used only by MX records, to set the order in which mail servers are tried.
A records: pointing your domain to a server
An A record links a name to an IPv4 address, the familiar four numbers separated by dots. It is the record that tells browsers which server holds your website.
Example: Name @, Type A, Value 192.0.2.10. This means visitors to yourshop.co.ug are sent to the server at 192.0.2.10.
When to use it:
- When moving your website to a new host, you update the A record to the new server's IP address, which the host provides.
- When pointing a subdomain, such as portal.yourschool.ac.ug, to a different server from the main website.
There is also an AAAA record, which does the same job for the longer IPv6 addresses. If your host gives you an IPv6 address, you can add one alongside the A record.
CNAME records: one name pointing to another
A CNAME record (Canonical Name) says "this name is an alias for that other name". Instead of an IP address, it points to another domain name, and DNS then looks up that name's address.
Example: Name www, Type CNAME, Value yourshop.co.ug. Now www.yourshop.co.ug follows wherever the main domain points. If you change the main A record later, www follows automatically.
Common uses include:
- Pointing www to the main domain.
- Connecting a subdomain to an outside service, such as an online store platform, email marketing tool or help desk, which will give you the exact target to use.
- Verifying domain ownership for some services.
Two rules to remember. First, a name with a CNAME record should not have any other records of the same name. Second, you normally cannot put a CNAME on the bare main domain (@), because the root needs other records such as MX and NS. Some DNS providers offer workarounds called CNAME flattening or ALIAS records.
MX records: where your email is delivered
MX records (Mail Exchanger) tell the world which servers receive email for your domain. When someone sends a message to info@yourshop.co.ug, their mail server looks up your MX records to know where to deliver it.
Example: Name @, Type MX, Priority 10, Value mail.yourshop.co.ug.
Key points:
- The value must be a hostname, not an IP address, and that hostname must itself have an A record.
- Lower priority numbers are tried first. Additional MX records with higher numbers act as backups.
- If you use your hosting company's email, keep the MX records they provide. If you switch to Google Workspace or Microsoft 365, replace the MX records with the exact values they give you and remove the old ones, otherwise mail may be split between two systems.
- In cPanel, also check the Email Routing setting. It should be set to local if your email is hosted on the same server, and remote if it is hosted elsewhere.
Mistakes with MX records are the most common reason a business suddenly stops receiving email after a website move, so double check them whenever you change hosting.
TXT records: verification and email security
A TXT record holds text. That sounds simple, but TXT records do important work.
Domain verification
Services such as Google Search Console, Microsoft 365 and Facebook Business may ask you to add a TXT record with a unique code to prove you own the domain.
SPF
An SPF record lists which servers are allowed to send email for your domain. It starts with v=spf1 and ends with a rule such as ~all or -all. You must have only one SPF record per domain, so if you add a new email service, merge its entry into your existing record rather than creating a second one.
DKIM
DKIM adds a digital signature to outgoing mail. Your email provider gives you a TXT record (often on a name like default._domainkey) containing a public key. Receiving servers use it to check that messages were not altered and really came from you.
DMARC
A DMARC record, placed on the name _dmarc, tells receiving servers what to do with messages that fail SPF and DKIM checks, and where to send reports. Many organisations start with a monitoring policy and tighten it once they are sure legitimate mail passes.
Together, SPF, DKIM and DMARC help your emails reach inboxes instead of spam folders and make it harder for scammers to send fake messages pretending to be your business.
Making DNS changes safely
- Take a screenshot or export of your current records before changing anything.
- Change one thing at a time and test.
- Lower the TTL a day before a planned move so the change spreads faster, then raise it again afterwards.
- Be patient. Changes can take from a few minutes to many hours to be seen everywhere, depending on TTL and caching.
- Use online DNS lookup tools to check what the world sees for your domain.
Frequently asked questions
Why is my website still showing the old host after I changed the A record?
Your device or network may still have the old record cached. Wait for the TTL to pass, clear your browser cache or test using mobile data instead of WiFi.
Can my website and email be with different providers?
Yes. The A record can point to your web host while MX records point to your email provider.
How many SPF records can I have?
Only one. Multiple SPF records cause checks to fail, so combine all senders into a single record.
Conclusion
Once you know that A records point to servers, CNAMEs create aliases, MX records direct email and TXT records handle verification and email security, DNS stops being mysterious. Make careful changes, keep a backup of your records and test as you go. If your domain and hosting are with Baasa Cloud, you can manage these records in cPanel's Zone Editor, and our team is happy to check them with you.