Let's start with the basics. In this article I will briefly explain what a server is, what a client is (your PC/tablet/smartphone) and how the browser works.
Meanwhile, what is a website made of?
Answer: from a set of files stored on the server.
When you write “www.nomedelsito.com” from your browser, which could be Firefox, Chrome, Opera, Edge, etc., the browser connects to a system called DNS, i.e. Domain Name Server, which knows the association of the name domain name (sitename.com) to the IP (internet protocol) address of the server.
A little step back: what is the IP address?
Everything connected to the internet is identifiable by an IP address, which is like the phone number of that device: Your cell phone has an IP address (in addition to your regular phone number), your computer, your tablet, and so on.
Likewise, servers also have an IP address.
If you want to know what your IP address is, Click here.
So what happens after I type the domain name into my browser?
The domain name server, once it has read the domain name, connects your computer to the IP of the server where the site you are looking for is located, according to a dynamic called client-server.
How does the client-server dynamic work? The mechanism is technically complicated, but it can be interpreted in a very simple way 🙂
The server responds to the call from your PC (the client) by sending some files, first of all index.php or index.html, which are INTERPRETED by the browser which transforms them into the site you are visiting at the moment.
So:
I type web.easygreenhosting.com, or google.com or any other domain name
DNS finds the IP of the server that hosts the site you are looking for
the server sends the files of that site to your computer, also identified by IP
your PC browser (the client) interprets those files and transforms them into an understandable and visitable website
End of story 🙂
This explanation is very simple. You might ask:
- what happens when I click on different pages?
- How do secure pages work versus insecure ones?
- what is written in the files sent by the server?
- why are there different types of browsers?
- How does the browser interpret the files sent by the server?
- etc etc
The world of the internet is truly vast, but to build a website you don't need to know everything.
However, a more in-depth knowledge is useful for solving the various problems that gradually arise while building a site.
In the next posts we will try to understand how to take the first steps to bring our website to life.
Are there any questions? Post a comment in the form below!
Best regards,
Michele.