Let’s start from 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.
First, what is a website made of?
Answer: from a set of files stored on the server.
When from your browser, which could be Firefox, Chrome, Opera, Edge, etc, you write ‘www.sitename.com’, the browser connects to a system called DNS, ie Domain Name Server, which knows the name association between the domain name (sitename.com) and the server’s internet protocol (IP) address.
A small 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 mobile phone has an IP address (in addition to the normal telephone 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 typing the domain name in my browser?
Once the domain name has been read, the domain name server 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 client-server dynamics work? The mechanism is technically complicated, but it can be interpreted in a very simple way 🙂
The server answers the call of your pc (the client) by sending some files, first of all index.php or index.html, which are INTERPRETED by the browser and transformed into the site you are visiting at the moment.
Therefore:
I type web.easygreenhosting.com, or google.com or any other domain name
The DNS finds the ip of the server hosting the site you are looking for
The server sends the files of that site to your computer, also identified by IP
The browser of your pc (the client) interprets those files and transforms them into an understandable and visitable website
End of the story 🙂
This explanation is very simple. You may be wondering:
- What happens when i click on the different pages?
- How do secure pages work compared to unsafe ones?
- What’s 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 deeper knowledge is useful to solve the various problems that arise while building a site.
In the next posts we will try to understand how to take the first steps to give life to our website.
Are there any questions? Post a comment in the form below!
Best wishes,
Michele.