The domain name itself is just a string of address; what actually determines which server or which email service it points to are the DNS records. Most problems encountered when configuring a website or email ultimately come down to a single record.
A Record: Pointing to a Specific Server Address
An A record is used to point a domain name to a specific network address. When a visitor accesses the domain, this record determines where the request is sent. When the website server is replaced, this is usually the record that gets modified.
CNAME Record: Pointing to Another Domain Name
A CNAME record points one domain name to another domain name. It is often used to point a subdomain (such as www) to the main domain or to an address provided by a third-party service. The advantage is that when the target address changes, you only need to adjust it on the other side, without modifying each one individually.
Note that the same host name should not have both a CNAME and other records set at the same time, otherwise conflicts are likely to occur.
MX Record: Determining Email Traffic
MX records are used to specify the servers that receive email. When an enterprise email service changes providers, the MX records need to be adjusted according to the parameters provided by the new provider, which may also involve records such as SPF and DKIM used to verify sender identity.
TXT Record: Carrying Verification and Declaration Information
TXT records are used to store additional information in text form, with common uses including domain ownership verification and email sending policy declarations. Many platforms require adding a TXT record with specified content when binding a domain, to confirm that you have control over that domain.
NS Record: Specifying Who Is Responsible for Resolution
NS records indicate which servers are responsible for resolving the domain name. When changing DNS providers, the NS records need to be adjusted, and record migration should be completed before they take effect.
A Few Tips for Configuration
- After DNS changes, it usually takes some time to take effect globally; confirm the record content is correct before making changes
- Record the original configuration before making changes, so you can roll back if problems arise
- For records involving email services, it is best to confirm the parameters with the email service provider before adjusting them
Most DNS errors are not technical difficulties, but rather records filled in incorrectly or omitted. Looking over them once more before making changes is easier than troubleshooting after problems arise.
