This tutorial explains how to host your static website on Amazon Web Service S3 with your custom domain name on gandi (or on any other registrar).
The name of the bucket should be your domain name:
example.com
Go to bucket properties, then Static website hosting and select enable website hosting
. Index document should be index.html.
Click save
Upload the content of your website in your bucket and make the files public.
Get the endpoint of your bucket (eg. example.com.s3-website.eu-central-1.amazonaws.com) and run ping to get the IP.
ping example.com.s3-website.eu-central-1.amazonaws.com
PING s3-website.eu-central-1.amazonaws.com (54.231.194.51): 56 data bytes
@ 3600 IN A 54.231.194.51
www 3600 IN CNAME example.com.
After a few hours, your domain name should be available (under root domain example.com
) and www.example.com
should be redirected to example.com
.
Next step: deploy from your source control system (bitbucket or github) to AWS S3 automatically
How do I add this DNS record: @ 3600 IN A 54.231.194.51