Find cheap domain names for your website - namesilo.com
Namesilo Blog
Blog
DNS13 min

Custom Domains in SaaS: TXT vs CNAME Verification (and When to Use Each)

NS
NameSilo Staff

10/9/2025
Share
When you connect a custom domain to a SaaS platform, the service needs proof that you actually control that domain. This verification step protects both parties: it prevents unauthorized users from hijacking domains they don't own, and it ensures your traffic routes correctly to the intended service.
Most platforms offer two primary verification methods: TXT records and CNAME records. While both accomplish the same goal, they work differently and suit different scenarios. Understanding these distinctions helps you choose the right approach and avoid common configuration problems.

How Domain Verification Works

Domain verification relies on DNS records that only the domain owner can add or modify. When you claim a domain in a SaaS platform, the service generates a unique token or value. You then create a DNS record containing this value, and the platform queries DNS servers to confirm the record exists.
This process proves control without requiring access to your account credentials or server infrastructure. It's the same principle that certificate authorities use when issuing SSL certificates, and it's become the standard for domain ownership validation across the web.
The verification happens at the DNS level, which means you need access to manage DNS records for your domain. If you registered your domain recently, you likely have this access through your domain registrar's control panel.

TXT Record Verification Explained

TXT records store arbitrary text data in DNS. Originally designed for human-readable information, they've evolved into a versatile tool for machine-readable verification data.

How TXT Verification Works

When using TXT verification, the SaaS platform provides a string of characters that looks something like platform-verification=abc123def456. You create a TXT record at a specific hostname (often the root domain or a subdomain like _verification.yourdomain.com) containing this exact string.
The platform then performs a DNS lookup for TXT records at that hostname. If it finds the matching verification string, ownership is confirmed. The entire process typically completes within minutes, though DNS propagation can sometimes take longer.

Advantages of TXT Records

TXT records offer several practical benefits for verification purposes.
They don't interfere with existing domain functionality. Adding a TXT record to your root domain has no impact on your website, email, or other services. This makes TXT verification the safer choice when you're unsure about potential conflicts.
Multiple TXT records can coexist at the same hostname. If you need to verify your domain with three different SaaS platforms simultaneously, you can create three separate TXT records. Each platform reads only the value it's looking for and ignores the others.
TXT records serve verification purposes exclusively. Once verification completes, you can usually remove the record without affecting service delivery. Some platforms require the TXT record to remain in place for ongoing ownership validation, but many only check during initial setup.

TXT Record Limitations

Despite their flexibility, TXT records have constraints worth considering.
They provide verification only, not functionality. A TXT record proves you own the domain but doesn't route any traffic or enable any services. You'll typically need additional DNS changes to make the actual service work.
Finding the right TXT record can be tricky when you have many. If you verify domains with numerous platforms over time, your DNS zone accumulates TXT records. Determining which record belongs to which service becomes challenging without good documentation.
Character limits occasionally cause issues. While the DNS protocol supports TXT records up to 65,535 characters, some DNS providers impose lower limits. Very long verification strings might need to be split across multiple TXT records, which adds complexity.

CNAME Record Verification Explained

CNAME records create aliases that point one hostname to another. They're commonly used to direct traffic to external services while maintaining your own domain name.

How CNAME Verification Works

With CNAME verification, the SaaS platform provides a hostname (like verify.saasplatform.com) and instructs you to create a CNAME record pointing to it. You might create a record like verify.yourdomain.com that points to their verification hostname.
The platform then queries DNS for your CNAME record. If it finds the record pointing to the correct verification hostname, ownership is confirmed. This method proves control because only the domain owner can create records under their domain.

Advantages of CNAME Records

CNAME verification offers distinct benefits in certain situations.
It combines verification with configuration. Once your CNAME record points to the platform's infrastructure, that same record often handles actual traffic routing. You verify ownership and configure the service in a single step.
CNAME records enable dynamic updates. If the SaaS platform needs to change backend IP addresses or infrastructure, they can update the target hostname without requiring any changes on your end. Your CNAME continues pointing to their hostname, which they control.
Wildcard CNAME records simplify multi-subdomain setups. If you need to route multiple subdomains to a platform (like app.yourdomain.com, api.yourdomain.com, and cdn.yourdomain.com), a single wildcard CNAME can sometimes handle all of them.

