I'm trying to reach my S3 website at thetoddlertown.com and I reach and XML error page. However, if I visit thetoddlertown.com/index, I reach the home page. I'm not sure why this is happening. I also have the index document set to index.html.
Asked
Active
Viewed 118 times
2 Answers
1
Turn on Static website hosting in the properties page.
It will give you a slightly different URL that will automatically redirect to default index
and error
pages. The normal bucket URL will not redirect.

John Rotenstein
- 241,921
- 22
- 380
- 470
-
I just figured out what the solution is, thank you for the input though but I had already done this. – Aric Peters Jan 08 '19 at 06:00
0
The problem was that I did not set the default root object in my cloudfront distribution. After setting it to index.html, my site worked as expected.

Aric Peters
- 111
- 1
- 2
- 13
-
This does indeed fix the problem of default routing to an error but it isn't enough to get a SPA working for instance as both the error page and the index pages need to be working as per the static website hosting configuration. If you have static website hosting configured correctly as I had, the problem is that you are probably routing incorrectly. Refer to this answer for more details: https://stackoverflow.com/a/24377823/2180290 – 0x6C38 Apr 03 '23 at 16:30