Skip to content

Setting up DNS records for EB environment without ALIAS

0

Hi,

I have my application deployed on an Elastic Beanstalk environment, and have set it up load balancing for it inside a VPC. The domain is hockey.bz, which I transferred yesterday to a new registrar. The old registrar allowed me to set up ALIAS DNS record for the EB domain (hockey-bz.us-west-2.elasticbeanstalk.com), and everything worked fine. But I've found out that my new registrar does not support ALIAS, and I can't transfer the domain again for 5 days due to .bz rules (e.g. to a different registrar that does support ALIAS). In the meantime I can't figure out how to set up the DNS records to get things working without using ALIAS.

I've tried associating an Elastic IP with the load balancer network interface that points to my EB instance, with the idea that I could then set that Elastic IP as the A record for the domain. But the Elastic IP address just times out. Does anyone have a suggestion as to how I can get the website back up and running?

Thanks, Kevin

1 Answer
0

I understand your situation, Kevin. While using an ALIAS record is typically the preferred method for routing traffic to an Elastic Beanstalk environment, there are alternative approaches you can use when ALIAS records are not supported by your registrar. Here's what you can do:

  1. Use a CNAME record: Instead of an ALIAS record, you can create a CNAME record that points to your Elastic Beanstalk domain (hockey-bz.us-west-2.elasticbeanstalk.com). This is a common alternative when ALIAS records are not available. However, keep in mind that CNAME records cannot be used for the apex domain (hockey.bz), only for subdomains like www.hockey.bz.

  2. For the apex domain: Since CNAME records don't work for the apex domain, you'll need to use A records. However, Elastic Beanstalk environments don't have static IP addresses, which is why your attempt with the Elastic IP didn't work. Instead, you can try the following:

    a. Use the dig or nslookup command to find the IP addresses associated with your Elastic Beanstalk domain. b. Create A records in your DNS settings, pointing your apex domain to these IP addresses. c. Be aware that these IP addresses may change over time, so you'll need to update them periodically.

  3. Consider using a subdomain: If possible, consider using a subdomain like www.hockey.bz as your main domain. This allows you to use a CNAME record, which is easier to manage.

  4. Third-party DNS services: Some third-party DNS services offer ALIAS-like functionality even if your registrar doesn't. You could consider using such a service temporarily.

  5. Temporary redirect: As a short-term solution, you could set up a temporary redirect from hockey.bz to www.hockey.bz, allowing you to use a CNAME record for the www subdomain.

Remember, these are temporary solutions until you can transfer your domain to a registrar that supports ALIAS records, which would be the ideal long-term solution for your Elastic Beanstalk setup.
Sources
Your Elastic Beanstalk environment's Domain name - AWS Elastic Beanstalk
Application Load Balancers - Elastic Load Balancing
Configure a custom domain name for your Classic Load Balancer - Elastic Load Balancing

answered 9 months ago
EXPERT
reviewed 9 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.