What is DNS
The Domain Name System (DNS) is a collection of databases that translate a website URL or hostname to IP addresses. Website hostnames (also referred to as URLs - uniform resource locator) are easy for humans to remember - IP addresses are what computers use however. DNS is used to convert what we can remember to what the internet and computers use. You can think of DNS as the internet's phonebook.
When you type in www.yourwebsite.com into your web browser, it queries a DNS server to get your websites IP address. The browser then knows how to communicate with the device that is assigned that IP address.
How Does DNS Work
The Domain Name System is decentralized - meaning there are DNS servers sprinkled throughout the internet. How DNS does its job is rather simple: each website address entered into a web browser (like Chrome, Safari, or Firefox) is sent to a DNS server, which understands how to map that name to its proper IP address.
It's the IP address that devices use to communicate with one another since they can't and don't relay information using a name like www.google.com, www.youtube.com, etc. We get to simply enter the simple name to these websites while DNS does all the lookups for us, giving us near-instant access to the proper IP addresses needed to open the pages we want.
Again, www.microsoft.com, www.amazon.com, and every other website name is only used for our convenience because it's much easier to remember those names than to remember their IP addresses.
Computers called root servers are responsible for storing the IP addresses for every top-level domain. When a website is requested, it's the root server that processes that information first in order to identify the next step in the lookup process. Then, the domain name is forwarded to a Domain Name Resolver (DNR), which is located within an ISP, to determine the correct IP address. Finally, this information is sent back to the device you requested it from.
What If I Need to Make Changes to My DNS
Every so often the need arises to alter the DNS for a website. Perhaps a service such as SendGrid or Mailchimp has been added to your toolchain and they request that additions be made to your DNS to use these services.
These can be complex configuration files and one misconfiguration on one line can prevent the entire website from working. That is why these DNS configuration files are often tightly protected by your web hosting provider. When the need arises to make changes it is best to request the support of your provider.
fig. 1 - Example of a DNS configuration file.
References
^ Tim Fisher - September 13, 2021 - "What is DNS"