DNS Record for Subdomain: CNAME, DMARC, A Records & more

Each subdomain has its own DNS record and points to a different IP address than the main domain. The choice of DNS record—be it CNAME, A record, or DMARC—depends on where you want the DNS to point to or if you want the DNS in the same server or not.

This article explores the distinctions between CNAME, A records, and DMARC records for subdomains, covers various subdomain types, and guides on creating a subdomain in GoDaddy.

Takeaways
  • Every subdomain needs a DNS record, and you can choose from different DNS record types
  • “A” records point to static IP addresses
  • CNAME records point to domains or subdomains
  • DMARC records are used to protect email servers from cyberattacks
  • Continue reading to learn how DNS works with subdomains and which one you should choose

How Does DNS Work with Subdomains?

When accessing a website, people use user-friendly domain names like cnn.com or hostadvice.com. However, computer networks operate on IP addresses, not domain names.

The Domain Name System (DNS) translates domain names to numerical IP addresses, enabling the identification of the computer location. Upon entering a website, your device queries DNS servers for the corresponding IP, facilitating access.

Subdomains link to the same server as the primary domain name or link to a different server in another DNS zone. You can consolidate or distribute DNS records to direct traffic.

Do Subdomains Have Separate DNS?

Yes, each subdomain has its own DNS record and environment separated from the primary domain. You can assign a server to each subdomain, which allows for independent DNS management.

By doing this, you gain flexibility in configuring and managing the DNS settings for specific sections of a domain. It also allows you to optimize and organize your website, even attaining complex DNS configurations.

Why Do Subdomains Need DNS?

DNS enables proper routing and addressing of websites on the internet. DNS translates domain names into IP addresses, and it does the same with subdomains, so servers can locate and serve content to specific subdomains.

A DNS facilitates the hierarchical structure of the internet by resolving the subdomain addresses to their assigned servers. Ultimately, it results in more direct access to the services or content in each subdomain.

What DNS Records Are Needed for a Subdomain?

There are several types of DNS records. Here are the most popular:

CNAME Records for Subdomains

A Canonical Name or CNAME record connects one domain name to another. It is often used when you want one domain or subdomain to point to the same location as another domain.

In essence, it acts as an alias for another domain.

CNAME records are commonly used for pointing subdomains to third-party services like content delivery networks or hosted platforms, allowing for website URL redirection, and ensuring that multiple domain names resolve to the same location.

DNS “A” Records for Subdomains

A record is a type of DNS record that points a domain or subdomain to a server with a static IPV4 address. For instance, an A record can point to the site example.com which has the IPV4 address 93.184.216.34

Sometimes you need to use an A record instead of a CNAME for a subdomain. In this case, you can point a particular subdomain to an IPV4 address with the following pattern:

www.10800 IN A 123.123.123.123

Records are not suitable for dynamic IPs. When the IP address changes, you need to update the A record with the new IP address.

What Is the Difference between a DNS “A” Record and a Subdomain?

Subdomains are a section of a website, in a prefix before the primary name. A subdomain can use an A record, CNAME or other records for its DNS setup.

DMARC Records for Subdomain

DMARC stands for Domain-based Message Authentication, Reporting, and Conformance policy. It is a DNS record that instructs the receiving mail server what to do with a message that doesn’t align or authenticate with DKIM and other email protocols.

Here’s an example of the DMARC structure:

Final: DNS Record for Subdomain

Image source

Note

The DMARC policy set for the primary domain applies to the subdomains. But if you want to set a specific policy for a subdomain, you should use a sp record for the subdomain.

Do I Need a DMARC Record for Each Subdomain?

No, by default, a DMARC policy set for a main domain applies to all subdomains. However, if the DMARC record was set for a specific subdomain, it only applies to it.

Wildcard DNS Records for Subdomains

A DNS subdomain wildcard matches requests for subdomains yet to exist. It is specified by using an * as the prefix for the subdomain. *.example.com. However, a wildcard DNS record won’t cover a root domain.

Can DNS Records of Subdomains Point to Different IPs?

