DEV Community

Cover image for Do I need to understand DNS as Web Developer?

Do I need to understand DNS as Web Developer?

Devcodesguy on December 14, 2020

So, do I have to understand what DNS is, as a Web Developer? Let’s find out! Let’s be honest as a Web Developer, we only hear about HTML, CSS, Jav...
Collapse
 
swiknaba profile image
Lud • Edited

Agree, you should know about DNS. That is a basic concept of the internet!

In my limited experience, regardless of your exact profession, people will view you as an expert on "the internet stuff", so I see it as my obligation, to understand basic concepts of "the internet stuff". --also, I don't trust people who are not curious enough to learn about underlying concepts :p

This includes:

  • hosting
  • DNS 🚀
  • what is a server? Where are those?
  • there are wires going through the ocean connecting the world! Sharks can bite them!
  • basic security (VPC, firewalls, dns queries encrypted/not encrypted -> implications?, SSL,...)
  • sql vs nosql
  • Linux basics
  • ..
Collapse
 
devcodesguy profile image
Devcodesguy

I totally agree with you Lud!

Thanks for your comment! 😄

Collapse
 
k776 profile image
Kieran Pilkington

A nice top level overview. Well done. Just three minor things perhaps worth clarifying:

1) In your diagram, "Authoritative DNS Server" is often referred to as the "Nameserver". That is where the original A/CNAME/TXT records are stored when set by the user. The IP address of the nameservers is stored on the domain with the domain registrar. Request 4 asks for the nameserver IP from the domain registrar, request 5 returns the IP address to the nameserver, request 6 asks the nameserver for the A record for a specific domain, and request 7 returns that A record (a server IP address).

2) Step 8 does not actually return the webpage as indicated in the diagram. Now that the computer has the server IP, it needs to make a request to that server IP, hopping over the internet through various nodes known as the Border Gateway Protocol, which is an advanced topic outside the scope of this article. But in short, request 8 doesn't return the website.

3) You've mentioned if the ISP cache has the record, it stops there which is correct. Additionally, most computers/browsers have a DNS cache on the local machine, so often once a site is accessed, no further DNS requests for it are needed until that record expires (browser closes, DNS is cleared, or DNS record expires). Which means for sites you visit more than once, request 1 never needs to happen.

Collapse
 
jrohatiner profile image
Judith

Wonderful post! No one ever mentions that DNS is the quintessential Frontend feature. Before your site is even seen users will depend on putting that url into the browser bar and expect to be taken to the site. Nothing would happen if your zone file is misconfigured.
Thx for a good read!

Collapse
 
devcodesguy profile image
Devcodesguy

Thank you Judith!

Collapse
 
dakujem profile image
Andrej Rypo

I like your analogies 🙂 ... and the joke.

Collapse
 
devcodesguy profile image
Devcodesguy

Hey Andrej,

Thanks a lot! 😄🤓

Collapse
 
ismailco96 profile image
ismail courr

Thank's for this post it's really helpful.
Nice one! 😄

Collapse
 
devcodesguy profile image
Devcodesguy

Hey,

Glad that you like it!

Collapse
 
nitinkatageri profile image
Niitn Katageri

Thanks for the article, I often encourage my team to discuss about web beyond programming languages. All these days it was about SSL and PKI, will add DNS to the list and use your joke :)

Collapse
 
devcodesguy profile image
Devcodesguy

Hey Niitn, thanks you for your reply.

Haha! Great! I am glad you like the article 😀

Collapse
 
imsuvesh profile image
Suvesh K

I did a DNS lookup for your joke but "The joke can’t be reached"😆