I cannot reach my website with certain subdomain (I use elasticbean stalk)

0

Hi First of all, my architecture: I use elasticbean stalk, have 2 environments, front and api, each of them has their own application Both use the same load balancer. Both are connected to Route53. For front, I have 2 records, to reach my environment from https://www.mySite.com and from https://mySite.com

For api, I have 1 record, for https://api.mySite.com Those records connect directly to the elasticbean stalk environments.

I have one certificate SSL, which applies to subdomains "www" and "api".

Now, the issue: sudomains "api" and "-" work without any problem From www, I cannot reach my site. I checked the EC2 instance, it's not even reached, no matter which url I type (Which includes the subdomain of course) I am very confused about that, can someone help?

Many thanks

1 Answer
0

Hello Nico

It seems like you have set up your Elastic Beanstalk environments and Route 53 records for your website correctly for the most part. The fact that subdomains like "api" work while "www" does not suggests there might be an issue with your Route 53 configuration or the way you've configured your Elastic Beanstalk environments.

Here are some steps to troubleshoot the issue:

  1. Route 53 Configuration:

    • Double-check your Route 53 records for the "www" subdomain. Ensure that you have a CNAME record pointing to the correct Elastic Beanstalk environment URL. It should look something like this:

      Name: www.mySite.com
      Type: CNAME
      Value: YourElasticBeanstalkEnvironmentURL
      
    • Ensure that the TTL (Time to Live) for the record is set to a reasonable value, such as 300 seconds.

  2. Elastic Beanstalk Environment Configuration:

    • Check the security group settings for your Elastic Beanstalk environments. Ensure that they allow incoming traffic on the ports your application is using (typically, HTTP on port 80 or HTTPS on port 443). Make sure the security group associated with your instances allows traffic from the internet.

    • Verify that your Elastic Beanstalk application and environment are running and healthy. You can do this through the AWS Management Console or by using the AWS CLI.

  3. SSL Certificate Configuration:

    • Ensure that your SSL certificate is correctly associated with your Elastic Beanstalk environments, including both "www" and "api" subdomains.
  4. CloudWatch Logs and Elastic Beanstalk Logs:

    • Check the CloudWatch logs and Elastic Beanstalk logs for any errors or issues that might be preventing requests from reaching your instances. This can help you diagnose issues with your application or the environment.
  5. DNS Propagation:

    • DNS changes can take some time to propagate across the internet. If you recently made changes to your Route 53 records, wait for some time (usually a few minutes to a few hours) to allow DNS changes to propagate fully.
  6. Browser Cache:

    • Clear your browser cache or try accessing the site from a different browser or an incognito/private browsing window to rule out any local caching issues.
  7. Network Issues:

    • Check if there are any network issues or firewalls that might be blocking traffic from certain subdomains. This could be happening at your end or your ISP's end.
  8. Elastic Beanstalk Environment URL:

    • Ensure that the Elastic Beanstalk environment URLs are correctly configured in your Route 53 records. Make sure there are no typos or inconsistencies.

By following these steps, you should be able to identify and resolve the issue preventing your website from being accessible via the "www" subdomain. If the issue persists, consider consulting AWS support.

Please give a thumbs up if it helps

profile picture
answered 8 months ago
profile picture
EXPERT
reviewed a day ago
  • Hi Gabriel Many thanks for the fast answer. I checked everything as required, still, not ok. I noticed one point, after cleaning my cache: the url http://www.mySite.com works, but not https. While https works for no subdomain and api I have another question about the first point: You mentioned a record CNAME. I Have actually a record of type A. Should I change it? (I tried to add a new one, without success). FYI, I have a A record for both other endpoints, and those work. Thank you

    EDIT: After I deleted the record for www, if I run http://www.mySite.com, it still works! Probably something is configured somewhere, that force it, but where? Thanks

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