Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a medium EC2 instance that runs Windows 2008 R2. I have installed the web role in order to run IIS on it. I am able to see the default website locally but not from the internet using the Public DNS. I get the message "Cannot connect to Website"

share|improve this question
up vote 4 down vote accepted

The first thing you need to do is assign an elastic IP address to your instance.

Next, you need to make sure that the security group assigned to this instance has whatever port is added for inbound connections for whatever port you have created the website on(80, 443, etc.).

You also want to make sure that this port is open on your Windows firewall.

share|improve this answer
The elastic IP is not a requirement. You can use the default IP address given. – Matt Houser Sep 19 '12 at 16:26
Which default IP? – boburob Sep 19 '12 at 16:31
By default, every EC2 instance is given a Public DNS name such as You can access your EC2 instance by putting that DNS name into your web browser. You can also use the IP address that the DNS name resolves to. Beware, this DNS name and IP address will change if you stop and restart your EC2 instance. – Matt Houser Sep 19 '12 at 17:09
@MattHouser I never knew this! Thanks for saving me some money! – boburob Sep 20 '12 at 7:27

Because this is still relevant and confusing as ever, here is what I had to figure out. Using the accepted answer, also make sure you assign your security groups to your instance. You do this by using the Actions menu for the selected Instance.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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