Yes. You can modify a subdomain as an A record pointing to a static IP address. You can use a CNAME to redirect the DNS to another domain name.

If you want to know more about how to manage site DNS, check our guide Managing DNS for Websites.

How to Create a DNS Record for Subdomain on GoDaddy

Here are the step-by-step instructions for adding subdomain DNS records on GoDaddy.

Step 1: Log into your GoDaddy account.

Step 2: Go to your GoDaddy Domain Portfolio and locate the domain you want to edit.

Step 3: Click on the three-dot menu on the side. Look for the Domain Edit Options and select Edit DNS

Final: DNS Record for Subdomain

Image source: GoDaddy.com 

Step 3:  Click on add new record

Final: DNS Record for Subdomain

Image Source: GoDaddy.com 

Step 4: Click on A from the “Type” menu

Step 5: Type the details for the new A record subdomain. The Name is the prefix of the record, for example, store or blog. The Value is the IP address you want the record to point to. You can add more IP addresses to this record by selecting Add another value.

Step 6: Click Save to add the new record.

Final Word: Which Type of DNS Record Should You Use?

There are several options for DNS setup. You can opt for an A record to simplify address connections, or you can use a CNAME to point to another domain or subdomain. It can also depend on your hosting provider. Ultimately, the best answers will depend on what goal you want from the domain’s subdomain

You can learn more about web hosting in our Best Web Hosting guide.

Next Steps: What Now?

Learn More About Subdomains

How to Create a Subdomain for a Primary Domain: Comprehensive GuideHow to Create a Subdomain in GoDaddy with and without cPanelWhat Is a Subdomain: Everything You Need to KnowSubdomain vs Subdirectory: Which is Better for SEO?Domain vs Subdomain: What They Are and What’s the Difference?How to Find All Subdomains of a Domain with Free Online ToolsWildcard Subdomains: What They Are & How To Set Them UpHow To Redirect a Subdomain to Url: A Complete GuideSEO for Subdomains: Benefits, Disadvantages & Strategies for SuccessEmail Subdomain: What It Is & How to Use ItSSL Certificate for Subdomain: How to Pick and Install the Right One?How to Create a Subdomain in cPanel: Step-by-Step GuideSubdomain Delegation to Another DNS Service Provider: Complete GuideNGINX Subdomain Tutorial and Setup GuideHow to Create a Subdomain in Namecheap HostingSubdomain Takeover: What It Is and How to Prevent ItSPF Record for Subdomain: What Is It & How It Works?

[/bottom-line]

Frequently Asked Questions

Can you have an "A" Record for a subdomain?

The short answer is yes, you can. A record is best to point your subdomain to static IP addresses, such as IPV4.

How to add a subdomain to DNS Windows server?

To create a DNS record for a subdomain in your main domain host name or zone, go to the context menu and select the New Host item link. Then edit it accordingly, this will result in an A record for the subdomain in your main domain.

If you want to add a subdomain then select the New Domain item from the context menu and edit.

Email Marketing vs. Social Media: Which is More Effective?

What is Email Marketing? Email marketing is a  that involves companies reaching out to potential and existing customers via email ...
10 min read
Ela Gal-Kfir
Ela Gal-Kfir
Digital Marketing Specialist

Email Engagement Metrics, Calculation & Best Practices

Email engagement tells us how interested recipients are in the content of emails they receive. It provides insights into what types of em...
12 min read
Ela Gal-Kfir
Ela Gal-Kfir
Digital Marketing Specialist

Email Cadence: What Is It & How To Optimize It Right

Email cadence guides you when and how often you should reach out to your customers. Think of it as your personal plan that helps you decide wh...
15 min read
Ela Gal-Kfir
Ela Gal-Kfir
Digital Marketing Specialist

Co-Marketing: What It Is, How to Start & Benefits for Your Business

When it comes to modern business strategies, co-marketing is a smart move for businesses. It means two or more companies work together, sharin...
10 min read
Kaitlin Culmo
Kaitlin Culmo
Hosting Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top