-
Create two S3 bucket with your domain name
(www and non-www)- example.com
- www.example.com
-
Configure
non-wwwbucket to redirect towwwbucket
-
Upload your web content to www bucket
-
Configure www bucket for web-hosting by selecting
static website hosting
- Make www bucket as
publicand add the belowpolicy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect":"Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::www.example.com/*"
}
]
}
-
Create AWS route53 public hosted zone with the same name as the domain name (Non-WWW).
-
Update GoDaddy NS with AWS provided NS (without ending dot(.).
-
In AWS Route53
create
A Typerecordset for thenon-wwwdomain and select- Enable
Alias - Alias to S3 website endpoint,
- Select the region of your bucket
- Select your
S3 main bucket(i.e non-www domain)
create
A Typerecordset forwwwsubdomain and repeat the above steps/points except the selecting S3wwwbucket. - Enable
- Access your web site from browser. Enjoy





