Abhishek Kumar

What Happens When You Enter a URL?

"A simple guide to what happens behind the scenes when you enter a URL in your browser - from DNS to the final webpage."

Abhishek Kumar

What Happens When You Enter a URL?

Table of contents

    Introduction

    Have you ever wondered what happens after you type a URL like https://example.com into your browser and press Enter?

    It looks simple, but several things happen behind the scenes before the webpage appears.

    Let's understand it in simple terms.


    The Complete Process

    Enter URL
        ↓
    DNS Lookup
        ↓
    Connect to Server
        ↓
    Send HTTP Request
        ↓
    Server Processes Request
        ↓
    HTTP Response
        ↓
    Browser Renders Page
    

    Now let's understand each step.


    1. You Enter a URL

    Suppose you enter:

    https://example.com
    

    The browser first breaks the URL into parts.

    • https → Protocol
    • example.com → Domain name

    The browser needs to find the actual server behind this domain.


    2. DNS Finds the IP Address

    Computers communicate using IP addresses, not domain names.

    For example:

    example.com → 93.184.216.34
    

    The DNS (Domain Name System) converts the domain name into its corresponding IP address.

    You can think of DNS as the phonebook of the internet.

    Domain Name
         ↓
        DNS
         ↓
    IP Address
    

    Now the browser knows where to send the request.


    3. The Browser Connects to the Server

    The browser establishes a connection with the server.

    For traditional HTTPS connections, this involves a TCP connection.

    If the website uses HTTPS, the browser also performs a TLS handshake to create a secure, encrypted connection.

    So:

    Browser ←→ Secure Connection ←→ Server
    

    This helps protect the data being exchanged.


    4. The Browser Sends an HTTP Request

    Once the connection is ready, the browser asks the server for the webpage.

    A simplified request looks like:

    GET /
    Host: example.com
    

    The GET method basically means:

    "Give me this resource."


    5. The Server Processes the Request

    The server receives the request and decides what to return.

    For a simple website, it might return an HTML file.

    For a dynamic application, it might:

    • Check authentication
    • Query a database
    • Run backend code
    • Generate a response

    For example:

    Browser
       ↓
    Server
       ↓
    Backend
       ↓
    Database
       ↓
    Response
    

    6. The Server Sends a Response

    The server sends the requested data back to the browser.

    For example:

    HTTP/1.1 200 OK
    Content-Type: text/html
    

    The status code tells the browser what happened.

    Some common status codes are:

    CodeMeaning
    200Success
    301Redirect
    404Page Not Found
    500Server Error

    7. The Browser Builds the Webpage

    The browser receives the HTML and starts processing it.

    It may also need to download:

    • CSS
    • JavaScript
    • Images
    • Fonts

    For example:

    HTML
     ↓
    CSS + JavaScript + Images
     ↓
    Browser Processing
     ↓
    Webpage
    

    The browser creates the DOM (Document Object Model) from the HTML and uses CSS to determine how everything should look.

    JavaScript can then make the page interactive.


    8. You See the Webpage

    Finally, the browser renders everything and displays the webpage on your screen.

    So the entire process looks like:

    You Enter URL
          ↓
    DNS Finds IP
          ↓
    Connection Established
          ↓
    HTTP Request
          ↓
    Server Processes Request
          ↓
    HTTP Response
          ↓
    Browser Processes HTML/CSS/JS
          ↓
    Webpage Appears
    

    And all of this usually happens in just a fraction of a second.


    Final Takeaway

    A URL may look like just a simple web address, but entering it starts a complete communication process between your browser, DNS servers, internet, and web server.

    The most important concepts to remember are:

    URL → DNS → Connection → HTTP Request → Server → HTTP Response → Browser → Webpage

    Understanding this process gives you a strong foundation for learning web development, networking, APIs, backend development, and cybersecurity.