Discover more from CoderCo
𝗪𝗵𝗮𝘁 𝗵𝗮𝗽𝗽𝗲𝗻𝘀 𝘄𝗵𝗲𝗻 𝘆𝗼𝘂 𝘁𝘆𝗽𝗲 𝗮 𝗨𝗥𝗟 𝗶𝗻𝘁𝗼 𝘆𝗼𝘂𝗿 𝗯𝗿𝗼𝘄𝘀𝗲𝗿?
aka How DNS works
The process involves fundamental components like the browser, your computer’s operating system, your internet service provider (ISP), the server where you host the site and the services running on that server.
𝟭. 𝗬𝗼𝘂 𝘁𝘆𝗽𝗲 𝗴𝗼𝗼𝗴𝗹𝗲.𝗰𝗼𝗺 𝗶𝗻𝘁𝗼 𝗮 𝘄𝗲𝗯 𝗯𝗿𝗼𝘄𝘀𝗲𝗿, 𝘁𝗵𝗲 𝗾𝘂𝗲𝗿𝘆 𝘁𝗿𝗮𝘃𝗲𝗹𝘀 𝘁𝗼 𝘁𝗵𝗲 𝗶𝗻𝘁𝗲𝗿𝗻𝗲𝘁 𝗮𝗻𝗱 𝗶𝘀 𝗿𝗲𝗰𝗶𝗲𝘃𝗲𝗱 𝗯𝘆 𝗮 𝗗𝗡𝗦 𝗿𝗲𝘀𝗼𝗹𝘃𝗲𝗿
When you type a domain name into a web browser, the browser needs to resolve the domain name to an IP address. The IP address is what is used to identify a specific server on the internet.
𝟮. 𝗧𝗵𝗲 𝗗𝗡𝗦 𝗿𝗲𝘀𝗼𝗹𝘃𝗲𝗿 𝗿𝗲𝗰𝘂𝗿𝘀𝗶𝘃𝗲𝗹𝘆 𝗾𝘂𝗲𝗿𝗶𝗲𝘀 𝗮 𝗗𝗡𝗦 𝗿𝗼𝗼𝘁 𝗻𝗮𝗺𝗲𝘀𝗲𝗿𝘃𝗲𝗿.
The DNS resolver is responsible for resolving domain names to IP addresses. It takes the request from your browser and sends a query to a DNS root name server. The root name server is the top of the hierarchy in the domain name system and is responsible for pointing the resolver in the right direction.
𝟯. 𝗧𝗵𝗲 𝗿𝗼𝗼𝘁 𝘀𝗲𝗿𝘃𝗲𝗿 𝗿𝗲𝘀𝗽𝗼𝗻𝗱𝘀 𝘁𝗼 𝘁𝗵𝗲 𝗿𝗲𝘀𝗼𝗹𝘃𝗲𝗿 𝘄𝗶𝘁𝗵 𝘁𝗵𝗲 𝗮𝗱𝗱𝗿𝗲𝘀𝘀 𝗼𝗳 𝗮 𝘁𝗼𝗽-𝗹𝗲𝘃𝗲𝗹 𝗱𝗼𝗺𝗮𝗶𝗻 𝗮𝗸𝗮 𝗧𝗟𝗗
The root name server responds to the resolver with the address of the top-level domain (TLD) name server, which is responsible for the .com TLD in this case. The TLD name server is responsible for managing the domains that are part of that TLD.
𝟰. 𝗧𝗵𝗲 𝗗𝗡𝗦 𝗿𝗲𝘀𝗼𝗹𝘃𝗲𝗿 𝗺𝗮𝗸𝗲𝘀 𝗮 𝗿𝗲𝗾𝘂𝗲𝘀𝘁 𝘁𝗼 𝘁𝗵𝗲 .𝗰𝗼𝗺 𝗧𝗟𝗗
The resolver then sends a request to the .com TLD name server for the IP address of the domain you requested, google.com
𝟱. 𝗧𝗵𝗲 𝗧𝗟𝗗 𝗻𝗮𝗺𝗲 𝘀𝗲𝗿𝘃𝗲𝗿 𝗿𝗲𝘀𝗽𝗼𝗻𝗱𝘀 𝘄𝗶𝘁𝗵 𝘁𝗵𝗲 𝗜𝗣 𝗮𝗱𝗱𝗿𝗲𝘀𝘀 𝗼𝗳 𝘁𝗵𝗲 𝗱𝗼𝗺𝗮𝗶𝗻𝘀 𝗻𝗮𝗺𝗲𝘀𝗲𝗿𝘃𝗲𝗿, 𝗶𝗻 𝘁𝗵𝗶𝘀 𝗰𝗮𝘀𝗲 𝗴𝗼𝗼𝗴𝗹𝗲.𝗰𝗼𝗺
𝟲. 𝗧𝗵𝗲 𝗿𝗲𝘀𝗼𝗹𝘃𝗲𝗿 𝘀𝗲𝗻𝗱𝘀 𝗮 𝗾𝘂𝗲𝗿𝘆 𝘁𝗼 𝘁𝗵𝗲 𝗱𝗼𝗺𝗮𝗶𝗻𝘀 𝗻𝗮𝗺𝗲𝘀𝗲𝗿𝘃𝗲𝗿
𝟳. 𝗧𝗵𝗲 𝗜𝗣 𝗮𝗱𝗱𝗿𝗲𝘀𝘀 𝗼𝗳 𝗴𝗼𝗼𝗴𝗹𝗲.𝗰𝗼𝗺 𝗶𝘀 𝗿𝗲𝘁𝘂𝗿𝗻𝗲𝗱 𝘁𝗼 𝘁𝗵𝗲 𝗿𝗲𝘀𝗼𝗹𝘃𝗲𝗿 𝗳𝗿𝗼𝗺 𝘁𝗵𝗲 𝗻𝗮𝗺𝗲𝘀𝗲𝗿𝘃𝗲𝗿
𝟴. 𝗧𝗵𝗲 𝗗𝗡𝗦 𝗿𝗲𝘀𝗼𝗹𝘃𝗲𝗿 𝗿𝗲𝗽𝘀𝗼𝗻𝗱𝘀 𝘁𝗼 𝘁𝗵𝗲 𝗯𝗿𝗼𝘄𝘀𝗲𝗿 𝘄𝗶𝘁𝗵 𝘁𝗵𝗲 𝗜𝗣 𝗮𝗱𝗱𝗿𝗲𝘀𝘀 𝗼𝗳 𝘁𝗵𝗲 𝗱𝗼𝗺𝗮𝗶𝗻 𝗿𝗲𝗾𝘂𝗲𝘀𝘁𝗲𝗱, 𝗴𝗼𝗼𝗴𝗹𝗲.𝗰𝗼𝗺 𝗶𝗻 𝘁𝗵𝗶𝘀 𝗰𝗮𝘀𝗲.
Follow for more daily updates about software engineering, systems design, networking and DevOps content.