In IIS, I noticed when you use the default ports (80 for http and 443 for https) the port number doesn't display at the end of the URL in your browser. However, if you use a different port it will display.
Example: Default port generates link: http://www.example.com
Custom port generates link: http://www.example.com:8301
Is there a setting you can change to make the port (in this case, :8301) not display without using the defaults?
Well-known port numbers for a service are normally omitted from the URL. Most servers use the well-known port numbers for HTTP and HTTPS , so most HTTP URLs omit the port number. A path. The path identifies the specific resource in the host that the web client wants to access.
Double-click Internet Information Services (IIS) Manager. In the Internet Information Services dialog box, expand local computer ►Sites and right click Default Website and select Bindings. Select the http setting and click Edit. Change the port number to 80 and click OK.
80 is a default port for HTTP connections.
http://example.com
= http://example.com:80
443 is a default port for HTTPS connections.
https://example.com
= https://example.com:443
If you are hosting on an other port, you have to include it in the URL.
It's not a IIS rule - it's about HTTP in general. You cannot configure the server in such way that http://example.com will work with port 8301 and I can't imagine any situation when it can be useful. I strongly believe that 80 port is chosen by default on a browser-side but not assigned on a server-side.
If you want users to reach this website by http://example.com
URL and it must be a main page then swap your 8301 and 80 ports WebSites' bindings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With