
[Objectives]
[Prerequisites]
What web is?
How does Web work?
What are the differences between client and server?
How the HTTP protocol works?
What a DNS Server is?
[Prerequisites]


Hello


Hi!
What will we learn today?
What will we learn today?

What Web is?

Is it the answer or you are really asking me the question?

Both…

I do not really understand the question actually…
What Web is? Is it the Internet?
What Web is? Is it the Internet?


No, actually the Web is just an Internet part.
It comes from the World Wide Web, it is a name which includes all applications that communicate with the HTTP protocol, HyperText Transfer Protocol.
And Internet represents all connected public systems.
It comes from the World Wide Web, it is a name which includes all applications that communicate with the HTTP protocol, HyperText Transfer Protocol.
And Internet represents all connected public systems.

Here we go! I didnt understand anything!

Look the diagram

There are some protocols that you can find through the Internet!

There are some protocols that you can find through the Internet!

But there’s so many of them!
What is a protocol by the way?
What is a protocol by the way?

Yes, they are many!
The protocol is just the language and the way to communicate between 2 applications on two different PC across a network.
The protocol is just the language and the way to communicate between 2 applications on two different PC across a network.

I thought computers spoke only binary!

Indeed, it’s the case, but each software does not use and does not interpret the binary in the same way.
Each application which has to send informations to a pc through networks, private or public, use a protocol.
Finally, in the web part of the Internet everyone communicates with the same protocol, it is the HTTP.
And it is also in the web part that you can find all the websites, it is what we are interested in!
Each application which has to send informations to a pc through networks, private or public, use a protocol.
Finally, in the web part of the Internet everyone communicates with the same protocol, it is the HTTP.
And it is also in the web part that you can find all the websites, it is what we are interested in!

Ok, it is easier like that!

Now that you understand what we’re going to study, let’s start by defining who’s who…
do you know what the difference between a server and a clientis?
do you know what the difference between a server and a clientis?

The client is the guy who pays the server?


In programming…
Though… with an analogy and a lot of imagination, we can see this as… perhaps.
Let’s start with the boring stuff, the vocabulary…
But it quiet simple, a server is a PC which runs server software.
In other words and for our case, it is the computer which stores the websites and which allows to run it.
The client, it is simple, it is the other.
It is the software which queries the server.
Through misuse of language, we say that it is the whole PC… Anyway dont go to too much trouble!
There are several different server, so for the web, we need a web server.
Though… with an analogy and a lot of imagination, we can see this as… perhaps.
Let’s start with the boring stuff, the vocabulary…
But it quiet simple, a server is a PC which runs server software.
In other words and for our case, it is the computer which stores the websites and which allows to run it.
The client, it is simple, it is the other.
It is the software which queries the server.
Through misuse of language, we say that it is the whole PC… Anyway dont go to too much trouble!

There are several different server, so for the web, we need a web server.


Ok, nothing complicated so far!
And, I well recognize me in green!
And, I well recognize me in green!


Do you know what a browser is?

Is it google? Or Internet explorer?

Well, Google it’s a company that have their own browser… it’s not just a browser.
More generally, it is a program that allows you to… browse websites.
More generally, it is a program that allows you to… browse websites.

Okay, but I knew it.


I dont doubt it! 

Simple verification…
Do you know how to visit a specific website?


Simple verification…
Do you know how to visit a specific website?

You type the website name in the top bar…

Not bad, but you need the exact address of the website! A letter more or less, and that’s the drama, you’re lost!

I would be lost on my search engine… I will be ok…

This is because I have the 2 web addresses.
https://www.development-tutorial.com and https://www.development-tutorial.com
I know there are some who will be wrong.
I redirected the website without s, to the website with a s.
Nothing very complicated… Remove any other letter, and you’ll see a nice mistake :).
To be accurate, the website address is an URL, Uniform Resource Locator.
https://www.development-tutorial.com and https://www.development-tutorial.com
I know there are some who will be wrong.

I redirected the website without s, to the website with a s.
Nothing very complicated… Remove any other letter, and you’ll see a nice mistake :).
To be accurate, the website address is an URL, Uniform Resource Locator.

Ok, but I dont know what is an URL…

Just remember it… I wont teach here what exactly is an URL. It is just an network location.
Just when people talk about URL, 95% of cases it is about a web address.
Just when people talk about URL, 95% of cases it is about a web address.

Ok…
Is it possible to have 2 different sites for the same web address?
On the other side of the globe, for example?
Is it possible to have 2 different sites for the same web address?
On the other side of the globe, for example?

No, it’s not! The web address is unique and it will show you only one website.
It’s a bit like the complete home address, with the country included in the address.
There’s only one!
But beware, this rule works only by network. And we are talking about the public network, the web.
It’s a bit like the complete home address, with the country included in the address.
There’s only one!
But beware, this rule works only by network. And we are talking about the public network, the web.

Ok, so if I understand correctly, each address is unique in the world and queries for a only website.

Yep!


And how does my browser find a website on the other side of the planet?

Very good question!
In your URL you have a domain name, which is there.

