Very roughly speaking: Every device connected to the Internet is identified and communicated with using a unique number - just like the telephone system.
DNS keeps track of the correlation between the device number vs how that device is identified in language.
Very much like a telephone directory.
theparadox@lemmy.world 1 week ago
This is a question that might require a bit of “prior knowledge” in order for an answer to make sense.
Basically computers keep track of each other with complicated, unique numbers. This isn’t easy for humans to deal with so instead we have websites like netflix.com. DNS is a system that translates “netflix.com” to it’s more complicated unique computer address so that your computer connects to the netflix server when you type in that web address.
There are a number of servers (DNS Servers) on the Internet with databases that keep track of which website has what computer address. Usually, the company (ISP or Internet Service Provider) that you get Internet from has their own DNS Server and tells your modem to tell your computer or phone to use that server to look things up when you browse the web, but it is possible to use alternative servers.
Technically, the system is very trust-based - it’s just assumed that they are going to respond accurately and in good faith. It is possible to mess with this but there are other layers of security and authorities your computer should be using to make sure that you are actually visiting the website you think you are visiting. Usually ISPs just use this server to keep track of the websites you visit so they can sell your data to advertisers.
towerful@programming.dev 1 week ago
I’ll add that it works on a system of delegation.
So there are authoritative servers (which own a part of a domain) which can then have actual records or delegate to other authoritative servers.
So the authoritative server for “com” (yes, as in
.com,comis technically a valid domain name) will delegategoogle.comto a DNS server (likely one owned by Google). And then Google will have DNS records formail.google.comand so on.So looking up
mail.google.com, technically you askcomDNS for themail.google.com. It won’t have an actual record, but will essentially say “go talk to this DNS server to getgoogle.comrecords”. So your computer asks this new DNS server formail.google.comand it might have an answer, or it might have delegated themail.google.comsomewhere else.What your computer most likely is using, however, is a recursive DNS service. You ask it for
mail.google.comand it will “walk the tree” to finally return the IP address.And then it will cache the results (for
comgoogle.comandmail.google.com) so the next queries are significantly faster.