Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

What is: DNS

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

DNS stands for “Domain Name System”. It’s a system that lets you connect to websites by matching human-readable domain names (like 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 on their device, it looks up the IP address and connects them to the physical location where that website is stored.

What Is DNS

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:

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

1. You open your browser and type 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

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 will be displayed on your screen.

How domain names and DNS work

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:

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.


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 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 to show you how to edit DNS records:

First, login to then click on Manage. manage button

Next, select DNS and Nameservers in the left-hand menu.


Then, select the domain name and click on the 3 dots on the right side of the screen.

editing nameservers on

Now, edit your nameservers by clicking on Edit.

Editing on

Then, enter your nameserver in the field provided.

Edit Nameservers on

Finally, click Submit your changes, and you’re done.

If you don’t have a 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, but you’ve also registered and want it to go to your main website.

In that case, you can set up a CNAME record so that anyone who visits would go to 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 or set up a branded email account in G Suite and Gmail.

To add a CNAME record, login to your account select Manage, then on the next screen click on DNS and Nameservers » Add DNS Record.

Add DNS Record

Next, edit the CNAME record by clicking on the three dots beside the record you would like to change and click Edit.

cname edit for DNS

Then, select CNAME from the dropdown menu on the right. Enter the information in the fields provided.

CNAME dropdown menu on

After entering the required information, click on the Add DNS 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 for, any email received by will be handled through 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

First, login to your account and select Manage, then on the next page select DNS and Nameservers.

Next, click the blue Add DNS Record button.

Then, choose the MX record from the list you would like to edit and click on the three dots on the right.

Selecting DNS MX Record

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

Editing DNS MX Record

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 on your own domain name. We will show you how to add a TXT record to your DNS records settings using

First, login to your account and click on Manage, then on the next page click on DNS and Nameservers.

Next, click the blue Add DNS Record button.

Then, scroll down till you see the TXT records and click on the 3 dots on the right.

Selecting DNS TXT file

Finally, make your edits to the TXT record and click Update DNS.

Saving TXT edit on DNS

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.

You can also subscribe to our YouTube channel for step-by-step WordPress video tutorials, and follow us on Twitter and Facebook for the latest updates.

Additional Reading

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!