• Home
  • Tech
Safha
  • Home
  • Tech
    • All
    • Windows
    What is a Virtual IP (VIP)?

    What is a Virtual IP (VIP)?

    Private Vs Public IP Addresses

    Private Vs Public IP Addresses

    Proxy Vs Reverse Proxy

    Proxy Vs Reverse Proxy

    Content Delivery Network (CDN)

    Content Delivery Network (CDN)

    Building Modern IT Data Centers

    Building Modern IT Data Centers

    What is Virtualisation?

    What is Virtualisation?

No Result
View All Result
  • Home
  • Tech
    • All
    • Windows
    What is a Virtual IP (VIP)?

    What is a Virtual IP (VIP)?

    Private Vs Public IP Addresses

    Private Vs Public IP Addresses

    Proxy Vs Reverse Proxy

    Proxy Vs Reverse Proxy

    Content Delivery Network (CDN)

    Content Delivery Network (CDN)

    Building Modern IT Data Centers

    Building Modern IT Data Centers

    What is Virtualisation?

    What is Virtualisation?

No Result
View All Result
Safha
No Result
View All Result
  • Home
  • Tech
Home Tech

How a website is accessed from a Web Server

Chief Editor by Chief Editor
March 9, 2025
in Tech
0
How a website is accessed from a Web Server
0
SHARES
34
VIEWS
Share on FacebookShare on Twitter

Accessing a website involves multiple steps that include DNS resolution, establishing a connection, requesting web resources, and rendering the page. Here’s a breakdown of the process:

1. User Enters a URL in the Browser

