How the Web Works
Understand the client-server model, HTTP requests and responses, and what happens when you visit a website.
Learning objectives
- Explain the client-server model
- Describe an HTTP request and response
- Identify the roles of DNS, hosting, and content
Clients and servers
Every time you visit a website, your browser (the client) sends a request across the internet to a server that stores the site's files. The server processes the request and sends back a response, usually an HTML page along with its stylesheets, scripts, and images.
This two-sided conversation is called the client-server model and it is the foundation of everything we build at Wireframe Web Solution.
Anatomy of a request
An HTTP request is a small set of instructions with a method (like GET or POST), a path, and headers. A simplified example:
GET /index.php HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0The server replies with a status code and the requested content:
HTTP/1.1 200 OK
Content-Type: text/html
<!DOCTYPE html>
<html>...</html>Where does DNS fit in?
Before a request can travel, the browser must translate a human-friendly domain such as example.com into the numeric IP address of the server. That lookup is performed by the Domain Name System (DNS).
If DNS is slow or misconfigured, even a perfectly built website will feel broken. That is why hosting quality and DNS health are part of every project we deliver.
Key takeaways
- The web runs on request-response conversations between clients and servers.
- HTTP status codes tell you whether a request succeeded or failed.
- DNS connects domain names to servers and is critical to site health.