Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Every web request starts with typing in or clicking something on the web. Often times you find what you need using a URL, but URLs can also be hidden behind hyperlinks. Included in a URL is a domain name. Domain names are really just catchy versions of IP addresses and domain name servers make the connection between domain names and IP addresses. Clients and servers are designed to talk to each other using the HTTP protocol, the common set of rules they've agreed to use.
[MUSIC]
0:00
What actually happens in between typing in
teamtreehouse.com and seeing the website?
0:04
If point a is the browser on your
computer, and point b is a web server
0:10
hosting teamtreehouse.com, everything in
between is the cloud, right?
0:14
Well, yes and no.
0:20
In between each browser request and server
response are one or
0:21
multiple pieces of software, most of them
speaking to each other using
0:25
a common protocol called HTTP, or the
Hypertext Transfer Protocol.
0:29
Let's start with an overview of how the
Web works, and
0:35
then explore each step individually.
0:37
Every website you've browsed started with
a client sending a request to a server.
0:40
A client is anything that can request a
resource on the web.
0:46
A few examples are computers, laptops,
phones, and tablets.
0:50
But even software programs themselves can
be clients.
0:54
When a client, you and your computer,
types a URL into the address bar,
0:58
you are sending a request to a server.
1:03
The internet is a net of computers all
connected together by various cables.
1:07
It's made up of wires, routers, switches
and
1:13
satellites, connecting the network of
servers together.
1:15
These servers can perform a lot of tasks.
1:20
A few server examples are web servers that
host web sites,
1:23
domain name servers that connect domain
names with IP addresses, or
1:28
mail servers that send and accept email
messages.
1:32
All of these things are considered part of
the internet.
1:37
Housed on servers are the files, folders
and media that make up webpages.
1:41
These files, folders and media are all
software and
1:47
are what we're talking about when we say
the web.
1:51
The web is the software that makes up
websites, applications,
1:55
games, wikis and videos that you can
access on a web browser.
2:00
As you know, there are a lot of different
web browsers out there.
2:05
Safari, Firefox, Chrome, and Internet
Explorer to name a few.
2:09
There are also many types of clients,
mobile phones, apps, and games.
2:13
In order for everyone to play nicely
together, they have to speak the same
2:20
language, and that language is called
HTTP, or Hypertext Transfer Protocol.
2:24
Nearly all HTTP requests start with you
2:31
typing in a domain name like
teamtreehouse.com.
2:34
Servers, however, use numbers to locate
each other, not words.
2:39
These numbers are called IP addresses and
work similarly to how phone numbers work,
2:43
with each IP address pointing to a
particular server on the Web.
2:49
The service in the middle, between the
domain name you type in and
2:53
the IP address used by the server, is
called a Domain Name Server, or DNS.
2:58
Once the DNS finds the IP address or phone
number you asked for with the domain name,
3:05
it rushes your request along to the server
hosting the website.
3:11
For now, we can think of this request as a
stamped, self-addressed envelope
3:16
sent to the website's IP with a return
address of your computer's IP.
3:21
When the envelope is delivered to the
server hosting the website,
3:27
the server sends the envelope back to you
with the website you wanted.
3:31
When this happens, the HTTP trip is over
and you have the thing you asked for.
3:36
Now that took a long time to explain, but
usually this all happens very quickly,
3:42
like, in under a second, and it's getting
faster all the time.
3:46
Now that we're familiar with the process
of what happens when we surf the web,
3:50
let's break down each step in more detail.
3:54
You need to sign up for Treehouse in order to download course files.
Sign up