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. Selecting the right Domain Hosting provider is essential for securing a unique online identity and ensuring optimal site functionality. For tailored recommendations, check out our comprehensive list of the best Domain Hosting providers.
Recommended Domain Hosting Providers
Provider | User Rating | Best For | Expert & User Reviews | |
---|---|---|---|---|
5.0 | Versatility | HostArmada Review | Visit HostArmada | |
4.9 | Customization | Ultahost Review | Visit Ultahost | |
4.6 | Speed | Hostinger Review | Visit Hostinger |
- 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:
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:
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
Image source: GoDaddy.com
Step 3: Click on add new record
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?
- If you haven’t already, choose a hosting provider that aligns with your website’s needs and budget
- Choose and add subdomains using your hosting provider
- Select the DNS record type you will use
- Set up your website
- Optimize it for search engines
Learn More About Subdomains