# Steps for Domain Name System #flashcard ### **Step 1: User Enters a URL** - The user types `www.example.com` into their web browser. ### **Step 2: Browser Checks Cache** - The browser first looks in its **local DNS cache** to see if it already knows the IP address. - If found, it skips the rest of the steps and directly contacts the IP. ### **Step 3: OS Cache Lookup** - If the browser cache misses, the operating system checks its **local DNS cache.** ### **Step 4: Query Sent to DNS Resolver** - If the IP isn’t cached locally, the OS sends the request to a **DNS resolver (recursive resolver)**, typically provided by your ISP or a public resolver like Google DNS (`8.8.8.8`). ### **Step 5: Resolver Checks Its Cache** - The DNS resolver checks its own cache. - If the answer is cached, it returns the IP address to the browser. ### **Step 6: Resolver Queries Root DNS Server** - If not cached, the resolver sends a query to a **Root DNS server.** - Root servers don’t know the final IP but can direct the resolver to the appropriate **Top-Level Domain (TLD) server** (e.g., for `.com`). ### **Step 7: Resolver Queries TLD DNS Server** - The resolver asks the TLD server (like `.com` DNS server) for the address of the **authoritative name server** for `example.com`. ### **Step 8: Resolver Queries Authoritative Name Server** - The resolver now asks the **authoritative name server** for `example.com` for the exact IP address of `www.example.com`. ### **Step 9: IP Address Returned** - The authoritative name server responds with the IP address. ### **Step 10: Resolver Caches the Result** - The resolver caches the IP address for future use (for the duration of the TTL – Time to Live). ### **Step 11: IP Sent to Browser** - The DNS resolver sends the IP address back to the operating system, which passes it to the browser. ### **Step 12: Browser Connects to the Web Server** - The browser uses the IP address to initiate a **TCP (or HTTPS) connection** to the web server. - The web page begins loading. <!--ID: 1751507776485--> #### Related Topics - [[Open System Interconnection (OSI) Model]]