www的DNS问题。(桶在裸域)

时间:2021-09-10 10:43:44

I'm currently using a naked domain to A alias to Amazon's S3 web hosting service (new feature connection between Route53 and S3), but I'm having some trouble getting the www. to redirect/display the bucket. I've tried: Using CNAME for www. -> naked and *. -> naked (the normal way) Using CNAME Alias to the bucket Using CNAME Alias to the naked domain (in the same zone) Using A to alias to the bucket Using A to alias to the naked domain (in the same zone)

我目前正在使用裸域作为Amazon S3 web主机服务的别名(Route53和S3之间的新特性连接),但是我在获得www时遇到了一些麻烦。重定向/显示桶。我试过:在www中使用CNAME。- >裸体和*。-> naked(常规方式)使用CNAME对bucket的别名,使用CNAME对裸域(在同一个区域)的别名,使用A对bucket的别名,使用A对裸域(在同一个区域)的别名

Every result is either a 404 or trying to find the bucket for www.mydomain.com, which obviously doesn't exist. I quite possibly could have been overanxious and stumbled across the right one but didn't wait long enough for it, but I've been doing this over the past few hours so I think it should have went through considering I keep clearing my DNS. The normal way of using the CNAME approach gave me the www.mydomain.com bucket error. Also I'm not quite sure exactly what this "Alias" thing is all about. What is the correct method?

每个结果要么是404,要么是试图找到www.mydomain.com的桶,显然它并不存在。我很有可能是过于焦虑了,然后遇到了合适的人,但是我没有等太久,但是我已经在过去的几个小时里这么做了,所以考虑到我一直在清理DNS,我认为它应该通过了。使用CNAME方法的常规方法给出了www.mydomain.com bucket错误。我也不太清楚这个“别名”到底是什么意思。正确的方法是什么?

1 个解决方案

#1


4  

Did you use the instructions found on the Amazon Web Services Blog - Root Domain Website Hosting for Amazon S3?

您是否使用了在Amazon Web Services Blog(为Amazon S3托管的根域网站)上找到的说明?

BTW, you don't specifically need to be using Route53 to use naked domain redirects, some DNS registrars like GoDaddy even provide domain redirection to root domains.

顺便说一句,您不需要特别地使用Route53来使用裸域重定向,一些DNS注册器,如GoDaddy甚至提供域重定向到根域。

And you can always use a service like wwwizer's free naked domain redirect, which will accomplish this very easily.

你也可以使用wwwizer的免费裸域重定向这样的服务,这很容易实现。

But if you still want to use the new capability for this built into AWS, read on.

但是,如果您还想使用内置在AWS中的新功能,请继续阅读。


I'll assume you already have a CNAME record in your site's Route53 hosted zone site similar to the following:

我假设您的站点的Route53托管区域站点中已经有一个CNAME记录,类似于以下内容:

NAME                   TYPE    VALUE
www.mydomainname.com   CNAME   www.mydomainname.com.s3-website-us-east-1.amazonaws.com

And I'm also assuming that the record points to an endpoint for a bucket named www.mydomainname.com and is configured to serve a static site.

我还假设记录指向一个名为www.mydomainname.com的桶的端点,并配置为服务静态站点。

You also need to create another bucket that is mydomainname.com without the www, and configure the option "Redirect all requests to another hostname" to forward requests to your other bucket which contains your resources.

您还需要创建另一个bucket(没有www的mydomainname.com),并配置选项“将所有请求重定向到另一个主机名”,将请求转发到包含资源的其他bucket。

Now go back to your Route53 hosted zone, create an A Record, mark it as ALIAS, and a dropdown will appear that lets you choose the S3 endpoint for your naked domain's bucket.

现在回到您的Route53托管区域,创建一个记录,将其标记为别名,然后将出现一个下拉菜单,允许您为您的裸域的bucket选择S3端点。

I have this setup working on my own servers, so hopefully you shouldn't need any special steps.

我在自己的服务器上安装了这个设置,所以希望您不需要任何特殊的步骤。

#1


4  

Did you use the instructions found on the Amazon Web Services Blog - Root Domain Website Hosting for Amazon S3?

您是否使用了在Amazon Web Services Blog(为Amazon S3托管的根域网站)上找到的说明?

BTW, you don't specifically need to be using Route53 to use naked domain redirects, some DNS registrars like GoDaddy even provide domain redirection to root domains.

顺便说一句,您不需要特别地使用Route53来使用裸域重定向,一些DNS注册器,如GoDaddy甚至提供域重定向到根域。

And you can always use a service like wwwizer's free naked domain redirect, which will accomplish this very easily.

你也可以使用wwwizer的免费裸域重定向这样的服务,这很容易实现。

But if you still want to use the new capability for this built into AWS, read on.

但是,如果您还想使用内置在AWS中的新功能,请继续阅读。


I'll assume you already have a CNAME record in your site's Route53 hosted zone site similar to the following:

我假设您的站点的Route53托管区域站点中已经有一个CNAME记录,类似于以下内容:

NAME                   TYPE    VALUE
www.mydomainname.com   CNAME   www.mydomainname.com.s3-website-us-east-1.amazonaws.com

And I'm also assuming that the record points to an endpoint for a bucket named www.mydomainname.com and is configured to serve a static site.

我还假设记录指向一个名为www.mydomainname.com的桶的端点,并配置为服务静态站点。

You also need to create another bucket that is mydomainname.com without the www, and configure the option "Redirect all requests to another hostname" to forward requests to your other bucket which contains your resources.

您还需要创建另一个bucket(没有www的mydomainname.com),并配置选项“将所有请求重定向到另一个主机名”,将请求转发到包含资源的其他bucket。

Now go back to your Route53 hosted zone, create an A Record, mark it as ALIAS, and a dropdown will appear that lets you choose the S3 endpoint for your naked domain's bucket.

现在回到您的Route53托管区域,创建一个记录,将其标记为别名,然后将出现一个下拉菜单,允许您为您的裸域的bucket选择S3端点。

I have this setup working on my own servers, so hopefully you shouldn't need any special steps.

我在自己的服务器上安装了这个设置,所以希望您不需要任何特殊的步骤。