AWS : Redirecting www to root using Route 53 and S3 bucket2019 Community Moderator ElectionRedirect non-www to www with aws elastic beanstalkDownloading an entire S3 bucket?S3 Bucket Region - www. subdomain issueHTTPS for S3 bucket with redirectionURL Forwarded instead of Masked with AWS S3 Static Site via Route 53Amazon S3 Static Hosting Custom DomainS3 Cloudfront - Redirects to the file pathAWS Route 53. Routing from naked URL to WWWPoint www subdomin to naked domain instead of bucket nameAWS S3 Bucket Redirection redirects to a malformed URLAWS Redirecting route53 to S3 bucket

How do ISS astronauts "get their stripes"?

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

How to avoid being sexist when trying to employ someone to function in a very sexist environment?

Get length of the longest sequence of numbers with the same sign

Why do members of Congress in committee hearings ask witnesses the same question multiple times?

Whom do I have to contact for a ticket refund in case of denied boarding (in the EU)?

Understanding Kramnik's play in game 1 of Candidates 2018

"Murder!", said the knight

Equivalent to "source" in OpenBSD?

Six real numbers so that product of any five is the sixth one

Is my plan for fixing my water heater leak bad?

Is the set of paths between any two points moving only in units on the plane countable or uncountable?

What are all the squawk codes?

Accessing something inside the object when you don't know the key

Linear regression when Y is bounded and discrete

Rationale to prefer local variables over instance variables?

Difference between 'stomach' and 'uterus'

A right or the right?

Wrap all numerics in JSON with quotes

Test pad's ESD protection

What does 'open position for bachelor project' actually mean?

Manipulate scientific format without the "e"

Is there a frame of reference in which I was born before I was conceived?

Second-rate spelling



AWS : Redirecting www to root using Route 53 and S3 bucket



2019 Community Moderator ElectionRedirect non-www to www with aws elastic beanstalkDownloading an entire S3 bucket?S3 Bucket Region - www. subdomain issueHTTPS for S3 bucket with redirectionURL Forwarded instead of Masked with AWS S3 Static Site via Route 53Amazon S3 Static Hosting Custom DomainS3 Cloudfront - Redirects to the file pathAWS Route 53. Routing from naked URL to WWWPoint www subdomin to naked domain instead of bucket nameAWS S3 Bucket Redirection redirects to a malformed URLAWS Redirecting route53 to S3 bucket










1















I have an application that runs on a Elastic BeanStalk under a Classic Load balancer. I want my site to respond to example.com and also to www.example.com. I did the following to perform that :



1. Creating an A record to Classic Load Balancer



  • In Route 53, I created a HostedZone called example.com and the created a A record for example.com as an alias to the Classic Load Balancer.

This works fine.



2. Creating a S3 Bucket for www.example.com



  • I created a S3 Static web site Bucket named www.example.com that redirects to example.com

This works fine. When I navigate to http://www.example.com.s3-website-us-east-1.amazonaws.com it redirects me to example.com



3. Creating a A record for www.example.com



  • I created then a A Alias record named www.example.com to the S3 Bucket and waited for more than 16 hours.

This does not work. In Chrome, i have the following error :



This site can’t be reached www.example.com took too long to respond.



What am I missing ?



PS: I have done nothing for www.example.com in my registrar. Anything have to be done ?



Thank you for your help.



enter image description here










share|improve this question
























  • Sounds like its setup OK. Have your cleared your browser cache? Also can you post a picture of your route 53 setup (block out your domain if you prefer privacy)?

    – Stu
    Apr 24 '18 at 12:02











  • I cleared the browser cache. I added the Route 53 Setup

    – Radouane ROUFID
    Apr 24 '18 at 12:23











  • I was just looking into this further. Will hold fire pending the AWS incident.

    – Stu
    Apr 24 '18 at 13:16











  • I removed my edit because the issue has a CLOSED status. So it should work now... but still having the problem

    – Radouane ROUFID
    Apr 24 '18 at 13:17











  • Let us continue this discussion in chat.

    – Stu
    Apr 24 '18 at 13:25















