CNAME
对于 https://a.xiezhao.me cname https://b.xiezhao.me
如果要SSL访问. a.xiezhao.me 和 b.xiezhao.me都需要SSL certificate
A CNAME is not a redirect.
A CNAME instructs the DNS to resolve to the same domain as where the CNAME points.
The CNAME does not cause a redirect.
It only causes the HTTP request for a domain to be made to the same IP address as requests for another domain.
cname https://site1.example/ to https://site2.example/
- DNS lookup for site1.example. Discover it it is a CNAME for site2.example.
- DNS lookup for site2.example. Find an A record for its IP address (192.0.2.4, for example).
- Open a socket to the IP address 192.0.2.4 on port 443.
- Negotiate TLS (SSL) for the domain site1.example.
- Make the HTTPS request for https://site1.example/:
shell GET / HTTP/1.1 Host: site1.example
6. Get the response back with the redirect:shell 301 Moved Permanently Location: https://site2.example/
- Perform another DNS lookup for site2.example. Find an A record for its IP address (192.0.2.4, for example). The DNS response will come from DNS cache this time.
- Open a socket to the IP address 192.0.2.4 on port 443.
- Negotiate TLS (SSL) for the domain site2.example.
- Make the HTTPS request for https://site2.example/:
shell GET / HTTP/1.1 Host: site2.example
11. Get the response back with the content:shell 200 OK ...