The majority of new websites operate using port 80 or port 443. There are exceptions, of course, but this is typical of most servers. When a person runs a website they send an unencrypted HTTP request message to port 80. Port 443 handles the encrypted HTTPS response.
Using IIS, you can make changes to the assigned ports and you can do this for a number of reasons. For instance, you might want to conceal your new website from basic port scans. Perhaps you're dealing with private information and want to make your website less discoverable. Maybe you've just got an API that won't run on the same port as your site.
Here's how to assign a new port to your website:
Step 1 : Run the Server Manager. Navigate to Tools. Select the option: Internet Information Services (IIS) Manager.
Step 2 : Find the name of your server in the left-side window. Open its menu and select a folder labelled 'Sites'.
Step 3 : Right click on the name of your new website and select 'Bindings'.
Step 4 : Find the http binding linked to 'port 80'. Select the Edit option.
Step 5 : Switch the assigned port to 81 (or whatever port is open and available). Use any port that's valid and not already in use on the server.
Step 6 : Don't forget to click OK before you close the window or the settings won't be saved.
Step 7 : The switch will happen right away. You don't need to do anything else. As soon as the window is closed, the assigned port will switch to 80 (or your preferred port). If you're still unsure, you can check whether it has worked by using another machine to launch a web browser.
Step 8 : On this other machine, attempt to browse to the old website address.
Step 9 : You should see a simple error message/warning to redirect. This is what's supposed to happen so don't worry. To get to the site now, you need to make sure the assigned port is included in its URL.
Depending on the type of security you have running, you might need to authorise the new port in your firewall's settings as well.
Using these simple steps and the IIS, it's easy to remove ports and assign new ones to your websites. Once you've switched to a new port, the website immediately stops using the previously assigned port. It will do no more listening on this old port.