You have to understand 2 things…
First point, it is this part which make your website unique
And also, the domain name has been made to make the address web easy to remember for humans, but it is not too much suitable for computers.
In your URL you have a domain name, which is there.

You have to understand 2 things…
First point, it is this part which make your website unique
And also, the domain name has been made to make the address web easy to remember for humans, but it is not too much suitable for computers.

Oh really, why?

The computer does not understand words. He understands binary!

We just have to translate the letters by binary and everyone is happy!

Yes, but no! 
In fact you need a code which allows you to know where the server is on the planet, a code which allows you to locate it. We need a hierarchy!
If you give your pc any code, that wont really help.

In fact you need a code which allows you to know where the server is on the planet, a code which allows you to locate it. We need a hierarchy!
If you give your pc any code, that wont really help.

How?

When you ask your browser to get a website, it ask a first server that your pc knows the code of website that you requested.
This code is simply the IP address of the web server, a Internet Protocol address.
It’s a 4 x 8 bit code, but for now we do not care.
In general, IP addresses are read in this way:
195.144.11.124,
4 number sequence between 0 and 255, but we will not see that now.
We replace the binary with numbers, we can read it more easily.
This code is simply the IP address of the web server, a Internet Protocol address.
It’s a 4 x 8 bit code, but for now we do not care.
In general, IP addresses are read in this way:
195.144.11.124,
4 number sequence between 0 and 255, but we will not see that now.
We replace the binary with numbers, we can read it more easily.

Ok for the IP address, I had already heard about it anyway.
But what is this server that knows the location of other sites?
And why my pc can not directly access the website if I type the address?
But what is this server that knows the location of other sites?
And why my pc can not directly access the website if I type the address?

It would mean that all the PCs around the world would have to be updated for every new website, it would be too complicated.
It is the DNS server role, Dynamic Name System server to give your PC the website IP address you want to visit.
It is the DNS server role, Dynamic Name System server to give your PC the website IP address you want to visit.


And how my pc knows the location of this DNS server?

It is saved to your settings. Without its IP address, you cant be connected to the Internet but, in general it is a automatic operation.

But how many DNS servers there are in the world? One?

It’s a bit complicated.
There are a lot of DNS server copy to speed up the queries, but at the lowest layer, there are only 13 in the worlds.
Your hosting provider has one for example, it is only copies IPs from the user queries.
There are a lot of DNS server copy to speed up the queries, but at the lowest layer, there are only 13 in the worlds.
Your hosting provider has one for example, it is only copies IPs from the user queries.

And with the IP can I know where the website is?

Yep, it works like the fixed phone numbers.
That is to say, the first number represents a large area, then the second, a smaller area in the first zone and so on.
Type my IP address on this website and you should find the web server location hosting this web site.
http://geoipinfo.org/
That is to say, the first number represents a large area, then the second, a smaller area in the first zone and so on.
Type my IP address on this website and you should find the web server location hosting this web site.
http://geoipinfo.org/

I found it! Not bad!
He found me too!
That’s cool! 🙂
And is possible it to avoid the DNS server to go to the Internet?
He found me too!
That’s cool! 🙂
And is possible it to avoid the DNS server to go to the Internet?

Yes, if you know the IP address.
Simply type it in the address bar.
http://195.144.11.124
Simply type it in the address bar.
http://195.144.11.124

Uh… it does not work! It sucks!


Yes, it is because my host shares the server on which I am, so for this IP address, you can find several website.

Ok, but you can have several website with the same IP address?

The IP gives you only the server location, after the owner does just what he wants with it.
Well, lets try with Google!
Well, lets try with Google!


We are going to hack Google?


Not at all.. Calm down!


How do I find the Google IP address?

You open your command prompt.

My what?

On windows, at the same time, click on the
+
, then click on
.
Or on linux,
+
+
.
If you can not do this, you can see how to open the command prompt
on Windows, on Linux or on Mac.



Or on linux,



If you can not do this, you can see how to open the command prompt
on Windows, on Linux or on Mac.

And now, what have to do when I open the command prompt?

Type nslookup www.google.com”
It allows you to directly queries the DNS server which is already set up in parameters, the Google IP address.
It allows you to directly queries the DNS server which is already set up in parameters, the Google IP address.


I got several addresses.

The first one is the DNS IP address and the second one is the Google IP address.
So, try to type the Google IP address in the address bar of your browser and you will see. 🙂
So, try to type the Google IP address in the address bar of your browser and you will see. 🙂

Oh yes… I found Google… not too much surprised in fact.



And do you understand why?

Because my browser already knows the IP address…?

Correct!
Your browser asks the server the website HTML code and the server sends it to you.
Your browser asks the server the website HTML code and the server sends it to you.


The HTML code?

The code your browser will read to display a website properly.
We will study it in the following tutorial.
You can find the next tutorial on
What is a website?
We will study it in the following tutorial.
You can find the next tutorial on
What is a website?

Is it really useful what I read?

It is important to understand, to be able to solve your future bugs, to understand who is the client, who is the server and where the code comes from!

Ok, thanks, Kiss!


Kiss…

Leave a Reply