ENHEIT

payless.host

DNS explained: A records, MX records and nameservers

Updated Nov 22, 2026

What DNS does

DNS translates domain names into addresses computers can use. When someone types your domain into a browser, DNS directs them to the server where your site lives. When email arrives at your domain, DNS routes it to your mail server.

You control DNS through your domain registrar or hosting provider. Changes take time to spread — usually minutes, sometimes hours.

The three record types that matter

A records point your domain to a web server. An A record maps a domain name to an IP address in the format 192.0.2.1. Most sites need two: one for the bare domain (example.com) and one for www (www.example.com), both pointing to the same address.

MX records direct email. They point to mail servers by hostname, not IP address, and carry a priority number. Lower numbers are tried first. A domain can list several MX records as backups.

Nameservers determine which DNS system answers queries about your domain. Changing nameservers hands DNS control to a different provider entirely — hosting companies often require this to manage your records themselves.

How to add an A record

Log into your domain registrar or DNS provider. Find DNS settings, DNS management, or DNS records. The location varies; look for "Advanced DNS" or "Manage DNS."

Click Add Record or the equivalent. Select A Record from the type dropdown.

In the Host field, enter @ for the bare domain or www for the www version. Some interfaces use a blank field instead of @.

Paste the IP address your hosting provider gave you into the Value or Points To field. Set TTL (time to live) to 3600 or leave it at default.

Save. The record becomes visible within an hour, though full propagation can take longer.

What goes wrong: Typing the IP address incorrectly is the usual error. Copy it; do not retype it. Adding the A record to the wrong domain happens when you manage several — double-check the domain name at the top of the page.

How to check it worked: Wait ten minutes, then visit your domain in a browser. If the site does not load, wait another hour. To confirm the A record exists, use a DNS lookup tool such as whatsmydns.net and search for your domain. The IP address should appear in the results.

How to add an MX record

In the same DNS management area, click Add Record and select MX Record.

Leave the Host field blank or enter @. In the Mail Server field, enter the hostname your email provider gave you — usually something like mail.example.com or mx1.emailprovider.com.

Set the priority. If you are adding one MX record, use 10. If your email provider supplied several records with different priorities, enter them exactly as given.

Save. Email routing updates within a few hours.

What goes wrong: Entering an IP address instead of a hostname breaks the record — MX records do not accept IP addresses. Adding an MX record without updating or removing old ones can split email between two systems.

How to check it worked: Send a test email to an address at your domain from an outside account. It should arrive. For confirmation, use an MX lookup tool and search for your domain. The mail server hostname should appear with its priority number.

How to change nameservers

Nameserver changes move DNS control. You will usually do this when starting with a new hosting provider that manages DNS for you.

Your hosting provider will give you two to four nameserver addresses, such as ns1.hostingprovider.com and ns2.hostingprovider.com. Copy them.

Log into your domain registrar — the company where you registered the domain, which may not be your hosting provider. Namecheap is a common registrar; Hostinger offers both registration and hosting.

Find Nameservers, Name Server Settings, or DNS Settings. Click Change or Edit.

Select Custom Nameservers if prompted. Paste in the nameservers your hosting provider gave you, one per field. Remove any old nameserver entries.

Save. Changes take four to forty-eight hours to complete, though your site may respond sooner.

What goes wrong: Changing nameservers before your hosting account is ready means your site goes offline until DNS catches up. Set up hosting first, then switch nameservers. Entering nameservers in the wrong order usually does not matter, but enter them exactly as supplied.

How to check it worked: After a few hours, use a nameserver lookup tool and search for your domain. The results should list the new nameservers. Visit your site — it should load from the new host. Old DNS answers may linger in some locations for a day or more; that is normal.

When DNS changes do not appear

DNS changes propagate at different speeds across the internet. Your device may cache old DNS answers for hours. To see current DNS data, use an online lookup tool rather than relying on your own browser.

If a record still does not appear after twenty-four hours, log back into DNS settings and confirm the record was saved. A trailing dot, an extra space, or a typo in the hostname will cause the record to fail silently.

Changing nameservers overwrites all DNS records. If you set up A records or MX records at your registrar, then switch nameservers to your hosting provider, those records vanish unless you recreate them at the new DNS provider.

The providers in this article