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

查看:26
本文介绍了使用 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 地址和 Amazon S3 站点的 www 的 CNAME 之外的所有 DNS

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,您的浏览器都会将您的网站显示为www.example.com".

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.

注意:您可以使用带有名称屏蔽"的完整存储桶 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天全站免登陆