# Day 40: Troubleshooting Internet Accessibility for an EC2-Hosted Application

Welcome to Day 40. Today, we will learn how to troubleshoot internet accessibility for an application hosted on EC2. When I try to access my EC2 instance's public IP via a browser, there is no response. I then check whether my EC2 instance's subnet is public or private. My instance is in a public subnet, but I still can't access my application from the internet. Then I checked the VPC settings and saw that my public subnet's route table was not connected to the Internet gateway. So, I went to the Internet gateway settings and saw that my Internet Gateway was not attached to the VPC. That's the main cause of the issue. After I attached my Internet Gateway to the VPC, I was able to access my application from the internet.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428392379/3122e5aa-083f-48e2-b282-48dcd21ec1e6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428457066/ab3a2aa4-35ad-4f3f-9fb2-5717fc3588f6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428663832/58e1f56c-d63c-492f-ab17-0f054be6c991.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428688543/4100e85f-3f71-47ec-b64f-42f0e040ee61.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428766546/820cab33-1004-428e-bfe4-1e2cb1dcc5ee.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428795610/9ba69df4-a1bb-4f58-a7e2-0046bb48ab3b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428810989/fd950e7b-a159-45d3-9187-ca1b440002eb.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428833720/99e82e50-9943-4c61-bfd5-03270b77ca75.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428872290/58610b50-5ff4-4e29-b975-32e26d6fd98d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428888585/47f9e5a3-79bf-4a27-a49a-eae5c9288096.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428907545/592c2a31-9a18-4441-899d-a52814f41e6f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767428920847/37a7559f-9387-4976-818a-bff1ca52c263.png align="center")

Congratulations you did it. It looks good. This lab was successfully completed without any errors. See you in day 41. If you have any issues please let me know I will be happy to assist you. Stay tuned and learn together. If you find my article useful, please kindly like and share it.
