Amazon S3 is not serving files correctly

I made this site for my friend and I uploaded it to an Amazon S3 bucket ( and when I go to that site the page doesn't load correctly and I have no idea why. Any ideas?

For example, the stylesheet.css doesn't load correctly. If you go to, it downloads the file instead of loading it as CSS.

Answers 1

  • Check the mime types (HTTP content type header) on the files you uploaded. S3 does not always set them correctly. You may need to set them on the upload API call. Some upload libraries will do this for you.

    If the mime types are not correct when the file is downloaded from the browser from S3 if the mime type is not set correctly it will not always render correctly.

Related Articles