0
votes

I have been trying to host a static website on Amazon s3 and have followed the instructions from http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html. I used my domain example.com as my bucket name and im able to access the site on my browser with the provided bucket url. However, I have then tried to configure www.example.com to redirect to example.com but have not been able to successful at getting it to redirect. What am I doing wrong?

3
This is not a software development issue, and neither Server Fault nor Webmasters will take it. Try Super Useruser1864610

3 Answers

3
votes
  1. Create the bucket.
  2. Right click on the files and make it public.
  3. Check the properties to get the public url. It looks something like this, <bucket-name>.s3-website-<AWS-region>.amazonaws.com
  4. Redirect the user to the public url from the desired domain.

Now, if you creating a static html page. Put the html page, in folder inside a bucket. Place the js,css and other dependent files in the folder or a subfolder and add their relative url in the html page. All the dependent files also have to be marked as public.

0
votes

Which domain name service are you using ? AWS Route 53 or GoDaddy?

If you have purchased your domain name using AWS Route 53, it is quite easy, where you need to add a new hosted zone entry and select your S3 bucket as the alias.

If it's GoDaddy or some other hosting provider, additional configuration steps are required.

0
votes

Option from me: https://github.com/igorkasyanchuk/amazon_static_site

Use this tool to upload static files and host with your own domain using Amazon S3, Cloudflare. You also will get HTTPS for FREE.

This tool is open source and production-ready.