*.mydomain.com - A record or CNAME?

后端 未结 4 1494
庸人自扰
庸人自扰 2020-12-25 10:03

Some people are saying use an A record and others a CNAME for a catch all subdomain.

Which should I use and why?

4条回答
  •  北海茫月
    2020-12-25 10:26

    A common use for CNAMEs is to map a subdomain to a host under someone else's control.

    In the case of "A" record if they change the IP address you don't need to change your DNS entry.

    An example of this is WordPress subdomain mapping. WordPress allows you to have a blog on something like "blog.mydomain.com", but their blogs are cloud hosted and may dynamically change IP address due to server maintenance, failover, or load-balancing. Using a CNAME means that it still works.

提交回复
热议问题