{"id":1695,"date":"2020-06-08T01:05:27","date_gmt":"2020-06-07T17:05:27","guid":{"rendered":"https:\/\/www.wesbytes.com\/guide\/?post_type=kb&#038;p=1695"},"modified":"2026-01-12T13:35:16","modified_gmt":"2026-01-12T05:35:16","slug":"understand-and-configure-cname-flattening","status":"publish","type":"kb","link":"https:\/\/www.servergigabit.com\/guide\/kb\/understand-and-configure-cname-flattening","title":{"rendered":"Understand and configure CNAME Flattening"},"content":{"rendered":"<div class=\"mkb-anchor mkb-clearfix mkb-back-to-top-inline\">\n<h2><strong>Understand and configure CNAME Flattening<\/strong><\/h2>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/main.qcloudimg.com\/raw\/e11e96bb0af1596983735507680bac11.png\" alt=\"configure CNAME Flattening\" width=\"800\" height=\"300\" \/><\/p>\n<h2 class=\"mkb-anchor__title\">How CNAME Flattening works<\/h2>\n<\/div>\n<p>Per DNS specifications (RFCs), a domain cannot have a\u00a0<em><a href=\"https:\/\/www.cloudflare.com\/learning\/dns\/dns-records\/dns-cname-record\/\" rel=\"nofollow noopener\" target=\"_blank\">CNAME<\/a> record<\/em>\u00a0and another DNS record of a different type if both records would share the same name. configure CNAME Flattening DNS RFCs also require an\u00a0<em>MX record<\/em>\u00a0to correspond to a related\u00a0<em>A record<\/em>\u00a0and not a\u00a0<em>CNAME<\/em>. This is problematic when you need a\u00a0<em>CNAME<\/em>\u00a0for your root (for example, a\u00a0<em>CNAME<\/em>\u00a0from example.com to example.herokuapp.com) but also need another type of DNS record at the root domain such as an\u00a0<em>MX record<\/em>\u00a0for mail delivery.<\/p>\n<p>Typically, the aforementioned situation would cause problems receiving email. However,\u00a0<strong>CNAME Flattening\u00a0<\/strong>ensures the chain of\u00a0<em>CNAMEs<\/em>\u00a0is follow to an\u00a0<em>A<\/em>\u00a0or\u00a0<em>AAAA<\/em>\u00a0record to allow mail delivery while still adhering to DNS RFCs. The\u00a0<em>CNAME<\/em>\u00a0responses are cached and DNS TTLs are respected.<\/p>\n<p><strong>CNAME Flattening<\/strong>\u00a0still works if the corresponding DNS\u00a0<em>CNAME record<\/em>\u00a0is \u201cgrey cloud\u201d in the\u00a0<strong>DNS<\/strong>\u00a0app of the Cloudflare dashboard.<\/p>\n<hr \/>\n<div class=\"mkb-anchor mkb-clearfix mkb-back-to-top-inline\">\n<h2 class=\"mkb-anchor__title\">How to change settings for CNAME Flattening<\/h2>\n<\/div>\n<p><strong>CNAME Flattening<\/strong>\u00a0cannot be disable. By default, domains are setup to only flatten\u00a0<em>CNAME records<\/em>\u00a0at the root domain.<\/p>\n<p>Domains on Pro, Business and Enterprise plans can either apply\u00a0<strong>CNAME Flattening<\/strong>\u00a0to\u00a0<em>CNAMEs<\/em>\u00a0at the root domain or for all\u00a0<em>CNAMEs<\/em>\u00a0within the domain. To flatten all\u00a0<em>CNAMEs<\/em>\u00a0in the domain, select Flatten all\u00a0<em>CNAMEs\u00a0<\/em>from the\u00a0<strong>CNAME Flattening<\/strong>\u00a0dropdown menu within the\u00a0<strong>DNS<\/strong>\u00a0app of the Cloudflare dashboard.<\/p>\n<p>Free plans can only flatten\u00a0<em>CNAMEs<\/em>\u00a0at the root domain.<\/p>\n<p>&nbsp;<\/p>\n<p><span data-sheets-root=\"1\">Please refer to the following article to know more.<br \/>\nKnowledge Base: <a href=\"https:\/\/www.servergigabit.com\/guide\/kb\/advanced-dns-zone-editor-add-cname-record\">Advanced DNS Zone Editor \u2013 Add CNAME record<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Understand and configure CNAME Flattening How CNAME Flattening works Per DNS specifications (RFCs), a domain cannot have a\u00a0CNAME record\u00a0and another DNS record of a different type if both records would share the same name. configure CNAME Flattening DNS RFCs also require an\u00a0MX record\u00a0to correspond to a related\u00a0A record\u00a0and not a\u00a0CNAME. This is problematic when you need a\u00a0CNAME\u00a0for your root (for&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"kbtopic":[43],"kbtag":[1391],"class_list":["post-1695","kb","type-kb","status-publish","hentry","kbtopic-cloudflare","kbtag-cname"],"_links":{"self":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/comments?post=1695"}],"version-history":[{"count":4,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1695\/revisions"}],"predecessor-version":[{"id":5993,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1695\/revisions\/5993"}],"wp:attachment":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/media?parent=1695"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=1695"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtag?post=1695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}