Reputation: 640
I am trying to host my website using static website hosting in AWS S3.
In S3, I create a bucket www.example5.com and make it public.
Amazon S3 Buckets
Buckets (11)
...
www.example5.com US West (Oregon) us-west-2 Public
October 18, 2022, 14:56:52 (UTC+08:00)
...
In AWS Route 53, I set up a hosted zone with the following 3 records :
Public example5.com
example5.com NS Simple - ns-175.awsdns-26.com.
ns-1882.awsdns-35.co.uk.
ns-579.awsdns-07.net.
ns-1163.awsdns-12.org.
example5.com SOA Simple - ns-175.awsdns-26.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
www.example5.com A Simple - s3-website-us-west-2.amazonaws.com.
In S3 bucket www.example5.com, under the "Static website hosting" of "properties" tag, I define
Static website hosting
Static website hosting : Enable
Hosting type : Host a static website
Index document : index.html (Specify the home or default page of the website.)
Error document : index.html
In the bottom section "Static website hosting" of "Properties" tab of S3 bucket www.example5.com, I got
Static website hosting
Use this bucket to host a website or redirect requests.
Static website hosting : Enabled
Hosting type : Bucket hosting
Bucket website endpoint
http://www.example5.com.s3-website-us-west-2.amazonaws.com
Here comes the problems:
(1) When I click the above Bucket website endpoint on AWS S3 console, I got this error in my browser
This site can’t be reached
http’s server IP address could not be found.
...
and the url link in the browser address bar becomes a wrong url with '%20' in the end and extra 'http//' without colon in the front.
http://http//www.example5.com.s3-website-us-west-2.amazonaws.com%20/
(2) When I type "www.example5.com" in browser address bar, I got the same error again
This site can’t be reached
http’s server IP address could not be found.
...
and the url in browser address bar changes to (again '%20' in the end, http// in the front)
http://http//www.example5.com.s3-website-us-west-2.amazonaws.com%20/
(3) In browser address bar if I enter "www.example5.com/index.html" , I can access the webpage correctly. And browser address bar shows:
http://www.example5.com/index.html
(4) In browser address bar if I enter "www.example5.com/en/goal.html" , I can access the webpage correctly. And browser address bar shows:
http://www.example5.com/en/goal.html
Why I cannot use "www.example5.com" and why is the bucket end point not working ?
Upvotes: -1
Views: 685
Reputation: 640
This problem is solved by deleting the S3 bucket and recreating it again.
Upvotes: 0