Normally, whenever you access a website, it is running on port 80 or 443. Any normal HTTP request travels over port 80, and the encrypted HTTPS uses port 443. Inside IIS, it is very easy to change the port that a website is listening on if you need to do so. Probably the most common reason to institute a port change on a website is to keep it hidden. Maybe you have an administrative site of some kind and want to make sure that nobody stumbles across it, or perhaps your web server is limited on IP addresses, and you need to turn on another web page but all of your IPs are already running sites. You could utilize a different port for the new site and then have the opportunity to run two (or more) sites using the same IP address, one site on each port.
Whatever your reason for wanting to change the port that a website runs on, let's walk through the steps to accomplish this task so that it can be one more tool added to your belt.
We have a Windows Server 2016 server online that has the IIS role installed. There is already a website running on this server. Currently, it is using port 80 by default, but we want to change that port to 81 and test accessing it from a client computer.
Here are the steps needed to change your website listener port:
81
. This is just for our example, of course. You could enter any valid port number in this field that isn't otherwise in use on this server.http://web2
.
http://web2:81
.
We can easily adjust the port that is used to access a website inside IIS by making one simple adjustment. After changing the port number in our website's bindings, the site immediately changes over to listening on the new port and is no longer active on the old port. Instead of changing the port, you could also add an additional binding into that same screen in order to get the website to respond from multiple ports at the same time. For example, if you wanted your website to run both HTTP for regular access and HTTPS for encrypted access to pages with sensitive information, you could create bindings for both port 80 and port 443.
One note of importance when changing your website port; doing so means your web links for accessing the website will now have to include that specific port number at the end. Also, if you are running firewalls in your network or on the web server itself, it is possible that you will need to adjust settings on those firewalls to allow the new port to be allowed safe passage.
18.190.156.13