{"id":28286,"date":"2025-07-02T09:43:51","date_gmt":"2025-07-02T07:43:51","guid":{"rendered":"https:\/\/tremhost.com\/blog\/?p=28286"},"modified":"2025-07-02T09:43:51","modified_gmt":"2025-07-02T07:43:51","slug":"what-are-a-records-cname-records-and-mx-records","status":"publish","type":"post","link":"https:\/\/tremhost.com\/blog\/what-are-a-records-cname-records-and-mx-records\/","title":{"rendered":"What are A records, CNAME records, and MX records?"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><h3>1. <strong>A Records (Address Records)<\/strong><\/h3>\n<ul>\n<li><strong>What they do:<\/strong><br \/>\nAn <strong>A record<\/strong> maps your domain name (like <code>yourwebsite.com<\/code>) directly to an IP address (like <code>123.45.67.89<\/code>). This tells browsers exactly where to find your website on the internet.<\/li>\n<li><strong>Example:<\/strong><br \/>\nIf you set an A record for <code>yourwebsite.com<\/code> to <code>123.45.67.89<\/code>, anyone who visits that domain will be sent to the server at that IP address.<\/li>\n<li><strong>When to use:<\/strong><br \/>\nUse A records to point your main domain or subdomains directly to a web server\u2019s IP address.<\/li>\n<\/ul>\n<hr \/>\n<h3>2. <strong>CNAME Records (Canonical Name Records)<\/strong><\/h3>\n<ul>\n<li><strong>What they do:<\/strong><br \/>\nA <strong>CNAME record<\/strong> points a domain or subdomain to another domain name, instead of an IP address. It\u2019s like saying, \u201cThis domain is really just an alias for another domain.\u201d<\/li>\n<li><strong>Example:<\/strong><br \/>\nIf you want <code>blog.yourwebsite.com<\/code> to show your WordPress-hosted blog, you might set a CNAME for <code>blog<\/code> pointing to <code>yourblog.wordpress.com<\/code>.<\/li>\n<li><strong>When to use:<\/strong><br \/>\nUse CNAME records to set up subdomains (like <code>www<\/code>, <code>blog<\/code>, or <code>shop<\/code>) that should follow another domain\u2019s DNS settings.<br \/>\n<strong>Note:<\/strong> You cannot use a CNAME for your root domain (e.g., <code>yourwebsite.com<\/code>), only for subdomains.<\/li>\n<\/ul>\n<hr \/>\n<h3>3. <strong>MX Records (Mail Exchange Records)<\/strong><\/h3>\n<ul>\n<li><strong>What they do:<\/strong><br \/>\nAn <strong>MX record<\/strong> tells the internet where to deliver email sent to your domain (like <code>info@yourwebsite.com<\/code>). It assigns your domain\u2019s email traffic to a specific mail server.<\/li>\n<li><strong>Example:<\/strong><br \/>\nIf you use Google Workspace for email, you\u2019ll set MX records that point to Google\u2019s mail servers.<\/li>\n<li><strong>When to use:<\/strong><br \/>\nUse MX records to direct email for your domain to the right provider.<br \/>\nYou can have multiple MX records with different priorities for backup mail servers.<\/li>\n<\/ul>\n<hr \/>\n<h2>In a Nutshell:<\/h2>\n<ul>\n<li><strong>A Record:<\/strong><br \/>\nConnects a domain or subdomain to an IP address (for your website).<\/li>\n<li><strong>CNAME Record:<\/strong><br \/>\nConnects a subdomain to another domain name (for aliases or redirects).<\/li>\n<li><strong>MX Record:<\/strong><br \/>\nTells email where to go (for your domain\u2019s email addresses).<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1. A Records (Address Records) What they do: An A record maps your domain name (like yourwebsite.com) directly to an IP address (like 123.45.67.89). This tells browsers exactly where to find your website on the internet. Example: If you set an A record for yourwebsite.com to 123.45.67.89, anyone who visits that domain will be sent [&hellip;]<\/p>\n","protected":false},"author":226,"featured_media":28287,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"tdm_status":"","tdm_grid_status":"","footnotes":""},"categories":[49],"tags":[],"class_list":{"0":"post-28286","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tips"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/28286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/users\/226"}],"replies":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/comments?post=28286"}],"version-history":[{"count":2,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/28286\/revisions"}],"predecessor-version":[{"id":28289,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/28286\/revisions\/28289"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/media\/28287"}],"wp:attachment":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/media?parent=28286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/categories?post=28286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/tags?post=28286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}