使用GoDaddy域名托管链接到Amazon S3网站 [英] Using GoDaddy Domain Hosting to link to Amazon S3 Website

查看:410
本文介绍了使用GoDaddy域名托管链接到Amazon S3网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一些域名托管在 GoDaddy.com 。我试图避免支付主机服务,除了使用一个静态的Amazon S3页面(因为我不期望这些站点的流量很多)。我已经取得了一些成功,但不知道这是否是一个糟糕的解决方案。

So I have some domains hosted at GoDaddy.com. I am trying to avoid to pay for a hosting service, except for using a static Amazon S3 page (as I don't expect much traffic at all for these sites). I have had some success, but not sure if this is a poor solution...

我为 domain.com


  1. 将GoDaddy的永久转发设置为 www.domain.com

删除GoDaddy IP的A地址以外的所有DNS,将Amazon的CNAME移至Amazon S3站点

Remove all DNS except for the A address to the GoDaddy IP, and a CNAME of www to the Amazon S3 site

如果有人输入 www.domain.com ,它按照计划工作。对于 domain.com ,似乎也可以正常工作。然而,即使我告诉GoDaddy,它是一个永久的前进,似乎做了302重定向而不是301。我最终可以转到Google网站管理员工具,并说我想要使用 www.domain.com 。但是,这似乎有点过分。

It works as planned if someone types in www.domain.com. It seems to work alright for domain.com, too. However, it seems to do a 302 redirect instead of 301 even when I tell GoDaddy to have it be a permanent forward. I can ultimately goto Google Webmaster tools and say that I want it to use www.domain.com. However, that seems a little excessive.

有关如何使此解决方案更好地工作的任何建议?

可能通过更改一些DNS设置或一些其他GoDaddy选项,我不知道?

Any suggestions on how to make this solution work better?
Possibly by changing some of the DNS settings or some other GoDaddy options that I don't know about?

推荐答案

您必须将您的S3桶命名为与您的域名相同的 www.example.com请确保您包含www。子域前缀作为桶名称的一部分。

You must name your S3 bucket the same as your domain, "www.example.com" Make sure you include the "www." subdomain prefix as part of the bucket name.

根据亚马逊的说明!确保输入了index.htm文件名,并在权限下设置了正确的桶策略设置。

Set up your bucket as a web site per Amazon's instructions!. Make sure you have an "index.htm" file name entered and the correct bucket policy setup under Permissions.

在Godaddy DNS设置下,只需一个条目,设置主机WWW CNAME,指向s3-website-us-east-1.amazonaws.com或任何s3域名亚马逊供应您的桶。你离开http://www.example.com。引导亚马逊提供的网址。

Under Godaddy DNS settings make just one entry, set Host WWW CNAME, points to, "s3-website-us-east-1.amazonaws.com" or whatever s3 domain Amazon supplies for your bucket. You leave off the "http://www.example.com." heading in the url that Amazon supplies.

转发/管理的最后一步是将您的裸域名example.com转发到www.example .com

The last step under Forwarding/manage is to "forward only" your naked domain name "example.com" to "www.example.com"

如果您这样做,您的浏览器会将您的网站显示为www.example.com,无论您输入网址是否输入了www。

If you did it right your browser will display your site as "www.example.com" whether you entered the www or not when you entered the url.

注意:您可以使用完整的桶名称使用名称掩码转发到您的存储桶,但是大多数网页抓取工具将无法看到您的完整网站,如果您这样做方式和网络搜索将失败。

NOTE: You could just Forward to your bucket using the complete bucket url with "name masking", however most web crawlers will not see your complete site if you do it that way and web searches will fail.

确保等待至少30分钟,然后再测试您的更改,并通过所有方式清除您的缓存在浏览器中,否则将使用旧的解决从过去记得的。

Be sure to wait at least 30 minutes before testing your changes and by all means clear your cache in your browser or it will use the old address that it remembers from the past.

这篇关于使用GoDaddy域名托管链接到Amazon S3网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