Why My EC2 Instance Failed to Launch Properly: The Forgotten Port 80 Mistake

When I first started working with AWS EC2 instances, I faced a simple yet frustrating issue — my website wasn’t loading. I had launched the instance, and everything seemed fine. But the browser kept throwing connection errors.

🕵️‍♂️ The Problem

At first, I thought something was wrong with the instance itself, but the real issue was much simpler…

Port 80 (used for HTTP traffic) was not allowed in the security group.

🤔 What Is Port 80 and Why Should You Care?

Port 80 is the standard port used for HTTP traffic — the kind of traffic your browser uses when you visit most websites that start with http://. If you want to interact with your instance using a browser or allow public web traffic, port 80 needs to be open.

By default, AWS doesn’t allow any inbound traffic, except what you specifically permit.

🔍 The Root Cause: Misconfigured Security Group

When I launched my instance, I only allowed SSH (port 22) so I could connect to it via terminal — but I forgot to allow HTTP (port 80). So while the instance was up, it was invisible to any browser trying to connect to it.

✅ The Fix

Here’s how I solved the issue:

  1. Go to EC2 Dashboard.

  2. Select Security Groups from the sidebar.

  3. Find the security group attached to your instance.

  4. Click Inbound rules > Edit inbound rules.

  5. Add a new rule:

    • Type: HTTP

    • Protocol: TCP

    • Port Range: 80

    • Source: Anywhere (or restrict to your IP for more security)

  6. Save the rule.

That’s it! With this change, the instance became accessible through the browser.

💡 Key Takeaways for Beginners

  • Security Groups = Firewalls for your EC2 instance. They control what traffic is allowed in and out.

  • By default, no inbound traffic is allowed unless you specifically open a port.

  • If you’re trying to connect via browser, always check that port 80 (HTTP) or 443 (HTTPS) is open.

🛡️ Extra Tips

  • Avoid using Anywhere (0.0.0.0/0) for all ports — only use it when you’re testing or learning. In production, restrict by IP or VPC.

  • Always double-check your security group settings before launching an instance.

  • Keep things minimal — only open the ports you actually need.

🎯 Final Thoughts

This experience taught me that cloud isn’t just about launching virtual machines — it’s about understanding how they interact with the world. One small checkbox (port 80) can make the difference between a working setup and hours of confusion.

So if your EC2 instance looks fine but nothing loads in the browser… check your ports!

1
Subscribe to my newsletter

Read articles from Ruchika Gurbaxani directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ruchika Gurbaxani
Ruchika Gurbaxani