Azure Virtual Machine hosting - more than one domain to same IP address?

rwallacej used Ask the Experts™

I have a Azure Virtual Machine VM with fixed IP , say 123.456.789.101
I want this Azure VM to host more than one website, the different websites having different domains, but not sure if this can be done

Can I have more than one domain map to this single Azure Virtual Machine IP, and the different domains to different virtual directories/sites on the same Azure  Virtual machine?

So I have 3 domains say    - this should go to site one say 123.456.789.101/abc  - this should go to site two say 123.456.789.101/def - this should go to another site say 123.456.789.101/ghi

I don't want user to have to type in virtual directory
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
nociSoftware Engineer
Distinguished Expert 2018

Then you create domain within the webserver, and assign a different root to each of the domains.
(The top level directory is specified there).
Top Expert 2016
exactly the same way one would do it with a local machine. add the bindings for the additional domain name.
in iis for every website use new website website


how does this work with respect to  PORTS ?
can all sites still be on PORT 80 ?
Top Expert 2016

yes, in the bindings set the hostname (domain name)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial