使用cloudflare用户
1)通过cloudflare接口复制DNS区域
2)设置cloudflare名称服务器
在DNS区域中有一堆A记录,例如
apex.com A 6.6.6.6
www A 6.6.6.6
但是,有时我需要跨越具有不同IP的服务器移动网站.
我会用CNAME记录替换A记录,例如.
apex.com CNAME apex.hosting.com
www CNAME apex.hosting.com
如果不是SOA / NS vs区域顶点CNAME问题.
有哪些替代方案可以在DNS区域级别解决此问题?
为什么我无法在DNS区域级别找到解决此类问题的原因.
不幸的是,负载均衡器/虚拟化不是一种选择.
解决方法
将您的区域顶点设置为此IP地址的记录,它提供从您的域的非WWW版本到WWW版本的301重定向.
Just point your naked domain to 174.129.25.170 and it will be redirected to the same domain with www in front. Read more…
在亚马逊S3提供S3网站根域支持之前,亚马逊的首席技术官Werner Vogels used to use this for his own blog. Amazon Route53 DNS服务从此开始提供称为‘alias record’的特殊记录类型:
Additionally,Route 53 offers ‘Alias’ records (a Route 53-specific virtual record). Alias records are used to map resource record sets in your hosted zone to Elastic Load Balancing load balancers,CloudFront distributions,or S3 buckets that are configured as websites. Alias records work like a CNAME record in that you can map one DNS name (example.com) to another ‘target’ DNS name (elb1234.elb.amazonaws.com). They differ from a CNAME record in that they are not visible to resolvers. Resolvers only see the A record and the resulting IP address of the target record.
但是,这仅适用于亚马逊客户.我经常使用带有我通过Rackspace Cloud DNS托管的域名的wwwizer,我对它非常满意.