Custom domain not linked to Elastic BeanStalk instance

0

Hello, I bought a custom domain from AWS Route 53 which is listed under Route 53's Hosted Zones as my-custom-domain.com. I added a new A record inside it using the record's name as www.my-custom-domain.com with the Value/Route traffic set to one of my Elastic BeanStalk's instances. Everything was working and accessing the custom domain from a browser redirected me to my Elastic BeanStalk instance.

However, in the meantime I created a new instance and wanted to link the custom domain to it, so I just changed the Value/Route traffic to field to my new instance, but it is not working as it's not routing the traffic to my new instance (I get "This site can't be reached" error on Google Chrome). Do you have any idea why it's not working?

Daniel
asked 2 months ago53 views
1 Answer
0

Hello.

Isn't it possible that you're trying to access old EC2 due to the domain's TTL value or something?
For example, can you use the following command to resolve the domain name and check the new EC2 IP address?
If you can confirm the IP address of the old EC2, you should be able to access the new EC2 by waiting a while and accessing it.
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/best-practices-dns.html

dig www.my-custom-domain.com

By the way, for ElasticBeanstalk domain settings, I think there is no need to set the EC2 IP address by registering the environment domain with a CNAME record instead of an A record.
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-beanstalk-environment.html

profile picture
EXPERT
answered 2 months ago
  • I don't have the old instance anymore as I terminated it.

    Anyway, just to see if it should work again, I created a new instance with the same domain name as the old one and reassigned it to the custom domain in Route 53 and after 10 minutes or so it appears to be working again.

  • I think the old IP address was probably cached due to a domain TTL issue. When changing domain record settings, I think it's a good idea to lower the TTL value before changing.

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