Learn

GuideWebsites & apps

How a website works: frontend, backend, and hosting

A website is a collection of connected pages and resources that a browser can display. A web app adds useful interactions, such as saving a reading list or booking a place at an event. The boundary between the two is flexible.

When a bot offers to build your website, you do not need to choose every technology. You do need to know where the page lives, where information is saved, and what “finished” should mean.

Follow one visitor

Imagine a fictional event called Lantern Night. Its website shows a date, a location, and an RSVP button. Here is a simplified journey from opening the page to reserving a place.

Opening a website uses a DNS lookup and a request for page files. Submitting an RSVP is a separate request to backend checks and a database, which returns a confirmation or error.

Swipe sideways to see the whole diagram, or open it full size.

One visit, two kinds of request. A page can load successfully even when a later reservation request fails. DNS lookup does not carry the page or the reservation.

Figure explanation: The first panel, Open the page, shows the visitor's browser asking for a hostname's DNS answer and receiving an address. A separate pair of arrows connects the browser to the website files: a page request goes out and HTML, CSS, and JavaScript come back. The second panel, Reserve two places, shows an RSVP form sending a request to backend checks. Those checks save an accepted reservation in a database, receive its saved result, and return a result to the form. Confirmation follows a saved result; a failed request stays an error. This is a simplified fictional website.

1. Find the destination. The visitor enters a web address. DNS, the Domain Name System, helps turn its hostname into an address computers can use. An existing connection or saved DNS answer can shorten this step.

2. Ask for the page. The browser requests resources using HTTP, the communication rules used by websites. HTTPS protects that communication using TLS encryption. The browser may receive content from the site's hosting service or a delivery service in front of it.

3. Display the page. HTML describes its content and structure. CSS controls presentation. JavaScript can add behavior, such as opening an RSVP form. The browser combines these resources into what the visitor sees. [1]

4. Submit a request. In our example, the visitor chooses two places and presses “Reserve.” The browser sends that request to the app's server-side code.

5. Save and answer. That code checks whether two places remain, records the reservation, and returns a result. The page shows “Two places reserved” only after a successful response.

That final distinction matters. A button changing color proves that something happened on screen. It does not, by itself, prove that the reservation was saved.

Sources

  1. MDN, How the web works and Transport Layer Security. Checked 2026-09-25.
  2. MDN, Introduction to the server side. Checked 2026-09-25.
  3. MDN, What is a web server?. Checked 2026-09-25.
  4. Cloudflare, What is a CDN?. Checked 2026-09-25.
  5. CERN, A short history of the Web. Checked 2026-09-25.

Cookie preferences