Support >
  About cybersecurity >
  DNS Resolution in Practice: How to Add A and CNAME Records for Beginners
DNS Resolution in Practice: How to Add A and CNAME Records for Beginners
Time : 2025-12-31 10:00:47
Edit : DNS.COM

  For beginners in website building, servers, or domain names, "DNS resolution" is often the first hurdle they can't avoid. Many people have already bought their servers and installed their website programs, but get stuck at the "domain cannot be accessed" step, ultimately discovering that the problem lies in mismatched DNS records, or a misunderstanding of A records and CNAME records. In fact, DNS isn't as complicated as it seems. Once the logic is clear, even beginners can configure it independently.

  What is a DNS record? Why do we need to add records?

  DNS servers don't "automatically know" where your domain name should point; they determine this through individual "records." Every resolution rule you add in your domain control panel is called a DNS record.

  There are many types of DNS records, such as A records, AAAA records, CNAME records, and MX records. For beginners, the most commonly used and easiest to encounter are A records and CNAME records. Once you understand and master these two types of records, you can handle most website building and business scenarios.

  What is an A record, and in what scenarios is it used?

  The A record is the most basic and intuitive type of DNS record. Its function is very simple: to point a domain name directly to an IPv4 address. For example, if your server IP is 203.0.113.10, then through an A record, you can tell the DNS: "When a user accesses this domain name, go directly to the server 203.0.113.10."

  Common use cases for A records include: a domain name pointing directly to a cloud server or physical server, a website deployed on a self-built server, without going through a third-party platform, having control over the IP address, and needing precise control over the resolution target. For most personal websites, corporate websites, and independently deployed websites, A records are the most commonly used and recommended method.

  What is a CNAME record, and what beginners often find confusing?

  A CNAME record can be understood as an "alias record." It doesn't directly point to an IP address, but rather to another domain name. In simpler terms: an A record is like "going to a specific address," while a CNAME record is like "asking someone else first, and then they tell you where to go."

  For example, you might set up: www.example.com → CNAME → example.cdnprovider.com

  When a user accesses www.example.com, the DNS will first look up example.cdnprovider.com, and then ultimately resolve the domain to the actual IP address.

  Common use cases for CNAME records include: using CDN acceleration services, binding domains to object storage or cloud storage, using access addresses provided by third-party platforms, and avoiding frequent DNS changes when the backend IP changes. For beginners, the biggest advantage of CNAME is its convenience; the service provider handles IP changes, and you don't need to manually modify it each time.

  The Core Difference Between A Records and CNAME Records

  Many beginners struggle with whether to use A records or CNAME records when configuring DNS for the first time. However, grasping the following core difference will prevent you from making the wrong choice.

  The characteristics of an A record are: it points directly to an IP address, has the shortest resolution path, you retain control, and you need to manually modify it if the IP address changes.

  The characteristics of a CNAME record are: it points to another domain name, the resolution process involves an extra step, it's convenient for integrating with third-party services, and backend changes are transparent to you.

  A simple way to determine which is better: if you know and know the server IP address, use an A record; if you have a domain name, use a CNAME record.

  Practical Guide: How to Add an A Record (General Approach for Beginners)

  Although the interfaces of different domain registrars may vary slightly, the logic for adding an A record is almost the same.

  Step 1: Access the domain's DNS management page. Log in to your domain registrar or DNS service provider's backend and find "Domain Resolution" or "DNS Management".

  Step 2: Click "Add Record". There will usually be a clearly marked "Add DNS Record" button.

  Step 3: Select A as the record type from the record type dropdown menu.

  Step 4: Fill in the host record. If you want accessing example.com to open the website, enter "@"; if you want accessing www.example.com, enter "www".

  Step 5: Fill in the record value. Here, enter the server's IPv4 address, for example, 203.0.113.10.

  Step 6: Keep the TTL at the default. Beginners are advised to use the default TTL and not modify it arbitrarily. After saving, the A record is added.

  Practical Exercise: How to Add a CNAME Record (General Approach for Beginners)

  The process of adding a CNAME record is very similar to that of adding an A record, only the "record value" is different.

  Step 1: Go to the DNS management page, the same as adding an A record.

  Step 2: Select CNAME as the record type.

  Step 3: Fill in the host record. Commonly, it's "www" or the business subdomain.

  Step 4: Fill in the record value. Here, enter the target domain name provided by the service provider, such as xxx.cdnprovider.com. Note that you cannot enter an IP address here; otherwise, it will be an incorrect configuration.

  Step 5: Save the record. After saving, the CNAME record will take effect.

  Common DNS Resolution Misconceptions for Beginners

  In practice, beginners often encounter problems that seem small but have a significant impact.

  One of the most common mistakes is configuring both an A record and a CNAME record for the same hostname simultaneously. For example, adding both an A and a CNAME record to www is not allowed and will cause resolution errors.

  Another common problem is misusing CNAME records for the main domain. Many DNS providers do not allow the use of "@" in CNAME records; beginners should pay special attention to the rule prompts when configuring.

  Another easily overlooked point is the DNS activation time. DNS does not take effect globally immediately after saving; it usually takes anywhere from a few minutes to several hours. Beginners should avoid frequently deleting and re-adding records, as this can easily confuse them.

  In summary: DNS is not difficult; the difficulty lies in doing it for the first time. A records and CNAME records are your first gateway into the world of servers and website building. Once you've mastered this step, HTTPS, CDN, and load balancing will follow naturally. Just remember this: the essence of DNS is to tell the world where to find your website for your domain name.

DNS Puff
DNS Luna
DNS Amy
DNS Becky
DNS Sugar
DNS Jude
DNS Grace
DNS NOC
Title
Email Address
Type
Information
Code
Submit