Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customize the 404 page in S3

Tags:

amazon-s3

I'm almost a newbie in what respects to amazon buckets and instances, and what I have to do now is a custom error page for error 404. What is shown now is the default error page that shows an non-user-friendly XML telling that the file was not found.

Any ideas of a nice way to make this?

like image 369
FabKremer Avatar asked Oct 21 '13 18:10

FabKremer


2 Answers

I found the documentation to be extremely unclear. It says "provide this custom error document", which leaves me asking, "but how do I provide it?" It's in the S3 console, under the Properties tab, under "Static website hosting". But, you won't see it until you select the huge radio button beside "Use this bucket to host a website"

Setting custom 404 page in S3 static website bucket

like image 85
Bruno Bronosky Avatar answered Oct 01 '22 08:10

Bruno Bronosky


If you place CloudFront in front of S3 (your traffic costs will be lower) and it also allows you a far more fine-grained approach to how handling any errors (not just 404 errors)

like image 29
Kayasaurus Avatar answered Oct 01 '22 07:10

Kayasaurus