CNAME Record Limitations

CNAME verification comes with technical restrictions that TXT records don't face.
You cannot create CNAME records at your root domain. The DNS specification prohibits CNAME records at the zone apex (the bare domain without any subdomain prefix). If a platform requires CNAME verification at your root domain, you'll encounter problems. Some DNS providers offer workarounds like ALIAS or ANAME records, but these aren't universally supported.
CNAME records cannot coexist with other record types at the same hostname. If you create a CNAME for www.yourdomain.com, you cannot also have an A record, MX record, or TXT record at that exact hostname. This exclusivity can create conflicts if multiple services need different record types at the same location.
Removing CNAME records affects service delivery. Unlike TXT records that only serve verification purposes, CNAME records often route actual traffic. Deleting a CNAME record immediately breaks whatever service depends on it.

Potential DNS Conflicts and How to Avoid Them

Certain DNS configurations create conflicts that prevent verification from working correctly.

Root Domain CNAME Conflicts

The most common issue arises when platforms request CNAME verification at your root domain. Since CNAME records cannot exist at the zone apex, this request is technically impossible to fulfill.
If you encounter this requirement, check whether the platform offers alternative verification methods. Many services that request root domain CNAMEs also support TXT verification or subdomain CNAME verification.
Some DNS providers offer ALIAS or ANAME records as a workaround. These proprietary record types function similarly to CNAMEs but work at the root domain. However, they're not part of the DNS standard, so verify that both your DNS provider and the SaaS platform support them.

Email Service Conflicts

MX records for email and CNAME records for verification can conflict if poorly planned.
Suppose you use domain-based email for [email protected], which requires MX records at your root domain. If a SaaS platform asks you to create a CNAME at the root domain, you face an impossible choice: email or the SaaS service, but not both.
The solution is subdomain separation. Keep your email on the root domain and configure the SaaS service on a subdomain like app.yourdomain.com. This allows MX records at the root and CNAME records on the subdomain without conflict.

Multiple CNAME Conflicts

Two services requesting CNAME records at the same hostname creates another common conflict.
Imagine Service A wants www.yourdomain.com pointing to service-a.example.com, while Service B wants www.yourdomain.com pointing to service-b.example.net. You can only create one CNAME record at www.yourdomain.com, so one service must go elsewhere.
Planning your subdomain structure prevents these issues. Assign unique subdomains to each service from the start: service-a.yourdomain.com and service-b.yourdomain.com. This approach scales as you add more services.

TTL Planning for Verification

Time To Live (TTL) values determine how long DNS records are cached before being refreshed. TTL planning becomes important during verification and service changes.

Lower TTL Before Major Changes

If you're about to verify a domain and configure a new service, temporarily lower the TTL on relevant DNS records. Reduce it to 3600 seconds (1 hour) if your DNS provider allows.
This preparation means that when you create the verification record, it propagates quickly. If you make a mistake and need to correct it, the fix also propagates quickly rather than being stuck in caches for hours.
Once verification completes and the service is stable, increase the TTL back to a higher value like 7200 seconds (two hour) or 86400 seconds (24 hours). Higher TTLs reduce DNS query load and improve performance.

Account for Propagation Time

Even with low TTL values, DNS changes take time to propagate globally. Different DNS servers refresh their caches at different intervals, and some ISPs ignore TTL suggestions and cache records longer than requested.
When verifying a domain, expect the process to take anywhere from a few minutes to several hours. If verification fails immediately, wait 15-30 minutes and try again before assuming something is wrong.
Plan verification during low-traffic periods when possible. If the verification process requires temporarily breaking existing services, choose a maintenance window when the impact is minimal.

Automation Considerations

If you frequently verify domains across multiple SaaS platforms, automation can save significant time.

