如何将域名指向从Amazon S3提供静态网站? (不是子域) [英] How to point a domain to serve static site from Amazon S3? (not sub-domain)

查看:603
本文介绍了如何将域名指向从Amazon S3提供静态网站? (不是子域)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到有几个人描述如何为具有子域的自定义域执行此操作,但没有人谈论如何在没有人的情况下执行此操作。

I see several people describing how to do this for a custom domain with sub-domain but no one talking about how to do it without one.

示例:设置foobar.com和www.foobar.com指向我的Amazon S3托管站点

我个人不想要www前缀。没有办法让这种情况发生吗?我似乎很疯狂,亚马逊可以将其设置为允许静态网站和自定义域名,然后将其锁定到前缀域?

I personally do not want the www prefix. Is there no way to make this happen? I seems crazy that Amazon would set it up to allow static sites and custom domains, then lock it down to prefixed domains?

提前感谢

推荐答案

不幸的是,您不能将foobar.com指向亚马逊S3桶,其原因与DNS的工作原理有关。

Unfortunately you can not point foobar.com to an Amazon S3 bucket and the reason for this has to do with how DNS works.

DNS不允许域的根(称为区域顶点)指向另一个DNS名称(您不能将foobar.com设置为CNAME / only subdomain.foobar.com可以是CNAME)

DNS does not allow the root of a domain (called zone apex) to point to another DNS name (you can not have foobar.com set up as a CNAME / only subdomain.foobar.com can be a CNAME)

这篇关于如何将域名指向从Amazon S3提供静态网站? (不是子域)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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