In this lesson,
we're going to explore web ports and protocols.
Now, when we refer to web ports and protocols,
we're referring to the standardized rules
and numerical gateways
that are used to govern data transmission and communication
over the internet for websites and web pages.
There are two main ports used for the web,
and these are port 80 and port 443,
and each one is going to use a different protocol
for its communication over these numerical ports.
Ports are integral to how the internet functions.
Ports allow computers to distinguish
between different types of traffic and services.
Port 80 and port 443 are two fundamental ports
used for web browsing and internet communication,
but they do serve different purposes
and offer different levels of security.
First, let's take a look at port 80, which is used for HTTP.
Now, HTTP, or the Hypertext Transfer Protocol,
relies on port 80 by default.
HTTP is the foundation of data communication
on the World Wide Web.
Anytime you visit a website
by typing in a URL like diontraining.com,
and you do this in your browser
and you don't specify a port,
your web browser is automatically and by default
going to use port 80 to request the webpage
from that server.
Hypertext Transfer Protocol is an application layer protocol
that's designed to enable communications
between clients and servers.
HTTP works by sending plain text requests
from a client, like a web browser, over to a server,
which in turn then sends back a plain text response
with the requested content, such as HTML pages, images,
and other types of web media to the requester's web browser.
Now, for a long time, HTTP and port 80
were used for most of the website traffic
being sent over the internet,
but there is one major drawback to using HTTP over port 80,
and that is a lack of security.
Now, data transferred via HTTP
is going to be sent in plain text,
and this means it is not encrypted.
This makes any data
that's being sent over port 80 using HTTP
vulnerable to eavesdropping and on-path attack
because that data could be read or modified by an attacker
as it's transmitted over the local or wide area network
between the two systems
that are involved in that communication session.
This vulnerability is especially problematic
when you're transmitting sensitive information,
like your login credentials or your personal data.
For this reason, you should never enter
any sensitive information, like your username,
your password, or your credit card details
into a webpage that is sending its data back to the server
over port 80 using HTTP.
Instead, we want to rely on a secure alternative to HTTP,
and this brings us to our second port
that you need to be aware of for web browsing,
and that is port 443.
Port 443 is used by HTTPS,
which is also known as the Hypertext Protocol Secure,
or HTTP Secure.
HTTPS is essentially the exact same protocol as HTTP,
but it adds a layer of encryption by sending the data
through a secure socket layer, or SSL tunnel,
or the newer and more modern variant,
which is called the transport layer security,
which is also known as a TLS tunnel.
Now, these tunnels use encryption to ensure
that any data transferred between the client and the server
is going to be encrypted,
and this secures it from interception or tampering
by an attacker.
Now, anytime you visit a website
and you see https:// in the URL
or you see that little green padlock,
this means your browser established a connection
using port 443.
Remember, the S in HTTPS stands for secure,
and it indicates that all the communications
between your browser and the website
are going to be encrypted.
This is achieved using the SSL,
or secure socket layer tunnel,
or using TLS, the transport layer security protocol,
which will then encrypt the data before it's sent,
and then it will decrypt it
upon its arrival at the destination.
The use of HTTPS over port 443 is particularly important
for any website that's going to be handling sensitive data,
such as online banking, e-commerce websites,
and any website with a login page.
In fact, this is so important that many websites
have set up an automatic redirection
so that anytime somebody tries to access their site
over the more insecure HTTP connection using port 80,
the website will actually redirect them automatically
to the HTTPS version of that website over port 443 instead.
For example, if you enter
http://www.diontraining.com in your web browser,
you are specifically asking our server
to send you the insecure plain text version of our website.
When you do that though, our server is going to see
that you want that insecure version,
but we're not going to provide it to you.
Instead, we automatically redirect you
to our secure version of our website
at https://www.diontraining.com
because our website does ask
for some sensitive information from you,
like your user's login and password
if you're accessing your courses through our website
or your name and credit card information
if you're trying to buy a discount exam voucher
from our website.
So what are some key differences between HTTP over port 80
and HTTPS over port 443?
Well, we have three main areas that we need to cover.
These are security and encryption, default usage,
and search engine optimization, known as SEO and trust.
First, we have security and encryption.
Now, the most significant difference
between HTTP and HTTPS is security.
Any traffic sent over port 80 is going to be unencrypted
and sent in plain text using HTTP.
On the other hand, any traffic sent over port 443
is going to be encrypted and sent using HTTPS.
Now, data sent over port 443 utilizes SSL or TLS encryption,
which makes it a more secure option
against data breaches and eavesdropping attacks,
which is why you should always use HTTPS over HTTP.
Second, we have to consider the default usage.
Now, port 80 is traditionally used
for unsecure web browsing, and that was the default
used by all servers and web browsers since 1991,
which was over 35 years ago.
Now, port 443, on the other hand,
was introduced a few years after that, back in 1994,
as a method for securing and encrypting
web browsing traffic,
but it really didn't become the default
used by most web browsers until about 10 to 15 years ago.
These days, over 95% of all web browsing traffic
is being sent over port 443 using HTTPS
instead of relying on the older and insecure
hypertext transfer protocol over port 80.
Third and finally, we have SEO and trust.
Now, since modern web practices favor HTTPS over HTTP
due to that increased security, most search engines
will also rank websites higher in their search results
if they're utilizing HTTPS over port 443
instead of using HTTP over port 80.
This is because more users trust these websites
and because the data is being encrypted
for their protection.
This in turn feeds the search engine's algorithms
by seeing additional traffic
sent to the HTTPS versions of those websites
because they are more trusted by the end users.
This, again, feeds the algorithm,
and the algorithm ranks that website higher.
So remember, when it comes to web ports and protocols,
you need to remember that port 80 utilizes HTTP
and port 443 utilizes HTTPS.
Now, HTTP is insecure and it sends data in plain text.
HTTPS on the other hand, is more secure
because it encrypts all of its data
before it's being transmitted
between the server and the client.