DNS stands for “Domain Name System”. It’s a system that lets you connect to websites by matching human-readable domain names (like wpbeginner.com) with the unique ID of the server where a website is stored.
Think of the DNS system as the internet’s phonebook. It lists domain names with their corresponding identifiers called IP addresses, instead of listing people’s names with their phone numbers. When a user enters a domain name like wpbeginner.com on their device, it looks up the IP address and connects them to the physical location where that website is stored.

How Does DNS Work?
The internet is a giant network of computers. Each device connected to the internet is assigned a unique IP address, which helps other computers identify it.
This IP address is a string of numbers with periods that looks like this: 192.124.249.166
Now imagine if you had to remember such long strings of numbers to visit your favorite websites. They are hard to remember and don’t tell you anything about the website you’ll see if you enter them in a browser.
Domain names were invented to solve this problem by using alphabets and allowing users to select easy to remember names for their websites.
DNS or Domain Name System basically translates those domain names into IP addresses and points your device in the right direction.
A domain name and its matching IP address is called a “DNS record”.
Here is a simple way to understand how DNS works in four steps.
Suppose you want to visit our site at www.wpbeginner.com.
1. You open your browser and type www.wpbeginner.com in the address bar and hit Enter on the keyboard. Immediately, there is a quick check to see if you have visited our website previously.
If the DNS records are found in your computer’s DNS cache, then the rest of the DNS lookup is skipped, and you will be taken directly to www.wpbeginner.com.
2. If no DNS records are found, then a query is sent to your local DNS server. Typically, this is your Internet provider’s server and is often called a “resolving nameserver”.
3. If the records are not cached on the resolving nameserver, then the request is forwarded to what’s called a “root nameserver” to locate the DNS records. Root nameservers are designated servers around the world that are responsible for storing DNS data and keeping the system working smoothly. Once the DNS record is found on the root nameserver, it’s cached by your computer.
4. Now that the DNS records are located, a connection to the server where the website is stored will be opened and www.wpbeginner.com will be displayed on your screen.

For more details, see our beginner’s guide on how domain names work.
What is a Name Server?
The internet is possible because of a network of computers called servers. A server is a type of computer that’s dedicated to storing and delivering websites to other computers around the world.
A name server, sometimes spelled “nameserver”, is a special type of server that keeps all the DNS records of your domain name. Its job is to provide your DNS information to anyone requesting it.
Nameservers are typically managed by your domain name registrar or hosting provider.
Each nameserver has its own address and can store the records of many websites. For example, if your website is hosted on Bluehost then the name server used to manage your DNS records will be on nameservers with addresses that look like this:
NS1.bluehost.com
NS2.bluehost.com
NS3.bluehost.com
Each domain name must have at least two nameservers. The first nameserver is the primary server. If the primary server does not respond, then the secondary nameserver is used to resolve the domain name.
Some WordPress hosting providers also allow users to get their own private nameservers. For example, at WPBeginner we use our own private nameserver.
NS0.WPBEGINNER.COM
NS1.WPBEGINNER.COM
NS2.WPBEGINNER.COM
NS3.WPBEGINNER.COM
NS4.WPBEGINNER.COM
How to Change Your Nameservers
The best thing about the DNS system is that it allows website owners to move their websites without changing their domain names.
The best domain registrars usually provide domain owners with easy tools to manage their nameservers.
Ideally, it would be best if you register your domain with your hosting provider. Using your own hosting provider eliminates transferring a domain name or changing nameservers.
If your domain name is registered with one provider and your website is hosted elsewhere, then you can simply change DNS nameservers and point to your web host.
For example, if your domain name is registered with Network Solutions and your website is hosted with one of the popular WordPress web hosting companies, then you can easily change your nameservers.
Some WordPress hosting providers may offer cPanel to manage your hosting account. We’ll use Network Solutions to show you how to edit DNS records:
First, login to Network Solutions and click on Domains in the left-hand menu. From there, click the Settings button next to your domain.

Next, scroll down to the Advanced Tools section and expand it.