1















I have an application that runs on a Elastic BeanStalk under a Classic Load balancer. I want my site to respond to example.com and also to www.example.com. I did the following to perform that :



1. Creating an A record to Classic Load Balancer



  • In Route 53, I created a HostedZone called example.com and the created a A record for example.com as an alias to the Classic Load Balancer.

This works fine.



2. Creating a S3 Bucket for www.example.com



  • I created a S3 Static web site Bucket named www.example.com that redirects to example.com

This works fine. When I navigate to http://www.example.com.s3-website-us-east-1.amazonaws.com it redirects me to example.com



3. Creating a A record for www.example.com



  • I created then a A Alias record named www.example.com to the S3 Bucket and waited for more than 16 hours.

This does not work. In Chrome, i have the following error :



This site can’t be reached www.example.com took too long to respond.



What am I missing ?



PS: I have done nothing for www.example.com in my registrar. Anything have to be done ?



Thank you for your help.



enter image description here










share|improve this question
























  • Sounds like its setup OK. Have your cleared your browser cache? Also can you post a picture of your route 53 setup (block out your domain if you prefer privacy)?

    – Stu
    Apr 24 '18 at 12:02











  • I cleared the browser cache. I added the Route 53 Setup

    – Radouane ROUFID
    Apr 24 '18 at 12:23











  • I was just looking into this further. Will hold fire pending the AWS incident.

    – Stu
    Apr 24 '18 at 13:16











  • I removed my edit because the issue has a CLOSED status. So it should work now... but still having the problem

    – Radouane ROUFID
    Apr 24 '18 at 13:17











  • Let us continue this discussion in chat.

    – Stu
    Apr 24 '18 at 13:25













1












1








1


2






I have an application that runs on a Elastic BeanStalk under a Classic Load balancer. I want my site to respond to example.com and also to www.example.com. I did the following to perform that :



1. Creating an A record to Classic Load Balancer



  • In Route 53, I created a HostedZone called example.com and the created a A record for example.com as an alias to the Classic Load Balancer.

This works fine.



2. Creating a S3 Bucket for www.example.com



  • I created a S3 Static web site Bucket named www.example.com that redirects to example.com

This works fine. When I navigate to http://www.example.com.s3-website-us-east-1.amazonaws.com it redirects me to example.com



3. Creating a A record for www.example.com



  • I created then a A Alias record named www.example.com to the S3 Bucket and waited for more than 16 hours.

This does not work. In Chrome, i have the following error :



This site can’t be reached www.example.com took too long to respond.



What am I missing ?



PS: I have done nothing for www.example.com in my registrar. Anything have to be done ?



Thank you for your help.



enter image description here










share|improve this question
















I have an application that runs on a Elastic BeanStalk under a Classic Load balancer. I want my site to respond to example.com and also to www.example.com. I did the following to perform that :



1. Creating an A record to Classic Load Balancer



  • In Route 53, I created a HostedZone called example.com and the created a A record for example.com as an alias to the Classic Load Balancer.

This works fine.



2. Creating a S3 Bucket for www.example.com



  • I created a S3 Static web site Bucket named www.example.com that redirects to example.com

This works fine. When I navigate to http://www.example.com.s3-website-us-east-1.amazonaws.com it redirects me to example.com



3. Creating a A record for www.example.com



  • I created then a A Alias record named www.example.com to the S3 Bucket and waited for more than 16 hours.

This does not work. In Chrome, i have the following error :



This site can’t be reached www.example.com took too long to respond.



What am I missing ?



PS: I have done nothing for www.example.com in my registrar. Anything have to be done ?



Thank you for your help.



enter image description here







amazon-web-services amazon-s3 amazon-ec2 amazon-route53






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 1 '18 at 2:49









John Rotenstein

74.4k783130




74.4k783130










asked Apr 24 '18 at 11:37









