DNS Records Explained: Point Your Domain to Hosting
DNS records explained in plain English: A, AAAA, CNAME, MX, TXT and nameservers, how to point your domain to hosting, and how to fix common DNS mistakes.

With DNS records explained in one sentence: they are the instructions that tell the internet where your domain's website, email and verification files live. When someone types yourcompany.com, DNS looks up those records and sends the visitor to the right server in a fraction of a second. If a record is wrong or missing, your site does not load, even when the hosting itself works perfectly.
You do not need to be a network engineer to manage DNS. Most business owners only ever touch a handful of record types, usually when they launch a site, switch hosting or verify a service such as Google Search Console. This guide explains each one and shows how to point a domain to hosting without downtime.
How DNS works in plain English
Think of DNS as the internet's address book. People remember names; computers connect to numeric IP addresses such as 203.0.113.10. DNS translates one into the other.
When a visitor opens your site, four things happen:
- The browser asks a resolver (usually run by the internet provider) for the address of your domain.
- The resolver asks the root servers, then the servers for the extension, such as
.comor.online. - Those servers point to your domain's authoritative nameservers, which hold your actual records.
- The nameserver answers with the right IP address, and the browser connects to your hosting server.
The answer is then cached for a while, so the next visitor gets it even faster. That caching is useful, but it is also why DNS changes are not always visible immediately.
Nameservers: who is in charge of your DNS
Before you edit any record, find out where your DNS is actually managed. Your domain has a set of nameservers (for example ns1.example-dns.com and ns2.example-dns.com), and only the records stored there count.
This is the most common source of confusion. Owners edit records at their registrar while the nameservers point somewhere else, such as an old host or a CDN provider, and nothing changes. A quick rule:
- If the nameservers belong to your hosting provider, records are managed by the host.
- If they belong to your registrar, edit records in the registrar's DNS settings.
- If they belong to a third party such as a CDN, edit records there.
You can check your current nameservers with any free online "NS lookup" tool.
The main DNS records explained
You will meet the same small set of records again and again. Here is what each does and when you use it.
| Record | What it does | Typical value | When you use it |
|---|---|---|---|
| A | Points a name to an IPv4 address | 203.0.113.10 |
Connecting your domain to your hosting server |
| AAAA | Points a name to an IPv6 address | 2001:db8::10 |
Only if your server provides an IPv6 address |
| CNAME | Makes one name an alias of another name | yourcompany.com |
Pointing www to the main domain, or to a service |
| MX | Says which servers receive email for the domain | mail.provider.com with a priority |
Setting up email with your email provider |
| TXT | Holds text used for verification and email security | google-site-verification=... |
Search Console, SPF, DKIM, DMARC, domain ownership checks |
| NS | Lists the authoritative nameservers | ns1.example-dns.com |
Delegating DNS to a provider |
A few details matter in practice:
- The
@symbol means the root domain itself (yourcompany.com), whilewwwis a separate name that needs its own record. - A CNAME cannot sit on the root domain alongside other records, which is why the root normally uses an A record and
wwwuses a CNAME. - MX records point to your email provider, not your website host. Changing hosting should not change them unless your email moves too.
- TXT records stack: you can have several, but only one SPF record (
v=spf1 ...) per domain.
How to point your domain to hosting
There are two clean ways to point a domain to hosting. Pick one, not both.
Option 1: Change the nameservers
Set the domain's nameservers to the ones your host gives you. From then on, the host's DNS answers for the domain. This is the simplest choice for a new domain with no other services attached.
Before switching, copy any existing records you still need, especially MX and TXT records for email and verifications. Records at the old DNS provider stop applying once the nameservers change.
Option 2: Keep your DNS and edit the records
Keep the current nameservers and change only what the website needs:
- Set the A record for
@to your hosting server's IP address. - Set
wwwas a CNAME toyourcompany.com(or an A record with the same IP). - Remove old A or AAAA records that still point to the previous server.
- Leave MX and TXT records untouched unless your email provider asks you to change them.
This option is best when your domain already runs email or other services you do not want to disturb.
If you have not registered a domain yet, our guide on how to buy a domain name covers choosing a name and extension first.
TTL and DNS propagation
Every record has a TTL (time to live), measured in seconds. It tells resolvers how long they may cache the answer. A TTL of 3600 means up to one hour.
This is what people call "DNS propagation". Nothing is actually spreading; caches around the world are simply waiting for old answers to expire. Nameserver changes can take longer, sometimes up to 24–48 hours, although most updates are visible within minutes to a few hours.
To make a planned move smoother:
- Lower the TTL to
300(five minutes) a day before the change. - Make the change, then confirm the new site works.
- Raise the TTL back to
3600or more once everything is stable.
Common DNS mistakes and how to fix them
| Symptom | Likely cause | Fix |
|---|---|---|
Site works on www but not without it |
No A record for @ |
Add an A record for the root domain |
| Old website still appears | Old A or AAAA record, or cached answer | Remove stale records, wait for TTL, clear browser cache |
| SSL certificate will not issue | Domain does not point to the server yet | Check the A record, then wait for the certificate to retry |
| Email stopped after moving hosting | MX records lost when nameservers changed | Re-create the MX and TXT records from your email provider |
| Records changed but nothing happens | Editing DNS at the wrong provider | Check nameservers and edit records where they point |
The SSL issue deserves special attention. Free automatic certificates are issued only after the domain resolves to the right server, so fix DNS first and HTTPS usually follows on its own. Our free SSL certificate guide explains the process in more detail.
How SafaHost fits in
At SafaHost you can register .com, .net, .online, .ai, .io, .org, .co, .store and .tech domains, with a discount when you bundle three, and see current prices in OMR on the domains page.
Once your domain points to your hosting, every plan includes a free, automatically renewing SSL certificate. Linux web hosting and WordPress hosting on European servers are activated automatically within minutes after payment, and Oman Web Hosting on servers in Muscat is set up within one working day. If you get stuck, our support team answers tickets and email in Arabic and English.
Frequently asked questions
How long do DNS changes take?
Most record changes appear within minutes to a few hours, depending on the TTL of the old record. Nameserver changes can take up to 24–48 hours to be seen everywhere, though they are often much quicker.
Should I use an A record or a CNAME?
Use an A record for the root domain, because it points directly to an IP address. Use a CNAME for subdomains such as www when you want them to follow another name automatically.
Will changing hosting affect my email?
Not if you keep your MX and email-related TXT records. Problems usually happen when nameservers are switched and those records are not copied to the new DNS provider.
What is a TXT record used for?
TXT records hold short text values, mostly for proving you own a domain (for example to Google Search Console) and for email security standards such as SPF, DKIM and DMARC.
Why does my site show a security warning after moving?
The SSL certificate is usually issued only after the domain points to the new server. Check that the A record is correct, wait for the change to take effect, and the certificate normally activates on its own.
Keep reading
How to Buy a Domain Name: A Practical Guide for Oman
Learn how to buy a domain name the right way: pick an extension, check availability and trademarks, register safely and avoid renewal surprises later.
Website Migration: How to Move to a New Host Without Downtime
A step-by-step website migration guide: back up files and databases, copy them over SFTP, test before switching DNS, and move to a new host without downtime.
SEO for Small Business in Oman: A Practical Starter Guide
A practical guide to SEO for small business in Oman: keywords in Arabic and English, Google Business Profile, on-page basics, speed, SSL and tracking results.
