I'm trying to get an alias working in IIS. Right now the site binding (the top in the picture) works when I type the ip:port into a web browser, however I cannot get the other 4 bindings to work as alias'. I'd like to have it so that I can type in the aliasname.ip or something similar.

I believe that r-stag. should work? Or possible, but neither work. What am I doing wrong?

enter image description here

1 Answer 1

1 is a sub-directory. To get that to work you would create a file or folder named "r-stag" in the document root directory.

r-stag. would be a subdomain of an IP address which isn't a thing. There is no way to get that to work.

The way you have it configured right now is that the server is listening to serve requests for http://r-stag/. That is only going to work if that local name resolves to the IP address of the server. You can make that work for your local machine for testing purposes by adding r-stag to your hosts file. See How to Edit Your Hosts File on Windows, Mac, or Linux

You probably want to configure the server to listen to an actual subdomain Host Name like r-stag.example.com where example.com is a domain name that you control. You would add a DNS A record with the IP address of your server for the r-stag subdomin in the DNS zone for example.com to get that to work.

  • Thank you for the reply. Is there any way to set multiple sites up to use port 80 and a single dns record? I do not control DNS and would to be independent of requesting each time I stand up a site or (especially) a staging site? With my environment I have an A record pointing to my ip. I want to have IIS handle incoming requests on port 80 and to be able to differentiate between them based on the url using the A record, so if the A record pointing to was website.com, I'd like to have it so that if website.com/test came in, it would redirect to a different site. Is this possible?
    – Bbb
    Feb 9 at 20:41
  • You could set up a single DNS record for a wildcard subdomain like *.example.com or *.me.example.com. Then you could configure your site to listen to new subdomains without further DNS changes. Feb 9 at 20:45
  • Ok, do you have an instructional link to help me with this as far as the IIS portion? I've been searching most of the day and have yet to find something that has worked for me, which is why I turned to stack exchange.
    – Bbb
    Feb 9 at 20:52
  • These instructions possibly? stackoverflow.com/questions/4069278/…
    – Bbb
    Feb 9 at 20:58
  • I'm not super familiar with IIS, I host on Linux/Ubuntu/Apache, but those instructions look reasonable to me. Feb 9 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.