Before we discuss the difference between Port 80 and Port 8080, first we need to understand how this world of the Internet actually works.

In this fast growing digital world everything is connected to the internet, maybe it is your smartphones, smart TV, smart bulbs, smart switches, smart watches or any other such things. Also, everything connected to the internet has an unique IP address that uniquely identifies that device on the internet. The IP addresses themselves are of two types, Public IP addresses, that are accessible to anyone who is connected to the Internet, and other id Private IP addresses that are accessed only over a closed network, say for example Local Area Network(a network that you usually find in your college or offices).

But, whether it is a closed network like LAN or an open network like the Internet, both have one thing in common i.e. router, which is responsible for translating the packets between your local network and internet. Apart from this it is also responsible to reuse the private IP addresses within its own private network. For example, 192.168.1.100(the default private IP address of a router) exists thousands of times all over the world. You can also read about Port Forwarding here

However, NAT(Network Address Translation) a primary feature of your router translates either one or more local IP addresses to one or more Global IP addresses and vice versa to provide the Internet connectivity to the local hosts. Apart from this it is also responsible for masking the port number number of the host with another port number into the packet that will be routed from source to destination.

Now going into more details, mostly all public addresses have their unique name which is known as DNS hostname. This is also true in case of private IP addresses. The most common example to understand this is to open Command Prompt on your system and type ping www.google.com. You will find that it is translated to an IP address which is 172.217.27.196, and is sending a packet to it and shows the time to get a response back.

ping Google

So the public IP address 172.217.27.196 has a hostname Google.com, and a prefix WWW means that it is a web application that can be accessed by all the people connected to the Internet.

If we talk about private IP addresses then the universal hostname for self is localhost and the universal IP address is 127.0.0.1.

After understanding all the basics of IP addresses, host names, let’s move into the world of the Internet and learn how it actually works. As we all know that there are millions of web applications running on the internet, apart from web applications there are other applications like FTP and email.

Now when a data packet is sent from anywhere in the world over the Internet to devices, they always have an assigned port, which is basically a numeric number ranging from 0 to 65536. Some common examples are:

  • World Wide Web application uses port 80.
  • E-mail, sent over the SMTP protocol, uses port 25

What are Ports?

One of the simplest definitions that we are able to get for you is, port is a point managed by the operating system of your machine from which either a network connection is initiated or ends. Moreover, each port is related to a specific process that allows computers to differentiate between distinct traffic. For example an email automatically goes to its designated port that is a completely different port assigned to a webpage.

Difference between Port 80 & 8080

First, we would like to make it clear that both port 80 and 8080 are used for web applications.

However port 80 is the primary port which is used by a web client like your web browser. Also when a web developer deploys any web application, they primarily bind the app to the port 80. Or in other words web servers open port 80 to listen to all the connection requests coming from the web browser. Therefore when a web browser is locating for a website say wwwgoogle.com it itself knows that the remote web server is listening for all the requests on port 80.

Now you might be thinking that when port 80 is responsible for managing all the requests, then what is the need for port 8080.

So folks port 8080 is an alternative to port 80. UNIX that mostly forms the basis of servers and systems enforce the first 1023 ports as privileged that can only be opened only by services running with either root or administrator access. So, what that practically implies is that only system administrators that have root access can establish a web server on port 80.

Now when a non-administrator or the person that does not have administrative access tries to run their own web server on a machine that already has a server running on the default port i.e port 80, then they choose port 8080 as an alternate to host a secondary web server.

Apart from that port 8080, can be used to deploy a proxy caching server.

Wrapping Up

So folks, that is all from our side. We hope that now you have a better understanding of not only the difference between port 80 and 8080 but also how this world of Internet actually works.

You May Also Like

More From Author

+ There are no comments

Add yours