0

I have an AWS EC2 instance with windows server 2016 and IIS 10.

I have a website in the IIS and I can access it through the internet using the IP address and the port number: http://xx.xx.xx.xx:8000

I have a Go-daddy domain mydomain.com, I set up the A record sub-domain DNS for it: sub.mydomain.com and it points to xx.xx.xx.xx (I can't add port number in here)

How do I set up so that the sub.mydomain.com go to my website on the IIS at http://xx.xx.xx.xx:8000?

  • DNS has no concept of a port. You can point the subdomain at that IP via an A record, but you can't make it add a port. – ceejayoz Jun 12 '18 at 20:10
  • 3
    Possible duplicate of [How to set up port forwarding on Amazon EC2](https://serverfault.com/questions/569626/how-to-set-up-port-forwarding-on-amazon-ec2) – jrtapsell Jun 12 '18 at 20:30

1 Answers1

0

How to expose a site on a custom port without needing to state it

You can't, if SRV records were used this might be possible, but they are not, so you are stuck with port 80 for http, or 443 for https, or you can manually set the port in the URL.

How to serve on the right port

You can do one of the following

  • Set IIS to serve in 80/443
  • Setup a proxy on the server on port 80 that forwards traffic to IIS
  • Use a load balancer to forward traffic as per this answer.
jrtapsell
  • 986
  • 1
  • 9
  • 15