CloudFront Error: This XML file does not appear to have any style information associated with it

22,609

You have to set the S3 index url and S3 error url to your index page..try it

Share:
22,609

Related videos on Youtube

Phil Andrews
Author by

Phil Andrews

Updated on June 25, 2020

Comments

  • Phil Andrews
    Phil Andrews almost 4 years

    I have a React app that runs on AWS S3 and CloudFront. When I access the app from the given URL it opens the home page fine. When I navigate to another page using a button on the nav bar it opens the page just fine. But if I then refresh the page I get this error:

    enter image description here I also get that same error if I attempt to navigate to the page via a specific path such as www.website.com/blog.

    If I access the website straight from the S3 object URL everything works just fine. Pages reload and I can use direct paths to open a page. This leads me to believe the issue lies in CloudFront. However I have no idea where to start in debugging that issue.

    S3 setup: enter image description here

    • shontauro
      shontauro over 4 years
      The solution is go to Cloud front -> Select you cloud distribution detail -> select tab General -> Select edit -> In this form Setup the property Default Root Object to index.html
  • Phil Andrews
    Phil Andrews almost 7 years
    made an edit with my S3 settings
  • Janier
    Janier almost 7 years
    Does it work now?
  • Phil Andrews
    Phil Andrews almost 7 years
    No, that was how I originally had it setup. The S3 bucket serves everything flawlessly
  • Janier
    Janier almost 7 years

Related