After that, click the Manage link next to Nameservers (DNS).

This will bring up a popup warning, simply click Continue to proceed.

Now, all you have to do is replace the existing nameservers with the new nameservers.

Finally, click Save to store your changes, and you’re done.
If you don’t have a Network Solutions account, you can change name servers on your web host or registrar account. If you can’t find how to change them, then check your domain registrar’s support pages or email them.
What is CNAME Record?
CNAME stands for Canonical Name. A CNAME record is a type of DNS record that’s used to point a domain name to another domain name, instead of an IP address.
For example, let’s say you want to make sure that your website is example.com, but you’ve also registered examples.com and want it to go to your main website.
In that case, you can set up a CNAME record so that anyone who visits examples.com would go to example.com instead.
How to Add a CNAME Record
Adding the CNAME record is useful if you are going to configure your domain to use a professionally branded email like Outlook.com or set up a branded email account in G Suite and Gmail.
To add a CNAME record, login to your Network Solutions account, select Domains from the left-hand menu, and then click on your domain Settings.
From there, navigate to the Advanced Tools section, and click on the Manage link next to Advanced DNS Records.

Next, click on the + Add Record button.

Then, select CNAME from the dropdown menu at the top. Enter the information in the fields provided.

After entering the required information, click on the Add button, and you are done.
If you can’t see the settings on how to change the CNAME record on your hosting account, then ask your hosting provider, and they’ll be able to help you out.
What is MX Record?
MX record is an abbreviation for the Mail Exchanger record. It’s another type of DNS record that defines a mail server to handle email for a particular domain name.
For example, by adding an MX record provided by Outlook.com for your-domain.com, any email received by your-domain.com will be handled through Outlook.com mail servers.
How to Add an MX Record
Adding an MX record entry is simple. We’ll show you how to add an MX record entry to your domain name using Network Solutions.
First, login to your Network Solutions account and select Domains from the left-hand menu, and then click on your domain Settings.
Next, go to the Advanced Tools section, and click on the Manage link next to Advanced DNS Records.
Then, choose the MX record from the list you would like to edit and click on the three dots on the right.

Now, make your edits to the MX record and click Edit, and you are done.

If you cannot see the settings on how to change the MX records on your hosting account, then ask your hosting provider to show you how to add an MX record entry.
What is a TXT Record?
A TXT record is another DNS resource record type. TXT records can have both SPF (Sender Policy Framework) and DKIM (Domain Key Identified Mail) records that add an encrypted key in outgoing mail.
This information improves your email deliverability by adding a trust layer to your mail server.
How to Add a TXT Record
TXT records are useful when you are using a third-party mail service such as G Suite or Outlook.com on your own domain name. We will show you how to add a TXT record to your DNS records settings using Network Solutions.
First, login to your Network Solutions account, select Domains from the left-hand menu, and then click on your domain Settings.
Then, go to the Advanced Tools section, and click on the Manage link next to Advanced DNS Records.
Next, click the green + Add Record button.

Now, select TXT from the dropdown menu at the top of the popup and enter the information in the fields provided.

Finally, click the Add button to save your changes.
Free DNS vs Paid DNS: What’s the Difference?
Normally, when a user visits your website from a particular region of the world, your website’s DNS records are cached by the closest nameservers managed by local ISPs.
This helps other users from that region reach your website quickly.
However, resolving DNS requests still takes time. This is usually in milliseconds and doesn’t matter that much for smaller businesses and blogs.
That’s why most websites just use the DNS servers provided by their hosting company or domain name registrar.
You can also use free DNS service providers like Cloudflare which offers a faster free DNS with limited firewall protection.
Larger businesses usually select a paid DNS to get smart features like 100% uptime, faster lookup speeds, geo traffic redirection, secondary DNS, increased security, and more.
At WPBeginner we are using DNSMadeEasy as our DNS provider because they’re one of the fastest in the industry.
We hope this article helped you learn all about DNS and how it works. Check out the additional reading below to learn more.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.