Skip to content
ADevGuide Logo ADevGuide
Go back

What Happens When You Type a URL? Step-by-Step Explained

Updated:

By Pratik Bhuite | 17 min read

Hub: Web Fundamentals / Networking and Protocols

Series: Internet and Web Foundations Series

Last updated: Mar 3, 2026

Part 1 of 10 in the Internet and Web Foundations Series

Key Takeaways

On this page
Reading Comfort:

What Happens When You Type a URL? Step-by-Step Explained

Typing adevguide.com looks simple, but the browser, DNS infrastructure, transport protocols, CDN edge, origin servers, and rendering engine all coordinate before you see content. This guide walks through that full path in production-level detail.

Table of Contents

Open Table of Contents

URL Anatomy in 30 Seconds

Example URL:

https://adevguide.com/blog?sort=latest#top

  • https -> scheme/protocol
  • adevguide.com -> host/domain
  • /blog -> path
  • ?sort=latest -> query parameters
  • #top -> fragment (used only by browser, not sent to server)

If you type only adevguide.com, the browser usually upgrades it to https://adevguide.com/ based on browser defaults and HSTS policies.

The Full Navigation Timeline

flowchart TD
    A[Type adevguide.com] --> B[Parse URL + policy checks]
    B --> C{Local response available?}
    C -->|Yes| D[Serve from browser cache or Service Worker]
    C -->|No| E[DNS resolution]
    E --> F[Connection setup: TCP or QUIC]
    F --> G[TLS handshake + cert validation]
    G --> H[HTTP request to CDN edge]
    H --> I{Edge cache hit?}
    I -->|Yes| J[Edge response]
    I -->|No| K[Forward to origin app]
    K --> L[(Origin cache/DB/services)]
    L --> K
    K --> J
    J --> M[Parse HTML]
    M --> N[Fetch CSS, JS, fonts, images]
    N --> O[Layout + paint]
    O --> P[Hydration + JS execution]
    P --> Q[Interactive page]
    Q --> R[User click, scroll, search]
    R --> H
    J --> S[Store response in browser cache]
    S --> C

    classDef flow fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px,color:#000000;
    class A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S flow;

Step 1: Address Bar Input Becomes a Navigation

When you press Enter after typing adevguide.com, the browser does more than string parsing:

  1. It decides this is a URL-like input (not a search query).
  2. It normalizes it into a canonical URL, usually https://adevguide.com/.
  3. It creates a navigation request in the browser networking stack.
  4. It checks security policies (mixed content, HSTS preload, private network rules).

If parsing fails, everything stops before any DNS or network call.

Step 2: Local Fast Paths (Cache, Service Worker, HSTS)

Before touching DNS or sockets, the browser checks local sources:

  1. Memory cache (same session, fastest path).
  2. Disk cache (persisted from previous visits).
  3. Service Worker interception (can return custom cached/offline response).
  4. HSTS state (force HTTPS without trying HTTP first).

If cache policy allows, the browser may return HTML immediately and skip the whole external network path.

Step 3: DNS Resolution for adevguide.com

If no usable DNS cache entry exists, resolver recursion begins.

flowchart TD
    A[Browser asks OS resolver] --> B{OS cache hit?}
    B -->|Yes| C[Return IP to browser]
    B -->|No| D[Query recursive resolver]
    D --> E{Resolver cache hit?}
    E -->|Yes| C
    E -->|No| F[Query Root nameserver]
    F --> G[Query .com TLD nameserver]
    G --> H[Query authoritative NS for adevguide.com]
    H --> I[Answer: A, AAAA, or CNAME + TTL]
    I --> J{CNAME target?}
    J -->|Yes| D
    J -->|No| K[Store in resolver cache]
    K --> C

    classDef dns fill:#fff3e0,stroke:#ef6c00,stroke-width:2px,color:#000000;
    class A,B,C,D,E,F,G,H,I,J,K dns;

Typical details in this phase:

  1. Resolver may return IPv4 (A) and/or IPv6 (AAAA) records.
  2. CDN setups often return a CNAME before final edge IP answers.
  3. TTL controls how long this answer is reused.
  4. Negative answers (NXDOMAIN) are also cached for a period.

Without DNS resolution, browser has no destination IP to connect to.

Step 4: Connection Setup (TCP or QUIC)

Modern browsers can use different transports:

  1. TCP path (common for HTTP/1.1 and HTTP/2).
  2. QUIC path (for HTTP/3 over UDP).

For TCP, three-way handshake happens:

  1. SYN
  2. SYN-ACK
  3. ACK

