Can the server obtain the original address after the CNAME domain name?

Source: Internet
Author: User
The domain name www. blog. comCNAME to 123.xx.com can also be CNAME to 345.xx.com. The server receives the www. blog. com1 request, can the server get the domain name 345.xx.com or 123.xx.com? {Code...} does not exist $ origin? How can I get the $ origi... domain name if it exists? www.blog.comCNAME 123.xx.comAnd possibly CNAME 345.xx.com,
The server receives www.blog.com/1The server can obtain the domain name. 345.xx.comOr 123.xx.com?


  

$ Origin does not exist? How can I get $ origin if it exists? Thank you.

Reply content:

Domain Namewww.blog.comCNAME123.xx.comAnd possibly CNAME345.xx.com,
The server receiveswww.blog.com/1The server can obtain the domain name.345.xx.comOr123.xx.com?


   

$ Origin does not exist? How can I get $ origin if it exists? Thank you.

Yes. Target Domain Name for Server Resolution (www.blog.com).www.xx.com.


      array(5) {    ["host"]=>    string(16) "www.a.shifen.com"    ["class"]=>    string(2) "IN"    ["ttl"]=>    int(267)    ["type"]=>    string(1) "A"    ["ip"]=>    string(14) "61.135.169.105"  }  [1]=>  array(5) {    ["host"]=>    string(16) "www.a.shifen.com"    ["class"]=>    string(2) "IN"    ["ttl"]=>    int(267)    ["type"]=>    string(1) "A"    ["ip"]=>    string(14) "61.135.169.125"  }}

You cannot directly obtain the CNAME domain name on the server. Because CNAME resolution is completed in the DNS resolution step, the server only receives the request host, on the server side, I am afraid it cannot be processed directly based on the CNAME domain name;
If you want to obtain the DNS record, you can use the functions in the corresponding language to send the request.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.