简体   繁体   English

如何在 Route53 中从非 WWW 路由到 WWW?

[英]How to route in Route53 from non-WWW to WWW?

I've seen all the solutions for this kind of questions, but they are all related with S3 bucket solutions.我看过所有这类问题的解决方案,但它们都与S3存储桶解决方案有关。 These solutions does not fit my issue, because I don't see how S3 bucket is related with it.这些解决方案不适合我的问题,因为我看不出 S3 存储桶与它有何关系。

Anyway, I have a domain name www.example.com .无论如何,我有一个域名www.example.com I use an A Record to route it to my ALB.我使用A Record将其路由到我的 ALB。 Works fine.工作良好。 By now, I had some configuration for example.com (routed via A Record to ALB).到目前为止,我已经有了一些配置,例如example.com (通过A Record路由到 ALB)。 But this practice is considered bad because SEO considers these 2 domains as 2 different pages.但这种做法被认为是不好的,因为 SEO 将这 2 个域视为 2 个不同的页面。

So What I need is to redirect(?) example.com to www.example.com .所以我需要的是重定向(?) example.comwww.example.com

I tried configure PTR Routing type on example.com to www.example.com but that's just doesn't work.我尝试将example.com上的PTR路由类型配置为www.example.com但这不起作用。 When I do so I get "DNS_PROBE_FINISHED_NXDOMAIN".当我这样做时,我得到“DNS_PROBE_FINISHED_NXDOMAIN”。

What is the correct way to do so?这样做的正确方法是什么?

For this, you can also create a CNAME record with host as www and value is your LB or IP.为此,您还可以创建一个 CNAME 记录,主机为 www,值为您的 LB 或 IP。

Regards问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM