DNS is a naming system that translates domain names into IP addresses so users can reach cloud applications.
For cloud applications, DNS is not just a basic setup task. It controls how users reach your website, API, app server, load balancer, mail service, verification records, and failover endpoints. A small DNS mistake can make a healthy server look offline. A poorly planned TTL can slow down a migration. A missing record can break email delivery, SSL validation, monitoring, or production traffic.
At Raff Technologies, we treat DNS as part of application reliability. Raff supports 10K+ deployed VMs, 1,000+ customers, 24/7 human support, and 99.9% uptime, but a reliable server still needs correct DNS to be reachable. Infrastructure can be healthy while users cannot connect because a domain points to the wrong place.
This guide explains the DNS records cloud applications usually need, how TTL affects propagation and failover, which DNS architecture fits different workloads, and how to plan safer changes before users are affected.
DNS is the traffic map for cloud applications

DNS connects human-readable names to technical infrastructure.
Users type a domain such as example.com. Behind the scenes, DNS tells browsers and systems where that name should go. That destination may be a cloud server IP address, a load balancer, a mail provider, a verification service, or another hostname.
For a cloud application, DNS often supports several paths:
- The root domain, such as
example.com - The
wwwsubdomain - API endpoints, such as
api.example.com - Admin portals, such as
admin.example.com - Status pages, such as
status.example.com - Mail routing through MX records
- Domain verification through TXT records
- SSL certificate validation
- CDN or load balancer targets
- Failover destinations
This makes DNS a reliability layer.
A cloud app can have enough CPU, RAM, storage, backups, and firewall rules, but if DNS points to the wrong IP or stale endpoint, users still cannot reach it. That is why DNS should be treated as infrastructure configuration, not only domain management.
Good DNS design gives each service a clear name, a clear destination, and a clear change process.
Common DNS records for cloud workloads
Most cloud applications rely on a small set of DNS records.
You do not need to memorize every DNS record type to run a cloud application well. You do need to understand the common ones and how they affect production services.
| Record type | What it does | Common cloud use |
|---|---|---|
| A | Points a hostname to an IPv4 address | example.com to a VM IPv4 address |
| AAAA | Points a hostname to an IPv6 address | IPv6 access for cloud services |
| CNAME | Creates an alias from one hostname to another | www.example.com to example.com or load balancer hostname |
| MX | Routes email for a domain | Business email provider setup |
| TXT | Stores text metadata | Domain verification, SPF, DKIM, DMARC |
| NS | Defines authoritative nameservers | Delegates DNS management |
| CAA | Controls which certificate authorities may issue SSL certificates | Certificate security |
| SRV | Defines service location details | Some internal or protocol-specific services |
For many cloud applications, the most important records are A, AAAA, CNAME, MX, and TXT.
A typical setup might look like this:
| Hostname | Record type | Destination |
|---|---|---|
example.com | A | Public IPv4 address of VM or load balancer |
www.example.com | CNAME | example.com |
api.example.com | A or CNAME | API server or load balancer |
mail.example.com | MX-related setup | Mail provider |
_verify.example.com | TXT | Domain verification value |
example.com | TXT | SPF, DKIM, or DMARC policy |
The record type should match the destination.
Use A or AAAA when pointing directly to IP addresses. Use CNAME when creating an alias to another hostname. Use MX for email routing. Use TXT for verification and email security policies.
A, AAAA, and CNAME records are the foundation
For web applications and APIs, A, AAAA, and CNAME records usually matter most.
An A record points a hostname to an IPv4 address. For example, if a cloud VM has a public IPv4 address, the root domain can use an A record to point to that server.
An AAAA record does the same thing for IPv6.
A CNAME record points one hostname to another hostname. This is often used for subdomains such as www, app, api, or status.
For example:
| Goal | Record choice |
|---|---|
| Point root domain to server IPv4 | A record |
| Point root domain to IPv6 | AAAA record |
Point www to root domain | CNAME record |
Point api to a load balancer hostname | CNAME record |
| Point app directly to public VM IP | A or AAAA record |
CNAME records are convenient because they reduce duplication. If www.example.com is a CNAME for example.com, then changing the destination of example.com can also move www.
However, CNAME records have limits. In most DNS setups, the root or apex domain should not use a standard CNAME because the apex also needs other records such as NS, SOA, MX, and TXT. Some providers offer ALIAS, ANAME, or CNAME-flattening features to solve this, but support varies.
The practical rule is simple:
Use A and AAAA records for direct IP mapping. Use CNAME records for aliases and subdomains.
TXT records matter more than teams expect
TXT records often look less important because they do not route users to a server.
In practice, they are essential.
Cloud applications commonly use TXT records for:
- Domain ownership verification
- SSL certificate validation
- SPF email policy
- DKIM email signing
- DMARC email protection
- Third-party service verification
- Security and compliance checks
If TXT records are missing or incorrect, your domain may fail verification, email may land in spam, certificates may not issue, or third-party services may refuse to activate.
TXT records also require careful handling because multiple services may ask for records on the same domain. Replacing an existing TXT value by mistake can break another service.
For email, SPF, DKIM, and DMARC are especially important:
| Record | Purpose |
|---|---|
| SPF | Defines which mail servers can send email for your domain |
| DKIM | Adds cryptographic signing to email |
| DMARC | Tells receivers how to handle email that fails SPF or DKIM checks |
A cloud application may not send email at first, but most businesses eventually need transactional email, password resets, notifications, invoices, alerts, or support messages. DNS is part of making those reliable.
TTL controls how long DNS answers are cached
TTL means Time To Live.
It defines how long DNS resolvers and clients should cache a DNS answer before checking again. TTL is usually measured in seconds.
For example:
| TTL value | Meaning | Common use |
|---|---|---|
| 60 seconds | Cache for 1 minute | Migrations, failover preparation, active changes |
| 300 seconds | Cache for 5 minutes | Common production balance |
| 3600 seconds | Cache for 1 hour | Stable services |
| 86400 seconds | Cache for 24 hours | Very stable records with rare changes |
Low TTL means changes can be picked up faster. High TTL reduces repeated DNS lookups and can be more efficient for stable records.
The mistake is treating TTL as an afterthought.
TTL affects migrations, failover, SSL changes, server replacements, and load balancer cutovers. If a record has a 24-hour TTL and you change it during an emergency, some resolvers may continue using the old answer for a long time.
Before a planned migration, lower the TTL in advance.
For example, if you plan to move traffic tomorrow, reduce the TTL today. Then wait for the old TTL to expire. When the migration happens, DNS changes can take effect faster because resolvers are now caching the record for a shorter period.
TTL planning should happen before the change window, not during it.
DNS propagation is mostly caching
People often say “DNS propagation” as if DNS changes travel across the internet in one central wave.
In practice, propagation is mostly about caches expiring.
When you update a DNS record, authoritative nameservers may reflect the change quickly. But recursive resolvers, operating systems, browsers, and intermediate caches may continue using the old answer until the TTL expires.
That is why two users can see different results after a DNS change. One resolver may already have refreshed. Another may still be serving the old cached answer.
This matters during:
- Server migrations
- Domain launches
- SSL setup
- IP address changes
- Load balancer cutovers
- Disaster recovery
- Provider changes
- Email routing changes
The best way to reduce uncertainty is to prepare:
- Lower TTL before planned changes.
- Verify records from multiple resolvers.
- Keep the old server available during transition.
- Avoid deleting old records too early.
- Monitor traffic on both old and new endpoints.
- Confirm SSL works before the final cutover.
- Document rollback steps.
DNS changes are simple when prepared and stressful when rushed.
The decision framework for DNS architecture
Not every cloud application needs advanced DNS.
A small website, production SaaS app, API platform, and multi-region service have different DNS needs.
Use this framework to choose the right DNS architecture.
| Workload type | Recommended DNS setup | TTL strategy | Failover need |
|---|---|---|---|
| Personal site or small landing page | A record to one VM, optional www CNAME | 300–3600 seconds | Low |
| Small business website | A record or load balancer target, www CNAME, basic TXT records | 300–3600 seconds | Low to medium |
| Production web app | Load balancer target, API subdomain, SSL validation, email/security TXT records | 300 seconds | Medium |
| SaaS platform | Separate app/API/admin/status hostnames, load balancer, monitoring | 60–300 seconds | Medium to high |
| High-availability app | DNS failover or load balancer-based routing with health checks | 60–300 seconds | High |
| Multi-region app | Geo or latency routing, regional endpoints, health checks | 60–300 seconds | High |
| Email-heavy domain | MX, SPF, DKIM, DMARC, verification records | Stable TTL after setup | Medium |
A practical rule of thumb:
Use simple DNS for simple workloads, but lower TTL and plan failover before the workload becomes business-critical.
DNS should match business impact.
If downtime affects revenue, support load, customer trust, or SLAs, then DNS should not be improvised during incidents. It should be part of the reliability design.
DNS failover should be planned before downtime
DNS failover means shifting traffic from an unhealthy endpoint to a healthy one by changing or routing DNS answers.
It can be useful, but it has limits.
DNS is not always instant because resolvers cache answers. Even with a low TTL, some clients may continue using older records for a short time. That means DNS failover is not the same as real-time load balancing.
Still, DNS failover can be effective when planned properly.
Common approaches include:
| Failover model | How it works | Best for |
|---|---|---|
| Manual failover | Operator changes DNS during incident | Simple workloads with acceptable downtime |
| Active-passive | Primary endpoint serves traffic; backup waits | Small production apps and disaster recovery |
| Active-active | Multiple endpoints serve traffic | Higher availability applications |
| Geo routing | Users are routed to regional endpoints | Global apps and latency-sensitive services |
| Weighted routing | Traffic is split by percentage | Gradual migrations and canary releases |
Manual failover is easy to understand but depends on human response time.
Active-passive is useful when a backup environment exists but does not normally serve traffic.
Active-active improves availability but requires both environments to be healthy, synchronized, and monitored.
Geo routing helps when users are spread across regions, but it adds operational complexity.
Weighted routing is useful for gradual cutovers, but it requires careful monitoring and rollback planning.
Choose the simplest model that meets the recovery target.
Active-passive failover is usually the first upgrade
Active-passive failover uses one primary environment and one standby environment.
The primary handles normal traffic. The passive environment remains ready for recovery if the primary fails. During an incident, DNS can shift users toward the standby environment.
This model is often the first realistic failover upgrade for small production applications.
It works well when:
- The workload is important but not global
- Recovery can tolerate a short delay
- The team wants a disaster recovery path
- Running two fully active systems is unnecessary
- Data replication or backup restoration is manageable
The challenge is keeping the passive environment ready.
A standby server that has not been updated, tested, or synchronized may fail when needed. Active-passive failover requires operational discipline:
- Keep configuration aligned.
- Test the standby path.
- Replicate or restore data clearly.
- Keep SSL certificates valid.
- Lower TTL before risky maintenance windows.
- Document failover and rollback steps.
Active-passive is simpler than active-active, but it is not automatic by default.
Active-active DNS needs stronger architecture
Active-active means multiple endpoints serve traffic at the same time.
This can improve availability and distribute load, but it requires a stronger application architecture. Both environments must be able to serve requests safely.
Active-active DNS works best when:
- Application servers are stateless
- Data is synchronized or centrally managed
- File uploads do not depend on one local server
- Sessions are externalized
- Deployments are coordinated
- Monitoring checks each endpoint
- Rollback is well understood
The main risk is inconsistency.
If one region has old code, stale data, missing files, or broken configuration, DNS may still send users there unless health checks catch the issue.
Active-active is powerful, but it should be earned. Many teams should first stabilize a load balancer-based single-region setup before moving to multi-endpoint DNS routing.
DNS migrations need a change plan
DNS migrations are common.
A team may move from one server to another, replace a VM, add a load balancer, move an API to a new subdomain, or change mail providers.
A safe DNS migration plan should include:
- Current DNS record inventory
- Target DNS record list
- TTL reduction before migration
- SSL certificate readiness
- Server readiness
- Firewall readiness
- Health check readiness
- Monitoring on old and new endpoints
- Rollback plan
- Post-migration verification
The common mistake is changing the record first and checking everything afterward.
That creates avoidable downtime.
For planned migrations, prepare the new endpoint first. Confirm the app works. Confirm SSL works. Confirm firewall rules allow the right traffic. Confirm logs and monitoring are ready. Lower TTL ahead of time. Then change DNS.
After the change, keep the old endpoint available long enough to serve users still reaching cached records.
DNS cutovers are smoother when both old and new infrastructure overlap for a short period.
DNS security and reliability best practices
DNS configuration affects both uptime and security.
A reliable DNS setup should be simple, documented, monitored, and protected from accidental or unauthorized changes.
Keep records minimal and intentional
Every DNS record should have a purpose.
Old verification records, unused subdomains, stale IP addresses, and forgotten test entries create confusion. Some can also create security risk if they point to resources no longer controlled by the team.
Review DNS records regularly and remove what is no longer needed.
Use clear subdomain naming
Subdomains should describe service roles clearly.
Common patterns include:
www.example.comapp.example.comapi.example.comadmin.example.comstatus.example.comdocs.example.com
Avoid naming that only one person understands. DNS outlives many early decisions, so clarity matters.
Lower TTL before planned changes
Lower TTL before migrations, failover tests, server replacements, or provider changes.
Do this early enough for old cached answers to expire before the real change.
After the migration is stable, TTL can be raised again if the record is not expected to change frequently.
Protect DNS account access
DNS changes can redirect production traffic, break email, interfere with SSL validation, or support phishing if misused.
Protect DNS management with:
- Strong passwords
- Multi-factor authentication
- Limited admin access
- Change review
- Audit logs
- Separate roles for production domains
- Removal of old team members
DNS account security is infrastructure security.
Monitor DNS and endpoint health
DNS monitoring should check both records and service availability.
Useful checks include:
- Does the hostname resolve correctly?
- Does it resolve from multiple regions or resolvers?
- Is the endpoint reachable?
- Is HTTPS valid?
- Is the certificate correct?
- Is the app returning expected content?
- Are old IPs still receiving traffic unexpectedly?
DNS can be technically correct while the application is still unhealthy. Monitor the full path, not only the record.
Document record ownership
Every important DNS record should have an owner.
The owner may be a person, team, or service. The goal is to make future changes safer. If nobody knows why a record exists, nobody knows whether it can be changed safely.
For production domains, DNS documentation should include:
- Record name
- Record type
- Destination
- Purpose
- Owner
- TTL
- Last reviewed date
- Related service
- Rollback notes
This is especially important for TXT records and third-party service verification.
How DNS applies on Raff Technologies
Raff Technologies gives teams the cloud infrastructure pieces needed to support practical DNS-based architectures.
A simple app may use an A record that points a domain directly to a Raff Linux VM. A growing production app may point the domain to a load balancer in front of multiple Raff VMs. A more private architecture may keep backend services inside Raff Private Cloud Networks while only public endpoints receive DNS records.
A practical Raff DNS setup might look like this:
| Hostname | Destination |
|---|---|
example.com | Public VM or load balancer |
www.example.com | CNAME to root domain |
api.example.com | API VM or load balancer |
admin.example.com | Restricted admin endpoint |
status.example.com | Status page or external status provider |
| TXT records | SSL validation, SPF, DKIM, DMARC, verification |
The design rationale is simple: DNS should expose only the services users need to reach.
Backend databases, private app servers, internal workers, and monitoring nodes usually do not need public DNS records. They should communicate through private networking and firewall rules instead.
Raff Linux VMs can deploy quickly, which makes DNS readiness especially important. A server can be available in minutes, but the application is not truly production-ready until the domain, SSL, firewall, monitoring, and DNS records are correct.
For most teams, the safest path is:
- Start with a clear domain structure.
- Point public hostnames only to public services.
- Keep private services off public DNS.
- Lower TTL before migrations.
- Use load balancers or failover planning when uptime becomes important.
- Review DNS records after major infrastructure changes.
DNS should make cloud infrastructure easier to reach, not easier to misconfigure.
DNS checklist before launch
Before launching a cloud application, review DNS with a practical checklist.
- Does the root domain resolve correctly?
- Does
wwwresolve correctly? - Does the API hostname resolve correctly?
- Are A, AAAA, and CNAME records used correctly?
- Are MX records configured if the domain receives email?
- Are SPF, DKIM, and DMARC records configured if the domain sends email?
- Are TXT verification records documented?
- Is TTL appropriate for the launch stage?
- Has TTL been lowered before migration?
- Does HTTPS work on every public hostname?
- Are old IP addresses still referenced anywhere?
- Are private services excluded from public DNS?
- Is DNS account access protected by MFA?
- Is there a rollback plan?
- Are DNS records monitored after launch?
If the app is production-critical, also review failover:
- Is there a backup endpoint?
- Is failover manual or automated?
- Are health checks reliable?
- Has failover been tested?
- Does the team know how to roll back?
DNS should be checked before launch, before migration, and after major infrastructure changes.
Conclusion
DNS is one of the most important reliability layers for cloud applications.
It decides how users reach your servers, APIs, load balancers, email services, status pages, and failover endpoints. Good DNS design keeps records clear, TTL values intentional, public hostnames limited, and migration plans safe.
Start simple when the workload is simple. Use A and AAAA records for server IPs, CNAME records for aliases, TXT records for verification, and MX records for email. Lower TTL before migrations. Monitor DNS after changes. Plan failover before downtime forces the decision.
On Raff Technologies, DNS works together with Linux VMs, load balancers, firewall rules, and Private Cloud Networks. Public DNS should point users to the services they need, while private infrastructure stays protected behind internal networking and controlled access.