API-Based DNS Management

Many DNS providers offer APIs that allow programmatic record creation. If you manage DNS records manually through a web interface today, consider whether API access might benefit your workflow.
With API access, you could build scripts that create verification records automatically when setting up new services. This reduces human error and speeds up the verification process.

Verification Webhooks

Some advanced SaaS platforms offer webhook notifications during the verification process. Your system could listen for a "verification pending" webhook, automatically create the required DNS record via API, and then receive a "verification complete" webhook.
This level of automation makes sense primarily for agencies or businesses that regularly provision custom domains at scale. For occasional domain verification, manual processes work fine.

Documentation Systems

Even without full automation, maintaining good documentation about your DNS records prevents confusion later.
Keep a spreadsheet or document listing each verification record, which service it belongs to, when it was created, and whether it can be safely removed. When you return to your DNS settings months later, you'll know exactly what each record does.

Safe De-provisioning

Eventually, you may need to disconnect a domain from a SaaS service. Proper de-provisioning prevents disruptions and keeps your DNS zone clean.

Verify Service Removal First

Before deleting any DNS records, confirm within the SaaS platform that you've removed or transferred the domain. Deleting DNS records while the platform still expects them can create confusing error states.
Many platforms have a "remove custom domain" or "disconnect domain" function. Use this feature first, then proceed with DNS cleanup.

Remove Configuration Before Verification

If the service uses both CNAME records for traffic routing and TXT records for verification, remove the CNAME records first. This stops traffic from flowing to the service.
After confirming the service no longer receives traffic, remove the verification TXT record. This order prevents situations where verification still passes but the service is broken.

Check for Hidden Dependencies

Some services create multiple DNS records that work together. A platform might require a CNAME for the application, an A record for API access, and TXT records for email authentication.
Before removing records, audit your entire DNS zone for entries related to the service. Removing some records but not others can leave partially configured services that cause subtle problems.

Choosing Between TXT and CNAME

With both methods understood, how do you choose which to use?

Use TXT When:

You need to verify your root domain and the platform allows it. TXT records work at the zone apex where CNAMEs cannot.
You're verifying multiple services on the same subdomain. Multiple TXT records coexist peacefully, while multiple CNAMEs conflict.
You want verification separate from configuration. TXT verification lets you prove ownership without immediately routing traffic.
Your DNS zone has complex existing records. TXT records add verification without risking conflicts with other services.

Use CNAME When:

The platform requires it for both verification and service delivery. Combined verification and configuration simplifies management.
You're configuring a subdomain with no existing records. A clean subdomain has no conflict risks.
You want the platform to manage backend changes transparently. CNAME indirection lets them update infrastructure without your involvement.
You're setting up multiple related subdomains. Wildcard or multiple CNAME records can efficiently route various subdomains to the platform.

Security Considerations

Domain verification relates directly to security, and understanding potential vulnerabilities matters.

Protect Your DNS Management Access

Anyone with access to modify your DNS records can verify domains on your behalf. Treat DNS management credentials with the same security you apply to other critical systems.
Enable two-factor authentication on your DNS provider account. Use strong, unique passwords. Limit access to only team members who need it.

Monitor Unexpected Verification Records

Regularly review your DNS zone for verification records you don't recognize. An unexpected TXT record containing a verification string could indicate someone else verified your domain with a service without authorization.
Set up alerts if your DNS provider offers them. Some services can notify you whenever DNS records change, helping you catch unauthorized modifications quickly.

Understand Verification Persistence

Know whether verification records need to remain in place permanently or can be removed after initial verification.
If a platform only checks ownership during initial setup, you can remove verification records afterward. If the platform performs periodic revalidation, removing the record might cause service disruptions weeks or months later.

Working With Multiple DNS Providers

