Editorial Guide

TXT Record vs CNAME

Compare text-based DNS policy records with alias records used for hostnames.

TXT records and CNAME records are both common in DNS, but they serve very different purposes.

TXT records usually carry policy, verification, or descriptive values, while CNAME records point one hostname at another hostname.

What TXT records do

TXT records commonly publish SPF, site verification values, DMARC policy, DKIM keys, and other text-based metadata.

What CNAME records do

CNAME records alias one hostname to another hostname instead of directly returning an IP address.

Common mistakes

People sometimes confuse verification TXT records with hostname-routing records, which can lead to broken DNS changes.

Practical takeaway

Use TXT when publishing text-based policy or verification values. Use CNAME when one hostname should follow another hostname.

Browse the full hubs

Jump into broader editorial collections built around comparisons and real-world workflows.