The browser may race IPv6 vs IPv4 using Happy Eyeballs to reduce latency.

Step 5: TLS Handshake and Certificate Validation

HTTPS requires TLS before application data:

  1. ClientHello (supported ciphers, ALPN protocols like h2/h3, SNI host).
  2. ServerHello + certificate chain.
  3. Browser verifies certificate validity, hostname match, trust chain, revocation signals.
  4. Key agreement and session key setup.
  5. Encrypted channel established.

If certificate validation fails, navigation is blocked or warned before your app code runs.

Step 6: HTTP Request Through CDN and Origin

Once secure transport is ready, request flows through edge infrastructure:

flowchart TD
    A[Browser request] --> B[CDN edge POP]
    B --> C{WAF/rate-limit pass?}
    C -->|No| D[Reject: 403 or 429]
    D --> A
    C -->|Yes| E{Edge cache hit?}
    E -->|Yes| F[Return cached response]
    E -->|No| G[Forward to load balancer]
    G --> H[Origin web/app server]
    H --> I[(Redis, DB, internal APIs)]
    I --> H
    H --> J[Origin response + headers]
    J --> K[Edge compression and policy]
    K --> F
    F --> L[Browser receives bytes]
    L --> M{Redirect response?}
    M -->|Yes| A
    M -->|No| N{Cacheable by browser?}
    N -->|Yes| O[Store in browser cache]
    N -->|No| P[Skip cache store]

    classDef edge fill:#e3f2fd,stroke:#1565c0,stroke-width:2px,color:#000000;
    class A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P edge;

The first request usually looks like:

GET /blog?sort=latest HTTP/1.1
Host: adevguide.com
User-Agent: ...
Accept: text/html

Common edge decisions:

  1. Bot filtering and WAF rules.
  2. Redirect rules (http to https, www to apex, trailing slash normalization).
  3. Cache key lookup (path + query + headers + cookies by policy).
  4. Compression and protocol-specific optimizations.

Step 7: Backend Work to Produce the Response

If edge misses cache, origin handles request:

  1. Router maps URL to handler/page.
  2. App validates params, cookies, auth context.
  3. App reads Redis/cache first, then database/services.
  4. App renders HTML (SSR) or returns JSON for API endpoints.
  5. Response headers are attached (Cache-Control, ETag, Set-Cookie, CSP, etc.).

Then bytes travel back to browser with status:

  • 200 OK for success
  • 301/308 for permanent redirects
  • 302/307 for temporary redirects
  • 404 not found
  • 500 server errors

Step 8: Browser Rendering Pipeline

After first HTML bytes arrive, browser starts rendering work:

flowchart TD
    A[HTML bytes] --> B[Build DOM]
    B --> C[Discover CSS, JS, fonts]
    C --> D[Fetch CSS]
    D --> E[Build CSSOM]
    B --> F[Combine DOM + CSSOM]
    E --> F
    F --> G[Render tree]
    G --> H[Layout]
    H --> I[Paint]
    I --> J[Composite to screen]
    C --> K[Fetch JS]
    K --> L[Execute JS]
    L --> M{DOM or style changed?}
    M -->|Yes| H
    M -->|No| N[Stable frame]
    C --> O[Fetch API data]
    O --> L
    J --> P{User interaction?}
    P -->|Yes| L
    P -->|No| Q[Idle]

    classDef render fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px,color:#000000;
    class A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q render;

Important behavior:

  1. Rendering is incremental, so user may see content before all assets complete.
  2. CSS can block first paint.
  3. Heavy synchronous JavaScript can delay interactivity.
  4. Fonts can cause layout shifts if loading strategy is poor.

Step 9: Secondary Fetches and Interactivity

Initial HTML usually triggers more requests:

  1. CSS, JS bundles, images, fonts.
  2. API calls triggered by hydration/client-side code.
  3. Third-party scripts (analytics, ads, chat widgets).

These requests can reuse existing connection pools, DNS cache, and TLS sessions, but third-party domains may trigger brand-new DNS/TCP/TLS paths.

Step 10: Why Repeat Visits Are Faster

Second and later visits are often much faster because of:

  1. Warm browser cache (HTML/assets if cacheable).
  2. Warm DNS cache (domain already resolved).
  3. Reused TLS sessions and open connections.
  4. CDN edge cache already populated.
  5. Browser code cache for previously parsed JavaScript.

Common Bottlenecks and Debug Clues

Slow before request starts

Usually DNS delay, IPv6/IPv4 fallback, or TCP/TLS/QUIC setup overhead.

Fast TTFB but slow visual load

Usually large JS bundles, render-blocking CSS, font delays, or image weight.

