EC2 HTTPS Requests Not Getting Through...

0

Hello Devs,

So I set up a EC2 instance to accept incoming HTTPS requests. The EC2 is managed by a load balancer, and is using a SSL certificate that I set up with the Certificate Manager and Route 53. Here's the issue...

When I make a request from my PC to the EC2 using the HTTPS url, I get an error on the client: "request failed, libcurl error: 6 (Couldn't resolve host name)" However, when I change my server DNS address to 8.8.8.8 (Google server) on my PC, the request to the EC2 gets though fine. Why is this happening? How can I make the requests get though without manually setting my DNS server address?

3 Answers
0
Accepted Answer

This can happen due to issues with the local DNS configuration, ISP-level DNS restrictions, or cache problems.

To resolve this issue without manually setting your DNS, ensure that your domain's DNS settings are correctly propagated in Route 53, and confirm that all required DNS records (like A or CNAME records) are properly configured and pointing to the load balancer.

You should also check for proper DNS propagation using online tools to ensure your DNS changes have fully propagated globally, and clearing the DNS cache on your local machine might help resolve any cached DNS issues.

If the issue persists, consider switching to a more reliable DNS provider (e.g., Cloudflare) for better resolution, but this would require configuring it at the network level, not just on the individual PC.

profile picture
EXPERT
answered 8 months ago
  • Thanks Giovanni. I had solved it. The issue was that I had set NS records for both my web site and Route 53 in my host site. So when I made HTTPS requests, the host didn't know which DNS to use, and so that's why sometimes it worked, and sometimes it didn't. So I moved all external NS records to Route 53, and only kept the Route 53 NS records in my host site. This seemed to solve the problem. Was a tricky problem to solve...

0

Hello.

Could there be a problem with the DNS server you were using before changing to 8.8.8.8?
Is it possible to perform name resolution using the "dig" command etc. using the originally used DNS server?
It seems like some program is trying to access the ALB, but can it be accessed normally from a browser or the "curl" command?

profile picture
EXPERT
answered 9 months ago
  • So it just stopped working again. The DNS server that I was setting before was on "Obtain DNS server address automatically" (I'm on a Windows machine). When I use "nslookup <my HTTPS endpoint>" in my command line, the IP address is not shown. As soon as I set the server DNS on my PC to 8.8.8.8, the nslookup command shows the IP address, and everything works fine.

    What is going on here?

0

Bumping this thread...

answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions