*.mydomain.com - A record or CNAME?

后端 未结 4 1499
庸人自扰
庸人自扰 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:30

    If you have multiple domain that points to the same site:

    With A record: every of your domain points to the IP of your site, when your change your server's IP, you will need to update multiple time.

    With CNAME: every of your domain points to a CNAME, when your server's IP change, you will only need to update the A record of that CNAME.

    If you have a domain that doesn't belongs to you, or you don't have the control of what it will be pointing to, you can only use CNAME.

提交回复
热议问题