简体   繁体   English

如何使用在 AWS 外部管理的域创建子域以指向 Cloudfront CDN 端点

[英]How to create a sub domain to point to Cloudfront CDN endpoint using a domain managed outside of AWS

We purchased a domain from GoDaddy, for example, say mycompany.com .我们从 GoDaddy 购买了一个域,例如mycompany.com

My colleague then moved it to Wix.com to publish our marketing site, which will be available at the mycompany.com url.然后我的同事将其移至 Wix.com 以发布我们的营销网站,该网站将在mycompany.com Z527B14E4211E8ZA0BB72114E4211E8ZA06 I need to add a subdomain in AWS, pointing to a Cloudfront CDN endpoint.我需要在 AWS 中添加一个指向 Cloudfront CDN 端点的子域。

To shed more light into the current situation, here is a little more info:为了更清楚地了解当前情况,这里有更多信息:

When I check GoDaddy, it shows Nameservers, referencing the Wix servers.当我检查 GoDaddy 时,它显示名称服务器,引用 Wix 服务器。 For DNS, it says We can't display your DNS information because your Nameservers aren't managed by us.对于 DNS,它说We can't display your DNS information because your Nameservers aren't managed by us.

When I check Wix.com, I see that Managed by Third Party, Connected by DNS and still provides the option to transfer to Wix.当我检查 Wix.com 时,我看到Managed by Third Party, Connected by DNS并且仍然提供转移到 ZFADD07E45AF814CAD70FAAZ4 的选项。

Both Godaddy and Wix provide the option to add a subdomain. Godaddy 和 Wix 都提供了添加子域的选项。

I'd rather do that in AWS.我宁愿在 AWS 中这样做。

What is my best option here?我在这里最好的选择是什么? Should I transfer the domain to AWS and manage it there?我应该将域转移到 AWS 并在那里进行管理吗? If so, how do I then route traffic from mycompany.com to the marketing site?如果是这样,我如何将流量从mycompany.com路由到营销站点?

Is there a way to keep it as is, but still add a subdomain on the AWS side for example.mycompany.com ?有没有办法保持原样,但仍然在 AWS 端添加一个子域,例如example.mycompany.com

I really regret not registering this domain via AWS in the first place, but lesson learned.我真的很遗憾没有首先通过 AWS 注册这个域,但是吸取了教训。 Any help would be much appreciated.任何帮助将非常感激。

I am assuming that your DNS is being hosted via wix.com.我假设您的 DNS 是通过 wix.com 托管的。

If you want to migrate to Route 53 its not actually too hard.如果您想迁移到 Route 53,实际上并不太难。 Start by setting up a public hosted zone within Route 53 with the domain name you setup.首先使用您设置的域名在 Route 53 中设置一个公共托管区域。

Next you would want to perform a zone lookup for all your DNS records, you can use Googles DIG Tool with the ANY option or do this via cli by running dig example.com ANY .接下来,您将要对所有 DNS 记录执行区域查找,您可以使用带有ANY选项的 Googles DIG Tool或通过运行dig example.com ANY通过 cli 执行此操作。

Now that you have all the records you will need to create them within your public hosted zone, follow this tutorial if you need any assistance.现在您已经拥有了在公共托管区域中创建它们所需的所有记录,如果您需要任何帮助,请按照本教程进行操作。 Do not add the SOA or NS records.不要添加SOANS记录。

Now that all records have been migrated get the values from the NS record in your public hosted zone and replace the nameservers within GoDaddy to point at these values.现在所有记录都已迁移,从您的公共托管区域中的NS记录中获取值,并替换 GoDaddy 中的名称服务器以指向这些值。

Your DNS will migrate over whichever period the TTL of your previous NS record is set as.您的 DNS 将在您之前的NS记录的 TTL 设置为的任何时间段内迁移。 Once this has migrated and it working you can add your CNAME record as you originally wanted to add.一旦它迁移并且它工作,您可以添加您最初想要添加的CNAME记录。

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

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