简体   繁体   English

完整的网址是否保留在CNAME别名上

[英]does the complete url stay on a CNAME alias

domain.com       A       IP
www.domain.com       CNAME   domain.com

In this scenario would www.domain.com/foo/bar point to domain.com/foo/bar? 在这种情况下,www.domain.com / foo / bar会指向domain.com/foo/bar吗?

Would the url still be www.domain.com/foo/bar 网址是否仍为www.domain.com/foo/bar

Thanks 谢谢

In this scenario, requests to http://www.domain.com/ and http://domain.com/ would connect to the same IP address but would use two distinct host names: www.domain.com and domain.com respectively. 在这种情况下,对http://www.domain.com/http://domain.com/请求将连接到相同的IP地址,但是将使用两个不同的主机名:分别为www.domain.comdomain.com 。 。

There wouldn't be a redirection from http://domain.com/ to http://www.domain.com/ (or the other way around) unless the server was configured to do so (but this isn't directly linked to the DNS configuration, rather it's about the configuration of the HTTP server). 除非服务器已配置为从http://domain.com/重定向到http://www.domain.com/ (或相反),否则不会进行重定向(但这不是直接链接的) DNS配置,而是关于HTTP服务器的配置)。

The URL will stay the same. URL将保持不变。 On DNS level your URL will be mapped to the same IP address as it is known for domain.com 在DNS级别,您的URL将映射到与domain.com相同的IP地址。

So you will receive a request from www.domain.com 因此,您将收到来自www.domain.com的请求

If you change the underlying IP address of domain.com it will automatically reflect to the CNAME alias www.domain.com 如果您更改domain.com的基础IP地址,它将自动反映为CNAME别名www.domain.com

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

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