Skip to content

App from ECS accessible using curl, nslookup, but not from web browser

0

I use AWS Elastic Container Service to host a website via Application Load Balancer.

It is accessible under this endpoint: http://ecs-load-balancer-1249779689.eu-west-3.elb.amazonaws.com/

I updated name servers for my domain in external registar (OVH), and I added A record in Route 53 which points to the ALB: Record: kacperwozniak.dev Type: A Value: dualstack.ecs-load-balancer-1249779689.eu-west-3.elb.amazonaws.com.

Problem: Website is accessible under URL: http://dualstack.ecs-load-balancer-1249779689.eu-west-3.elb.amazonaws.com from my Google Chrome. It is not accessible under URL: http://kacperwozniak.dev. I receive ERR_CONNECTION_REFUSED.

When I use curl or nslookup command it return content/data properly. For example nslookup: kacper-wozniak@kacper-wozniak:~$ nslookup kacperwozniak.dev Server: 127.0.0.53 Address: 127.0.0.53#53

Non-authoritative answer: Name: kacperwozniak.dev Address: 13.39.197.82 Name: kacperwozniak.dev Address: 15.188.205.34

I tested my domain using URL: http://kacperwozniak.dev on two computers, and two internet providers. I tested it also in Incognito mode in Google Chrome. Unfortunately none of the tests passed, hence my question.

3 Answers
1

The issue you're experiencing is likely related to DNS propagation and caching. When you make changes to DNS records, it can take some time (usually up to 48 hours) for these changes to propagate globally. This explains why you can access the site using the direct ALB URL, but not yet with your custom domain.

The fact that nslookup and curl are working suggests that the DNS changes have started to propagate, but your web browser might be caching old DNS information. Here are some steps you can try:

  1. Clear your browser's cache and DNS cache on your computer.
  2. Try accessing the site from a different network (e.g., mobile data instead of Wi-Fi).
  3. Use a public DNS lookup tool to check if the correct IP addresses are being returned for your domain.
  4. Ensure that your Route 53 A record is correctly set up to point to the ALB.
  5. Double-check that you've updated all necessary nameserver records with your domain registrar (OVH in this case).
  6. Verify that your ALB security group allows inbound traffic on port 80 (HTTP) from all sources (0.0.0.0/0).

If the issue persists after 48 hours, you may want to:

  1. Confirm that your Route 53 hosted zone has the correct NS (Name Server) records matching those provided by AWS.
  2. Check if there are any CNAME records that might be conflicting with your A record.
  3. Ensure that your ECS tasks are healthy and the ALB target group is properly configured.

Remember, DNS changes can take time to fully propagate, so patience may be necessary. If the problem continues after trying these steps and waiting for propagation, you may need to contact AWS support for further assistance.
Sources
Domain name not resolving | AWS re:Post
How to enable HTTPS for domain name (http working) | AWS re:Post

answered 8 months ago
EXPERT
reviewed 8 months ago
0

Looks like everything is in working order now. Your domain name resolves to the same IP address as the load balancer.

AWS
EXPERT
answered 8 months ago
0

Because you're using a .dev domain the browser is hard-coded to only connect to it using HTTPS, not HTTP. curl works because it does not have that restrictions.

AWS
EXPERT
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.