Radouane ROUFIDRadouane ROUFID

6,99142754




6,99142754












  • Sounds like its setup OK. Have your cleared your browser cache? Also can you post a picture of your route 53 setup (block out your domain if you prefer privacy)?

    – Stu
    Apr 24 '18 at 12:02











  • I cleared the browser cache. I added the Route 53 Setup

    – Radouane ROUFID
    Apr 24 '18 at 12:23











  • I was just looking into this further. Will hold fire pending the AWS incident.

    – Stu
    Apr 24 '18 at 13:16











  • I removed my edit because the issue has a CLOSED status. So it should work now... but still having the problem

    – Radouane ROUFID
    Apr 24 '18 at 13:17











  • Let us continue this discussion in chat.

    – Stu
    Apr 24 '18 at 13:25

















  • Sounds like its setup OK. Have your cleared your browser cache? Also can you post a picture of your route 53 setup (block out your domain if you prefer privacy)?

    – Stu
    Apr 24 '18 at 12:02











  • I cleared the browser cache. I added the Route 53 Setup

    – Radouane ROUFID
    Apr 24 '18 at 12:23











  • I was just looking into this further. Will hold fire pending the AWS incident.

    – Stu
    Apr 24 '18 at 13:16











  • I removed my edit because the issue has a CLOSED status. So it should work now... but still having the problem

    – Radouane ROUFID
    Apr 24 '18 at 13:17











  • Let us continue this discussion in chat.

    – Stu
    Apr 24 '18 at 13:25
















Sounds like its setup OK. Have your cleared your browser cache? Also can you post a picture of your route 53 setup (block out your domain if you prefer privacy)?

– Stu
Apr 24 '18 at 12:02





Sounds like its setup OK. Have your cleared your browser cache? Also can you post a picture of your route 53 setup (block out your domain if you prefer privacy)?

– Stu
Apr 24 '18 at 12:02













I cleared the browser cache. I added the Route 53 Setup

– Radouane ROUFID
Apr 24 '18 at 12:23





I cleared the browser cache. I added the Route 53 Setup

– Radouane ROUFID
Apr 24 '18 at 12:23













I was just looking into this further. Will hold fire pending the AWS incident.

– Stu
Apr 24 '18 at 13:16





I was just looking into this further. Will hold fire pending the AWS incident.

– Stu
Apr 24 '18 at 13:16













I removed my edit because the issue has a CLOSED status. So it should work now... but still having the problem

– Radouane ROUFID
Apr 24 '18 at 13:17





I removed my edit because the issue has a CLOSED status. So it should work now... but still having the problem

– Radouane ROUFID
Apr 24 '18 at 13:17













Let us continue this discussion in chat.

– Stu
Apr 24 '18 at 13:25





Let us continue this discussion in chat.

– Stu
Apr 24 '18 at 13:25












2 Answers
2






active

oldest

votes


















0














I had similar issue. What worked for me from discussion in that chat:



  1. make sure that it's reachable via http

  2. if yes - order an SSL Certificate and use CloudFront to be able to use https

if not - configuration of Alias / A-record is incorrect. Then check all permissions (S3 should be available for reading publicly; S3 bucket should be setup as Website Hosting; the bucket name should be identical to the Route 53 hosted zone name). See all details in official AWS article here.