Random slowness by geography

Often CDN edge distance, resolver locality, or regional packet loss.

Works locally but fails in production

Often wrong DNS record, cert/SAN mismatch, bad redirect rule, or proxy/header misconfiguration.

Developer Debugging Checklist

Use this quick checklist:

  1. Verify DNS: nslookup yourdomain.com or dig yourdomain.com +trace
  2. Verify TLS certificate and chain: browser security tab or SSL checker tools
  3. Inspect network waterfall in DevTools: DNS, connect, SSL, TTFB, download phases
  4. Check response headers: cache, compression, content-type, security
  5. Check server and proxy logs with request ID correlation
  6. Check Core Web Vitals: LCP, CLS, and INP for real user rendering impact

Interview Questions

1. What is the difference between DNS time, connection time, and TTFB in a browser waterfall?

DNS time is how long it takes to resolve domain to IP. Connection time is TCP setup (and TLS setup for HTTPS). TTFB (time to first byte) starts after request is sent and ends when first response byte arrives.

If DNS and connection are fast but TTFB is high, your backend path is likely slow (application logic, database, cache miss, or overloaded upstream).

2. Why can a page still feel slow when the main HTML request is fast?

A fast first HTML response does not guarantee fast rendering. The browser still needs CSS, JavaScript, fonts, and images before full visual completion.

Large JS bundles, blocking CSS, and heavy images often dominate user-perceived latency even when network handshake and TTFB look good.

3. How does a CDN change the URL request path?

With CDN enabled, DNS usually resolves to an edge location first. The edge may serve cached content directly or forward to origin when cache is missing or stale.

This typically reduces latency for static assets and shields origin from burst traffic, but cache key mistakes can cause low hit ratio and inconsistent behavior.

4. What changes when the browser uses HTTP/3 instead of HTTP/2?

HTTP/3 runs on QUIC over UDP instead of TCP. That changes transport behavior: no TCP head-of-line blocking across multiplexed streams and faster connection migration on network changes.

You still do TLS (inside QUIC), but handshake and loss recovery behavior differ. In weak mobile networks, this can reduce latency spikes.

5. In practical debugging, when should I suspect TLS rather than application code?

Suspect TLS when failures happen before request reaches app logs, or when browser shows certificate errors, protocol mismatch, or handshake failures.

Check certificate validity dates, hostname/SAN match, intermediate chain, and TLS version compatibility before digging into application traces.

6. Why are redirects important in “what happens after typing a URL” interviews?

Redirects add extra round trips, and each hop repeats parts of request flow, including potential DNS/connect overhead for new hosts.

In interviews, mentioning redirect chains shows you understand real production behavior and why canonical URLs and redirect hygiene matter for both performance and SEO.

Conclusion

When you type adevguide.com, the browser executes a full distributed workflow: normalize URL, resolve DNS, establish secure transport, traverse edge/origin systems, and run rendering pipelines before pixels appear. Knowing this sequence makes debugging significantly faster because you can isolate exactly which stage is slow or broken.

References

  1. MDN: How the Web Works https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Web_standards/How_the_web_works
  2. RFC 9110 - HTTP Semantics https://www.rfc-editor.org/rfc/rfc9110
  3. MDN: DNS https://developer.mozilla.org/en-US/docs/Glossary/DNS
  4. RFC 9293 - Transmission Control Protocol (TCP) https://www.rfc-editor.org/rfc/rfc9293
  5. RFC 8446 - TLS 1.3 https://www.rfc-editor.org/rfc/rfc8446
  6. Google Web Fundamentals: Rendering Performance https://web.dev/articles/rendering-performance
  7. MDN: HTTP Caching https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching

YouTube Videos

  1. “What is DNS? (Domain Name System)” - PowerCert Animated Videos https://www.youtube.com/watch?v=mpQZVYPuDGU
  2. “DNS Explained” - IBM Technology https://www.youtube.com/watch?v=72snZctFFtA
  3. “How a DNS Server (Domain Name System) works” - CBT Nuggets https://www.youtube.com/watch?v=2ZUxoi7YNgs
  4. “DNS and How it Works” - NetworkChuck https://www.youtube.com/watch?v=UVR9lhUGAyU

Share this post on:

Next in Series

Continue through the Internet and Web Foundations Series with the next recommended article.

Related Posts

Keep Learning with New Posts

Subscribe through RSS and follow the project to get new series updates.

Was this guide helpful?

Share detailed feedback

Previous Post
How the Internet Works: Simple Explanation for Developers
Next Post
TCP vs UDP Explained Clearly with Real Examples