Step 1

Under “Sites” on the left, choose the website you want the port to be changed. On the right in the column “Actions“, under “Edit Site” choose “Bindings…

How to change the port of website in IIS


Step 2

Choose the port and then select “Edit…

How to change the port of website in IIS


Step 3

Enter the port you want to use (In my case 7878). Check if the port is free.

How to change the port of website in IIS


Step 4

After the port is changed, we have to open the port on our server machine. Open “Windows Defender Firewall”. You can do this via Windows Search or from Control Panel.

How to change the port of website in IIS


Step 5

In the left column choose “Advanced settings

How to change the port of website in IIS


Step 6

Then again in the left column choose “Inbound Rules“.

How to change the port of website in IIS


Step 7

On the right column, under “Actions“, click on “New Rule…

How to change the port of website in IIS


Step 8

When the Wizard window pops up, choose “Port” as I show on the picture. Then click on “Next >

How to change the port of website in IIS


Step 9

Then choose “TCP“, then choose “Specific Local Ports” and write the port you’ve used on “Step 3“. Just as the picture shows.

How to change the port of website in IIS


Step 10

Choose “Allow the connection“.

How to change the port of website in IIS


Step 11

Choose which groups in your network will have access to this rule (they will have permission to visit this port / your website).

How to change the port of website in IIS


Step 12

Choose a name for your rule (better management).

How to change the port of website in IIS


Step 13

Ready to work. Restart of the IIS services might be required for the changes to work.

By Valentin Yuliyanov

123123