How does the web actually work? It is easier than you think!

Each website is composed of multiple layers. But where are those layers stored and how do they work? It is quite simple once you see it...


Similar tags

server hosting e-commerce google page speed php bug network domain coding tips web development seo explained wordpress css

More posts

Which hosting to choose and why? A simple guide for a complex problem!
10 Apr 2020 11 minutes read

Which hosting to choose and why? A simple guide for a complex problem!

Today I am going to write about hosting and the questions that you may encounter while choosing the best option for your next project. It may look like a simple task but that is where you are wrong. It is quite a difficult one! There are thousands of hosting companies and each of them will have something different regarding their offer. Suddenly your choice is not easy anymore!

COVID-19 is a bug on production but the checkout is still working
15 Mar 2020 8 minutes read

COVID-19 is a bug on production but the checkout is still working

With over 130.000 infected, COVID-19 is rapidly becoming a burning theme. So let us discuss how that affects the web industry. Of course, this is one of the least affected industries today since most of the people in it are able to work remotely quite easily. But is it that easy?

How to optimise images for your website
02 Apr 2025 5 minutes read

How to optimise images for your website

Learn how to optimise images for the web using modern techniques like WebP format and lazy loading. Improve your site’s loading speed, boost SEO, and enhance user experience with these simple yet effective strategies.

Many people are curios about how web actually works, so now I will try to explain it.

We have already talked about DNS records, and it is important to understand DNS first. Bur just to recap: Humans use street names for orientation and computer uses IP addresses. DNS is just a system that resolves website name (for example google.com) to an IP address (for example 142.250.64.78). Now that we got that out of the way lets begin with inner workings of an average website.

Websites are composed of multiple layers. But where are those layers stored? They are all stored on a server (which has an IP address). You can find out more about servers and their configuration in this post.

Each web server will have Operating System installed. In most cases, it would be Linux or Windows. One important thing that we would need in order to run our website is the actual server software installed as well. In most cases, it would be Apache, NGINX or IIS. This is the software that is responsible for the actual delivery of your website. With server software installed we would now need an installed programming language like C#, PHP, JAVA, Ruby, or some other language. After our programming language is installed we would now need someplace to store our data - SQL, MySQL, or MariaDB are used usually.

The diagram above explains the entire pipeline. This is what happens when you try to access a website.

Here is how web actually works:

  • You type a website name into the URL bar
  • The browser looks for DNS server IP address and sends website name to it
  • DNS server responds with an IP address of the desired website
  • Your browser sends a request to a specified IP address
  • After web server receives a request it starts to process the request which means it loads up a website's code and processes it depending on your request
  • Usually, website code will use the database to store data, so now website code will talk to the database in order to retrieve desired data
  • After the code of our website retrieves data, the website's code starts to generate a response
  • The response will usually be an HTML output which your browser would process and you will be presented with a beautiful website

This is a very simplified explanation, of course, there are other things that are happening during this entire process. For example one of the things may be a "two-way handshake" or establishing a secure SSL connection, which is displayed as https in your browser URL bar. But overall that is how the web actually works!

For example, we may encounter a web server that uses a load balancer. But as I said, I will try to keep this as simple as possible.

I hope you have found out something new today, in my next posts I will try and go over some server technologies and my favorite setup!

As always, stay safe and #keepCoding!

Tired of guessing what's holding your website back?

Our Advanced Tracking Tool provides crystal-clear insights into your Core Web Vitals and its URL's HTTP status. Understand exactly where performance dips and errors occur, empowering you to make data-driven decisions that optimize your site's health, user experience, and ultimately, your bottom line.

START MONITORING FOR FREE

No payment required!

We use cookies to improve your experience on our website. Some cookies are essential for the site to function, while others help us understand how you use our site (e.g., Google Analytics) so we can improve it. For more information, please read our Privacy Policy and Cookie Policy