The user types a website URL (e.g., https://www.example.com) into the browser’s address bar and presses Enter.

2. DNS Resolution (Finding web server’s IP Address)

Domain Name System (DNS) resolves FQDNs (Fully Qualified Domain Names) into their corresponding IP addresses.

Steps in resolving FQDNs to IP addresses
  1. End user enters https://example.com in its PCs browser.
  2. Browser checks its local cache for example.com’s public IP address
  3. If not found in local cache, browser will send the request to its broadband ISP (Internet Service Provider). ISP will check in its Resolver Server cache memory. If it cannot find the IP address, it will send a request to the Root Server.
  4. Root Servers are the top of the DNS hierarchy.
    • There are 13 sets of root servers strategically placed around the world
    • and are operated by 12 different organisations.
    • Each root server set has its own unique Public IP address.
    • Its job is to confirm the Top Level Domain Server (TLD) to the resolver.
  5. So, when root server receives the query for the IP address of the FQDN (example.com), root server will check its database for .com TLD server’s IP and give it to the resolver.
  6. Resolver will then send the IP address query to the TLD server for google.com.
  7. TLD Server only maintains the database of Authoritative Name Servers (ANSs) and will return the IP of the ANS for .com to the resolver.
  8. Resolver will then send its query to the ANS for .com for the IP address of example.com.
  9. ANS will respond with the corresponding Public IP address for example.com to resolver.
  10. Resolver will return the public IP address to the end-user’s browser.
  11. Browser will initiate and TCP 3-way handshake with the webserver hosting example.com

3. TCP 3-way Handshake & TLS Secure Connection (if HTTPS is used)

The browser establishes a Transmission Control Protocol (TCP) connection with the web server using a three-way handshake. If the site uses HTTPS, a Transport Layer Security (TLS) handshake follows to encrypt the communication.

TCP Three-way handshake

TCP uses a three-way handshake to establish a reliable connection between a client and a server. The handshake ensures both parties are ready to communicate and agree on initial parameters like sequence numbers.

Steps of the TCP Three-Way Handshake:

  1. SYN (Synchronize) – Client to Server:
    • The client initiates the connection by sending a SYN packet to the server.
    • This packet contains an initial sequence number (ISN) for tracking data.
  2. SYN-ACK (Synchronize-Acknowledge) – Server to Client:
    • The server responds with a SYN-ACK packet.
    • It acknowledges the client’s SYN by setting the ACK flag and an acknowledgment number.
    • It also sends its own ISN to the client.
  3. ACK (Acknowledge) – Client to Server:
    • The client sends an ACK packet to confirm the connection.
    • The sequence numbers are updated, and the connection is established
TLS Handshake

TLS Handshake Process

  1. Client Hello (Client → Server)
    • The client (browser) initiates the handshake by sending a ClientHello message.
    • It includes:
      • Supported TLS versions (e.g., TLS 1.2, TLS 1.3).
      • List of supported cipher suites (encryption algorithms).
      • A random number for session key generation.
  2. Server Hello (Server → Client)
    • The server responds with a ServerHello message.
    • It includes:
      • The TLS version and cipher suite selected
      • A random number for session key generation
      • The server’s digital certificate (X.509) issued by a Certificate Authority (CA)
  3. Server Certificate Authentication
    • The client validates the server’s certificate:
      • Checks if it’s signed by a trusted CA
      • Ensures the certificate is not expired or revoked
      • Confirms the certificate matches the requested domain
  4. Keys Exchange and Session Key Generation
    • TLS1.2 and Earlier
      • The client encrypts a pre-master secret using the server’s public key and sends it.
      • The Server decrypts it using its private key
      • Both parties use this secret to derive a shared session key
    • TLS1.3 – More Secure
      • Uses Elliptic Curve Deffie-Hellman (ECDHE) for key exchange
      • The client and server exchange ephemeral keys to generate a shared session key without exposing it.
  5. Finished Messages & Secure Communication
    • Both client and server send a Finished message encrypted with the session key
    • The connection is now fully encrypted and secure for data transfer

4. Sending HTTP Request

  • The browser sends an HTTP GET request to the web server requesting the web page (e.g., GET example.com).

5. Web Server Processes the Request

  • The web server (e.g., Apache, Nginx) processes the request.
  • It retrieves the required resources (HTML, CSS, JavaScript, images, etc.) from the storage or database.
  • The server responds with an HTTP response containing the requested page and a status code (e.g., 200 OK).

6. Receiving and Rendering the Web Page

  • The browser receives the HTML and starts rendering the page:
    1. HTML Parsing → Browser constructs the DOM (Document Object Model).
    2. CSS Parsing → Styles are applied to elements.
    3. JavaScript Execution → Scripts are executed, modifying the page dynamically.
    4. Rendering & Painting → The browser combines everything and displays the web page.

7. Additional Resources Loading

  • The browser may load additional images, videos, fonts, or external scripts asynchronously.
  • Content may continue updating dynamically via AJAX requests or WebSockets.
Tags: DNSDNS ResolutionInternetpage renderingTCPTCP/IPWebsite
Previous Post

XML file parsing with Python

Next Post

What is Virtualisation?

Chief Editor

Chief Editor

Next Post
What is Virtualisation?

What is Virtualisation?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Trending
  • Comments
  • Latest

How to do a clean Install of Windows 11

January 28, 2025
How a website is accessed from a Web Server

How a website is accessed from a Web Server

March 9, 2025
What is Virtualisation?

What is Virtualisation?

February 15, 2025
XML file parsing with Python

XML file parsing with Python

January 29, 2025

How to do a clean Install of Windows 11

0
Unzipping multiple Zip Files in a folder using Python

Unzipping multiple Zip Files in a folder using Python

0
Installing third party modules in Python

Installing third party modules in Python

0
XML file parsing with Python

XML file parsing with Python

0
What is a Virtual IP (VIP)?

What is a Virtual IP (VIP)?

March 7, 2025
Private Vs Public IP Addresses

Private Vs Public IP Addresses

February 21, 2025
Proxy Vs Reverse Proxy

Proxy Vs Reverse Proxy

February 16, 2025
Content Delivery Network (CDN)

Content Delivery Network (CDN)

February 16, 2025
  • Home
  • Tech

© 2025 Safha - We are all about Technology and Finance Learning and Knowledge Sharing

No Result
View All Result
  • Home
  • Tech

© 2025 Safha - We are all about Technology and Finance Learning and Knowledge Sharing