share|improve this answer






























    0














    S3 Website endpoint doesn't support HTTPS so if a user access it on HTTPS, it won't work.
    Creating a CloudFront only for redirection can solve this but increase the work.
    (CF+ACM+S3+Route53)
    I would suggest use a redirection rule directly on the beanstalk environment and create alias records for both www.example.com and example.com to point to ELB.



    Here is how you can do that using CloudFront



    Directly on Beanstalk






    share|improve this answer










    New contributor




    James Dean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.



















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50000722%2faws-redirecting-www-to-root-using-route-53-and-s3-bucket%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I had similar issue. What worked for me from discussion in that chat:



      1. make sure that it's reachable via http

      2. if yes - order an SSL Certificate and use CloudFront to be able to use https

      if not - configuration of Alias / A-record is incorrect. Then check all permissions (S3 should be available for reading publicly; S3 bucket should be setup as Website Hosting; the bucket name should be identical to the Route 53 hosted zone name). See all details in official AWS article here.






      share|improve this answer



























        0














        I had similar issue. What worked for me from discussion in that chat:



        1. make sure that it's reachable via http

        2. if yes - order an SSL Certificate and use CloudFront to be able to use https

        if not - configuration of Alias / A-record is incorrect. Then check all permissions (S3 should be available for reading publicly; S3 bucket should be setup as Website Hosting; the bucket name should be identical to the Route 53 hosted zone name). See all details in official AWS article here.






        share|improve this answer

























          0












          0








          0







          I had similar issue. What worked for me from discussion in that chat:



          1. make sure that it's reachable via http

          2. if yes - order an SSL Certificate and use CloudFront to be able to use https

          if not - configuration of Alias / A-record is incorrect. Then check all permissions (S3 should be available for reading publicly; S3 bucket should be setup as Website Hosting; the bucket name should be identical to the Route 53 hosted zone name). See all details in official AWS article here.






          share|improve this answer













          I had similar issue. What worked for me from discussion in that chat:



          1. make sure that it's reachable via http

          2. if yes - order an SSL Certificate and use CloudFront to be able to use https

          if not - configuration of Alias / A-record is incorrect. Then check all permissions (S3 should be available for reading publicly; S3 bucket should be setup as Website Hosting; the bucket name should be identical to the Route 53 hosted zone name). See all details in official AWS article here.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          boldnikboldnik

          1,64211422




          1,64211422























              0














              S3 Website endpoint doesn't support HTTPS so if a user access it on HTTPS, it won't work.
              Creating a CloudFront only for redirection can solve this but increase the work.
              (CF+ACM+S3+Route53)
              I would suggest use a redirection rule directly on the beanstalk environment and create alias records for both www.example.com and example.com to point to ELB.



              Here is how you can do that using CloudFront



              Directly on Beanstalk






              share|improve this answer










              New contributor




              James Dean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
























                0














                S3 Website endpoint doesn't support HTTPS so if a user access it on HTTPS, it won't work.
                Creating a CloudFront only for redirection can solve this but increase the work.
                (CF+ACM+S3+Route53)
                I would suggest use a redirection rule directly on the beanstalk environment and create alias records for both www.example.com and example.com to point to ELB.



                Here is how you can do that using CloudFront



                Directly on Beanstalk






                share|improve this answer










                New contributor




                James Dean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                  0












                  0








                  0







                  S3 Website endpoint doesn't support HTTPS so if a user access it on HTTPS, it won't work.
                  Creating a CloudFront only for redirection can solve this but increase the work.
                  (CF+ACM+S3+Route53)
                  I would suggest use a redirection rule directly on the beanstalk environment and create alias records for both www.example.com and example.com to point to ELB.



                  Here is how you can do that using CloudFront



                  Directly on Beanstalk






                  share|improve this answer










                  New contributor




                  James Dean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  S3 Website endpoint doesn't support HTTPS so if a user access it on HTTPS, it won't work.
                  Creating a CloudFront only for redirection can solve this but increase the work.
                  (CF+ACM+S3+Route53)
                  I would suggest use a redirection rule directly on the beanstalk environment and create alias records for both www.example.com and example.com to point to ELB.



                  Here is how you can do that using CloudFront



                  Directly on Beanstalk







                  share|improve this answer










                  New contributor




                  James Dean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer








                  edited 1 min ago









                  tomerpacific

                  994722




                  994722






                  New contributor




                  James Dean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 56 mins ago









                  James DeanJames Dean

                  112




                  112




                  New contributor




                  James Dean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  James Dean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  James Dean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50000722%2faws-redirecting-www-to-root-using-route-53-and-s3-bucket%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                      Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                      Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved