Site domain redirecting to the url of amazon web services bucket

穿精又带淫゛_ 提交于 2020-01-06 18:08:34

问题


I have a static website which is currently being hosted in an AWS S3 bucket: mysite.com

I used GoDaddy to purchase the domain for mysite.com and I'm in the process of configuring this URL so that it points to my AWS S3 bucket. I believe I've configured the S3 bucket correctly as mysite.com.s3-website-us-east-1.amazonaws.com serves my static site.

However, I have a problem with my AWS Route 53. I set up a hosted zone with an alias, nameservers, and a start of authority.

My problem is that when I go to mysite.com in my browser, I am redirected to mysite.com.s3-website-us-east-1.amazonaws.com. The site is correctly served from that address but I'm wondering why I'm being redirected to the AWS url.

Update - This is the result of running curl -IXGET mysite.com in the terminal:

HTTP/1.1 200 OK
x-amz-id-2: FdG4UIjsT2AYvWlGZgtZFnUCoC5rlEpUoDWslfTiLxdtqfER5/VrK5pNaR0WgNQH+VtXvLM0dc0=
x-amz-request-id: D7F6E1CD65C36959
Date: Mon, 01 Aug 2016 17:46:39 GMT
Last-Modified: Tue, 26 Jul 2016 22:10:36 GMT
ETag: "c4388dce1539caba654edf75cc674b7e"
Content-Type: text/html
Content-Length: 10364
Server: AmazonS3

回答1:


All I can suggest is to double-check Setting Up a Static Website Using a Custom Domain

I just tested the same setup here, and the domain does not redirect.

Under the S3 bucket properties, make sure the Redirect all requests to another host name is not set to an incorrect address.

Make sure the Route 53 record is using an IP alias record, as shown in the tutorial.



来源:https://stackoverflow.com/questions/38704412/site-domain-redirecting-to-the-url-of-amazon-web-services-bucket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!