How to Host Your Static Website on Amazon S3: Step-by-Step Guide
- Login to your Amazon AWS account
- Create a new hosted zone for your domain using Route 53
- Copy the NS records for this zone to your domain provider (e.g., GoDaddy)
- Edit your domain on your domain registrar (e.g., GoDaddy) by clicking Set Nameservers
- Create a new Amazon S3 bucket for your website
- Edit the bucket policy
- Paste in this policy, making sure to update for your domain
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::serbinskipromise.com/*"
}
]
}
- Enable website hosting for this S3 bucket
- Create a record set for this new bucket: Set type A-record, Alias true and select the bucket you created before
- (optionally) Setup another bucket to redirect www.* requests to a clean URL (or vice versa to maintain www.*)
- Redirect requests to this new bucket to your main domain
- Create a record set for this new bucket
- Upload content and 🙌🏻
Ted Serbinski Newsletter
Join the newsletter to receive the latest updates in your inbox.