Search code examples
amazon-web-servicesamazon-route53amazon-elb

AWS http:// and http://www going to different web sites -how can I correct this?


I'm using Amazon Web Services, and have a windows server running IIS.

Within IIS I have the default website, and another website:

IIS Setup

I have an Elastic Load Balancer setup in Route 53 my DNS records point to the load balancer:

DNS Setup

If I browse to http://mydomain.co.uk - it goes to the correct website in IIS.

If I browse to http://www.mydomain.co.uk - it goes to the Default website in IIS.

Is there any way I can point both www and non-www to the same website in IIS? Are my DNS records setup incorrectly?

Thanks for any help,

Mark


Solution

  • If both DNS records are resolving to the correct ip address of your server, then all you should need to do is setup multiple bindings on the correct website - one for www and one for the naked domain.

    MY guess is that there is no IIS binding for the www, so it is resolving to the 'Default' site instead - you fix this in IIS console, not AWS console.