Access IIS https website from outside network

coder5670 1 Reputation point
2021-07-28T18:08:10.787+00:00

Currently I have a https website setup locally on the Azure VM with a custom hostname : <websitename>.<domainname>.com and bound to the localhost 127.0.0.2 in the hosts.etc on port 443

Consider example hostname as web.microsoft.com

Website bindings in IIS are

type:https  
hostname:web.microsoft.com  
port:443  
IP Address:127.0.0.2  

Hosts.etc file      
127.0.0.2   web.microsoft.com  

Accessing it locally on the VM itself https://web.microsoft.com/admin/login.aspx works fine.

Port 443 is open on the Azure VM and inbound firewall rule is set in windows to allow connections on 443

If I try to access it outside of the network using the public IP address of the VM this doesn't work eg: https://45.60.200.110/admin/login.aspx.
118719-image.png

I have other non-https websites which work fine and can be accessed through the public IP ,only difference is they are not having hostname in the IIS website bindings.

Am I missing something or do I need to make some additional config?

Windows development | Internet Information Services
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
Windows for business | Windows Server | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 37,161 Reputation points
    2021-07-28T21:32:25.297+00:00

    only difference is they are not having hostname in the IIS website bindings.

    If you put a hostname in the bindings, then that hostname also needs to be in the HTTP address that the client browses.

    Set your binding like this and see what happens.

    118803-capture.jpg

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.