Loading
All articles
Networking & Internet 5 min read

What Happens When You Visit a Website? From URL to Web Page

Follow a website visit from the address bar through DNS, HTTPS, the server response, and browser rendering. Then watch the requests in your browser's Network panel.

nbkhope
On this page

What Happens When You Visit a Website? From URL to Web Page

You enter a website address and a page appears. Behind that familiar moment, your browser has to find a destination, establish a connection, ask for data, and turn that data into something you can see and use.

Let's follow a typical first visit to a page. Real browsers can skip or overlap steps by using cached data, an existing connection, or a service worker. The sequence below is a useful map, not a claim that every visit follows one fixed route.

A browser sends a request through DNS and a secure connection, receives page files, and renders the result.

Start with the address

Consider this illustrative URL:

1https://example.com/guide?lang=en
2│       │           │     └─ query: an option for the page
3│       │           └─ path: the requested resource
4│       └─ domain: the site's name
5└─ scheme: use HTTPS

The browser reads the scheme (https), domain (example.com), path (/guide), and optional query (lang=en). The path and query help identify what to request from the site; DNS looks up the domain, not the whole URL. The example path is only an illustration and does not imply that a page exists there.

The trip in one picture

1You          Browser          DNS resolver       Website/CDN
2 | enter URL    |                   |                  |
3 |------------->| ask for address   |                  |
4 |              |------------------>|                  |
5 |              |<------------------| IP address       |
6 |              | establish connection + HTTPS          |
7 |              |-------------------------------------->|
8 |              | request /guide?lang=en                |
9 |              |-------------------------------------->|
10 |              |<--------------------------------------| HTML response
11 |              | request CSS, images, scripts as needed|
12 |              |<--------------------------------------| more responses
13 |<-------------| render and show the page              |

The drawing omits routers, caches, and many implementation details. The destination could be a server run by the site or an edge server in a content delivery network (CDN).

1. DNS finds an address

Computers use IP addresses to route traffic. The Domain Name System (DNS) provides records that help the browser find an address for example.com. A cached answer might already be available. Otherwise, a DNS resolver can contact other name servers to obtain an answer and return it to the device.

One name does not have to mean one permanent server. A site can have multiple addresses or use a CDN, and DNS answers can vary. This is why “DNS translates a name into an address” is useful shorthand, but not the complete story.

2. The browser makes a secure connection

With an IP address, the browser can contact the destination. A common setup uses TCP to carry HTTP/2; another uses QUIC for HTTP/3. For an https URL, TLS protects the HTTP exchange in transit and lets the browser validate a certificate for the site's name. Browsers may also reuse an existing connection instead of creating a new one.

HTTPS helps protect the connection. It does not prove that the site's claims are true or that a page is safe to trust. Check the domain carefully before entering sensitive information.

3. HTTP asks for the page

The browser sends an HTTP request, often a GET, for the path and query. The server, or a CDN acting for it, sends an HTTP response with a status, headers, and usually a body. For a page, that body is often HTML.

Illustrative request:  GET /guide?lang=en
Illustrative response: 200 OK + headers + HTML

200 means the request succeeded. A 301 or 302 can send the browser to another URL; 404 means the requested resource was not found. An error status is still a response—the browser may display an error page that the server supplied.

The data crosses networks in packets. Your router, internet provider, and other networks help carry it to the destination and back. For a wider view of that journey, read What Is the Internet? and What Is a LAN?.

4. HTML leads to more requests

The first HTML response is often only the beginning. It can refer to a CSS stylesheet, JavaScript file, image, font, or video. The browser may request those resources separately, sometimes from different domains. It can also reuse cached copies rather than download them again.

ResourceWhat it contributes
HTMLContent and structure
CSSAppearance and layout
JavaScriptBehavior and interactive changes
Images and fontsVisual assets

The browser parses HTML into a Document Object Model (DOM), applies CSS, calculates layout, and paints pixels on the screen. JavaScript can change the page and trigger additional requests after the first view appears. That is why “the page loaded” does not always mean all network activity is finished. See What Is HTML? and What Is CSS? for the two basic page-building languages.

Try it: watch a page load

You can see much of this process in Chrome's Network panel. Other browsers have similar developer tools, though labels may differ.

  1. Open a browser tab at https://example.com/.
  2. Open Developer Tools from the browser menu, then choose Network.
  3. Reload the page while the panel is open. The panel records requests made during that reload.
  4. Select the main Document request. In Headers, find the request URL, status code, and response headers. In Response, inspect the HTML. In Timing, look for the stages the tool recorded.
  5. Look at the other rows, if any. Which files are images, stylesheets, or scripts? Try a more complex site to see more requests.

Your result may differ from someone else's. Browser cache, extensions, redirects, CDN location, network conditions, and connection reuse can change the rows and timings. You may not see a separate DNS or connection stage on every request. Never post a screenshot of request headers without checking for cookies, tokens, or other private data.

Keep the jobs separate

DNS helps find an address. TCP or QUIC and TLS help establish and protect a connection. HTTP carries requests and responses. HTML, CSS, and JavaScript help the browser build the page. Those are different jobs working together to turn an address into a usable website.

Further reading

Thanks for reading!

Know someone who would enjoy this? Send it their way.

More articles

Read next

Networking & Internet 8 min read

What Is a Local Area Network (LAN)? A Friendly Guide

A LAN links devices in a home, office, or other local space so they can share resources and reach the internet. See how switches, routers, and Wi-Fi fit together.

nbkhope
Networking & Internet 7 min read

What Is the Internet? How the Global Network Works

The internet is a global network of networks. Follow a web request from your screen through DNS, packets, routers, and servers—and learn why the web is only one part of it.

nbkhope

Comments

Be kind and specific. Comments with links from new accounts appear after a moderator reviews them.