大网数据广告活动
服务器运维问答

Can't point my subdomain address to CloudFront distribution (using S3 + CF + Route 53)

· 52CE 我爱测

[Jump to bottom to see updates and latest attempts] First of all, I apologize if I misuse terminology here. I work as FE developer and this area on networking and setting up domains and aws services is really not my strongest. I …

问题原文

原帖链接 · Rafael Santos · CC BY-SA 4.0

[Jump to bottom to see updates and latest attempts]

First of all, I apologize if I misuse terminology here. I work as FE developer and this area on networking and setting up domains and aws services is really not my strongest. I took this task as a good chance for learning.

I'm hosting an application on S3 buckets. The idea is to have a bucket for analytics.gleechi.io, another one for staging-analytics.gleechi.io where I will use as staging. gleechi.io on itself has no content, so user just redirects to analytics.gleechi.io

The domain name gleechi.io was previously on a different registrar (godaddy) and I transferred it to aws.

After much struggle I was able to create hosted zones and CloudFront distributions for it and link them to my S3 buckets.

The CF works fine and if I open its link d10yu7tqracz7m.cloudfront.net my application loads correctly.

What is missing now is to point analytics.gleechi.io address to that CF. I can't figure out what am I doing wrong in here as I followed aws guides already so many times and everything seems to be in place. I have a few clues that something is wrong with DNS and perhaps it has to do with the fact that everything was registered somewhere outside aws before and I perhaps need to do something in these places?

  • I login into godaddy but I see absolutely nothing there but when I open gleechi.io it shows me a page that is clearly from godaddy.
  • Running the command dig +short gleechi.io gives me the address from 1) but running dig +short analytics.gleechi.io gives me nothing
  • To add to the confusion when I run whois gleechi.io it gives me Registrar WHOIS Server: whois.gandi.net Registrar URL: http://www.gandi.net why gandi? Shouldn't it be aws, since it is where it was transferred? Or if anything...godaddy then. Is it possible that maybe only the domain was registered in godaddy but maybe DNS was setup in gandi ? (I didn't do the setup myself, but a former employee years ago, so I might be dealing with unknown scenario here)

Here is how I setup my Route 53:

  1. I created a hosted zone analytics.gleechi.io and in there I created a record A that points to my CF d10yu7tqracz7m.cloudfront.net.
  2. I copied the 4 NS values from there
  3. I added the 4 NS values from the analytics.gleechi.io together with the already 4 existent NS values in gleechi.io
  4. Under Domains -> Registered Domains -> gleechi.io I have the 4 NS originally created by Route 53 on gleechi.io (but not the 4 from analytics.gleechi.io) , which I assume is the right way to do

Here is the aws guide I followed https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-routing-traffic-for-subdomains.html I also tried the 1st option (Create records in the hosted zone for the domain) but that didn't work out either.

Here are screenshots of the configs and values I have on Route 53

UPDATE after comments and answers:

I deleted the host zone for analytics.gleechi.io and added that as an A record under gleechi.io . Still no success Trying to lookup gleechi.io or analytics.gleechi.io on https://lookup.icann.org/lookup throws me this error: Failed to perform lookup using WHOIS service: TLD_NOT_SUPPORTED

Below screenshots of my updated configuration I'm running out of ideas here

已采纳解答

原帖链接 · Nick · CC BY-SA 4.0

There are two things that you have to do:

You can get rid of the secondary hosted zone you have created for analytics.gleechi.io and under Domains -> Registered Domains, leave only the 4 original name servers for the gleechi.io hosted zone.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-09-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。