Custom 404 page for static site using AWS S3 buckets not working

I added "static website hosting" to my bucket properties, then "used this bucket to host the website" and added 404.html to the "error document". After that, I added the actual 404.html to my bucket. and it still doesn't work. Is there a step I am missing?

Any help would be appreciated!

+3


source to share


1 answer



If you have Static Website Hosting enabled in your S3 bucket, you might be able to install an error page.

enter image description here


If there is an engine like Angular js or Reactjs you can set an error page in your application.




And another option is to put Amazon CloudFront in front of S3, in which you can also customize error pages, with several status codes (404, 500, etc.)

enter link here


Hope I helped.

+2


source







All Articles