Secure Web Accelerator (SWA), powered by Cloudflare, includes a powerful feature called CNAME Flattening. This technology allows you to use a CNAME record at your "zone apex" (the root domain, e.g., example.com without the www), which is traditionally not permitted by standard DNS rules.
Overview
Standard DNS specifications (RFCs) require the root of a domain to have an A record (pointing to a static IP address). However, many modern web services and CDNs use dynamic IP addresses.
CNAME flattening solves this by:
-
Allowing you to create a CNAME record for your root domain.
-
Automatically "flattening" the record into an A record at the authoritative name server level.
-
Returning the actual IP address to the visitor, ensuring compatibility while providing the flexibility of a CNAME.
Benefits
Implementing CNAME flattening with Secure Web Accelerator (SWA) provides several key advantages for your domain management and website performance:
-
Root Domain Flexibility: Point your root domain (
example.com) directly to a service provider's hostname. -
Performance: Decreases resolution time by resolving the CNAME chain internally before answering the DNS query.
-
Ease of Management: If your hosting provider changes their IP addresses, your SWA setup updates automatically without manual intervention.
How it Works in SWA
With SWA, CNAME flattening is typically handled in one of two ways, depending on your configuration:
-
Automatic Flattening at Apex: SWA automatically flattens CNAME records created at the root (
@) of your domain. You do not need to toggle a specific "flatten" switch for the root; the system handles it to ensure your site remains reachable. -
Proxied Records: Any CNAME record that is Proxied (indicated by the Orange Cloud icon) is effectively flattened because the DNS query will return Cloudflare’s Anycast IP addresses instead of the destination hostname.
Steps to Manage CNAME Records
To add or modify a record that utilizes flattening:
-
Log in to your my.101domain.com account.
-
Select Domain Names from the main menu.
-
Click on the domain name you wish to manage.
-
Scroll down to the SWA / Cloudflare Management section and click Manage DNS Records.
-
To point your root domain to a hostname:
-
Type: Select
CNAME. -
Name: Enter
@(representing the root). -
Target: Enter the destination hostname (e.g.,
ghs.googlehosted.comoralias.herokudns.com). -
Proxy Status: Ensure the cloud icon is Orange (Proxied) for maximum benefit.
-
-
Click Save.
Important Considerations
-
MX Record Compatibility: Because CNAME flattening makes the record appear as an A record to the outside world, it does not interfere with your MX (email) records, unlike a traditional CNAME.
-
Verification Issues: If a third-party service (like an SSL provider) requires a literal CNAME record for domain verification, you may need to temporarily disable the Proxy (Gray Cloud) or "Flattening for all CNAMEs" (if available in SWA Premium) to allow the verification to complete.
Need assistance with any step along the way? The 101domain Support Team is available through several convenient channels.
-
Support Tickets: Submit a request through our Support Ticket system.
-
Live Chat: Start a conversation with our team by opening a LiveChat Session
-
Phone: United States: 877.983.6624 | International: +1.760.444.8674