Organizations sometimes split DNS management across multiple providers for different domains or subdomains.
If your root domain DNS is managed through one provider but you delegate a subdomain to another provider, verification records must be created with the correct provider.
For example, if yourdomain.com DNS is managed at Provider A, but you've delegated app.yourdomain.com to Provider B, then verification records for app.yourdomain.com must be created at Provider B.
This delegation structure can cause confusion during verification. If verification fails unexpectedly, verify that you're creating records with the authoritative DNS provider for that specific hostname.

Troubleshooting Verification Failures

When domain verification doesn't work as expected, systematic troubleshooting identifies the problem.

Verify Record Syntax

DNS records require exact syntax. A single incorrect character in a TXT verification string invalidates the entire record. Copy and paste verification values rather than typing them manually.
Check for invisible characters, extra spaces, or encoding issues. These subtle problems cause verification failures that are difficult to spot visually.

Check DNS Propagation

Use DNS lookup tools to verify your records are visible publicly. Search for "DNS propagation checker" or use command-line tools like dig or nslookup.
Query DNS servers in different geographic locations. Sometimes records propagate to some servers but not others, helping you identify regional propagation issues.

Confirm Record Location

TXT records might need to be at the root domain, a specific subdomain, or a subdomain with an underscore prefix like _verification.yourdomain.com. Verify you created the record at exactly the hostname the platform specified.
CNAME records must match the requested hostname precisely. If the platform asks for a CNAME at verify.yourdomain.com, creating it at verification.yourdomain.com won't work.

Review Existing Records

Check whether conflicting records prevent verification from working. A CNAME at the same hostname as your verification TXT record would create a conflict.
Some DNS providers prevent certain record combinations. If your DNS interface won't let you create a record, it might be protecting you from creating an invalid configuration.

Platform-Specific Variations

Different SaaS platforms implement verification with unique requirements and quirks.
Some platforms accept either TXT or CNAME verification interchangeably. Others mandate a specific method. Read the platform's documentation carefully to understand exactly what they require.
Certain services require multiple records for complete configuration. You might need a TXT record for verification, a CNAME for traffic routing, and additional TXT records for email authentication. Follow the complete checklist the platform provides.
A few platforms use verification methods beyond standard TXT and CNAME records. Some might ask you to upload a specific file to your web server or create an HTTP redirect. These alternatives serve the same purpose: proving you control the domain.

Long-Term DNS Hygiene

As you verify domains with various services over time, your DNS zone accumulates records. Maintaining organization prevents future confusion.
Document the purpose of each record when you create it. Either use your DNS provider's comment field or maintain external documentation. Six months later, you'll thank yourself for noting "TXT record for Platform X verification, added June 2025."
Periodically audit your DNS records and remove those no longer needed. If you stopped using a service two years ago but its verification TXT record remains, delete it. Unnecessary records clutter your zone and increase cognitive load.
Consider using descriptive subdomain names that indicate their purpose. Instead of verify1.yourdomain.com and verify2.yourdomain.com, use platform-a-verify.yourdomain.com and platform-b-verify.yourdomain.com. The naming makes each record's purpose self-evident.

The Bigger Picture

Domain verification sits at the intersection of security, functionality, and usability. It protects your brand and services while enabling the flexible, distributed architectures that modern web applications require.
Understanding TXT and CNAME verification methods empowers you to make informed decisions about DNS configuration. You can anticipate potential conflicts, plan changes to minimize downtime, and troubleshoot problems effectively when they arise.
Whether you manage a single domain or dozens, these verification concepts remain consistent across platforms. The time invested in understanding DNS mechanics pays dividends every time you connect a custom domain to a new service.
ns
NameSilo StaffThe NameSilo staff of writers worked together on this post. It was a combination of efforts from our passionate writers that produce content to educate and provide insights for all our readers.
More articleswritten by NameSilo
Jump to
Smiling person asking you to sign up for newsletter
Namesilo Blog
Crafted with Care by Professionals

Millions of customers rely on our domains and web hosting to get their ideas online. We know what we do and like to share them with you.

This newsletter may contain advertising, deals, or affiliate links. Subscribing to a newsletter indicates your consent to our Terms of Use and Privacy Policy. You may unsubscribe from the newsletters at any time.