DNS or Domain Name System is a system for resolving IP addresses But Peter… didn’t you tell me you would explain it without being very technical? 🤔
Here I go I’m not going to get into the history, as you probably aren’t interested, so I’ll get to the point.
First of all, you must understand what an IP address is. An IP address, has a format like 18.104.22.168 and is used to communicate between devices.
Your computer has an IP, your mobile has an IP, the printer next to you has another IP, the TV, the smartwatch, even the IOT bulb that turns on from your mobile has an IP.
It works the same way as real-world addresses.
Imagine that you want to send a package from Barcelona to Valencia📦. Basically, on the package, you would put the postal address of the location where you want to send it. What in instead of houses, buildings or land, are electronic devices.
The same thing happens on the internet If I want to send information to the printer at my home from my laptop, what I will do (or in this case, what my computer will do) is get the information to the printer via the IP.
Our computer knows what the IP of the printer is, therefore, it can send it information (a document to print, for example).
Now I’ve given you the example of the printer, but the same thing happens when we browse websites. If we want to access Google, we have to ask Google (please) to send us the information.
Google itself is a server. A server is nothing more than a computer that is connected to the internet and serves to serve requests. And as we said before, every device has an IP. . Being a computer, it has an IP Therefore, we can reach it. We make a request and it sends us a response. Hence the name server, because it serves us a response.
Sounds simple, doesn’t it?
But here comes the problem.
Just like in the previous example our computer knew the address (the IP) of our printer, how does our computer know what Google’s IP is? Moreover, how does our computer know what the IP of the website of the bakery in front of your house is?
Simply, it doesn’t know. You have to indicate it.
And here comes the problem that they had to solve a few years ago. That to make a request to a server, you had to indicate the IP address of it so that your computer knew how to get to it and the server would respond to your request.
For example, if we want to make our computer request Google’s website, it’s as easy as putting Google’s IP address in our browser. In fact, you can try it yourself by clicking here: 22.214.171.124. Interesting, huh?
Here comes the big problem. If I already struggle to remember Google’s IP (126.96.36.199), how am I going to remember the IP address of the server of the website of the bakery in front of my house? And Facebook’s? And Instagram’s? 😅
Well, I could make a list in my notebook with all the IP’s and consult it whenever I want. Well… that’s fine, but… what if the bakery’s website next door changes its server because it needs a larger one? Do I have to be constantly updating my list?
That´s where DNS come in
DNS is a huge list of domains and IP addresses. It’s like a translator You give it a domain, and it translates it into an IP. In this way, your computer will be able to reach the destination server through the IP, without you having to memorize the IP.
Does that make sense?
In the previous image of the Client and Server, one more step would need to be added. It would be, Client, ISP (our Internet Service Provider, which is who has the big DNS list, for example, Movistar) and finally, the server. You can learn more about the different types of DNS servers that exist.
Now yes, now our computer can find the Google server. And all this in milliseconds!
Alright Peter, now I perfectly understand all this stuff, but what does this have to do with me wanting to, for example, verify my domain on Facebook?
It works in a similar way.
In the end, DNS can be publicly consulted, for example, using a tool like dnschecker.org. It does the same thing our ISP would do, you give it a domain, and it translates it into the corresponding IP.
In fact, there are different types of DNS records:
So far, the one I’ve been explaining is the DNS record of type “A”. But we can find the following:
- A: Returns an IP address This record is used to resolve names of hosts to an IPv4 number, taking into account whether the IP is dynamic or fixed. For example, to point our domain name to a server.
- .AAAA: AAAA records are very similar to A records. Both return an IP address. In the case of AAAA, the IPs stored are IPv6. This type of DNS record, like A, is used to point our domain to a specific server.
- CAA: Certificate Authority Authorization. This DNS parameter is a security mechanism that allows limiting the valid certification authorities for a domain. In other words, it indicates which certification authorities we allow to issue security certificates (SSL) for the domain
- CNAME: Canonical name record. This record is usually used to create aliases for a name. CNAME is a way to make the domain point to a different domain or a subdomain. It can also be used when different services are using the same IP, so that each service has its own DNS entry.
- MX: Mail exchange record. and as many as necessary can be established. In relation to these records, bear in mind that priorities are automatically established. That is, the first MX record you enter will take precedence over the following ones.
- PTR: Pointer record. Or reverse record, as it works opposite to A, it translates IPs to domain names. PTR is usually used in the configuration file of the reverse DNS zone.
- SRV: Service Locator. It’s a record for special services.that provides information related to the services available for a specific domain. It’s common to use it with XMPP LDAP or SIP.
- TXT: Text record. Record for inserting the text you want. It’s often used to verify the domain authority or to prevent misuse of email addresses. Additionally, TXT allows the creation of special records and Domain-Keys
As you see, this last record would serve us to be able to verify our domain, as it takes care of storing text.
Now you may ask, how do I modify my DNS?
They are modified on the platform where you registered your domain. In what is known as “registering”.