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?

Internet Information Services
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,868 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,049 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 33,481 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 Answers by the question author, which helps users to know the answer solved the author's problem.