For a small business, lower the daily cost is a good way to run business. github page provides an easy and free way to create website. and gsuite provides bunch of features for small business like emails, calendars and drives etc. After you applied a domain name from a DNS provider, the followup setting of dns to pointing different services to different venders is a must-do. that is, point web service to github, and email service to google.
To point web service to a certain server, normally people are using CNAME. and to redirect email service to google, it should use MX. but unfortunately, CNAME can not be used with MX record at the same time, it is a limitation of DNS itself. CNAME setting will break MX record.
According to RFC 1034:
If a CNAME RR is present at a node, no other data should be
present; this ensures that the data for a canonical name and its aliases
cannot be different.
Understanding the differences
These are the main differences:
Arecord maps a name to one or more IP addresses when the IP are known and stable.
CNAMErecord maps a name to another name. It should only be used when there are no other records on that name.
ALIASrecord maps a name to another name, but can coexist with other records on that name.
URLrecord redirects the name to the target name using the HTTP 301 status code.
ALIASrecords cause a name to resolve to an IP. Conversely, the
URLrecord redirects the name to a destination. The
URLrecord is a simple and effective way to apply a redirect for one name to another name, for example redirecting
Aname must resolve to an IP. The
ALIASrecords must point to a name.
- Use an
Arecord if you manage which IP addresses are assigned to a particular machine, or if the IP are fixed (this is the most common case).
- Use a
CNAMErecord if you want to alias one name to another name, and you don’t need other records (such as
MXrecords for emails) for the same name.
The solution is also simple, don’t use CNAME to redirect web service, but using A record to point the web service to the…