Pointing The Apex Domain At A Hosting Platform That Only Gives A Hostname

Solvedapex-domaincnamedns3 replies · 5 views · started
Accepted solution by Dima Grant — From experience: if teh platform publishes stable IP addresses for apex domains (some do, specifically for this case), u can use plain…
  1. not gonna lie this is driving me nuts fun problem! i'm deploying a site to a hosting platform that tells me to cretae a CNAME pointing to something like myproject.platform.example, that works fine for www, but my DNS provider refuses to create a CNAME on the bare domain because "other records exist".

    I do have MX and TXT records at teh root for email 🙏 how are people supposed to point the apex at a hostname? im about to throw this thing out the window lol

    facepalm

    1
  2. Accepted solution

    From experience: if teh platform publishes stable IP addresses for apex domains (some do, specifically for this case), u can use plain A/AAAA records at the root. Just be aware you're relying on them never changing those IPs without notice. The ALIAS approach avoids that dependency because it follows teh hostname.

    27 8 helpful
  3. been there man short version: the DNS spec doesnt allow a CNAME to coexist with other records at the same name, and the apex always has SOA and NS records. so a true CNAME at the root is off the table regardless of ur MX records.

    many DNS providers offer a workaround called ALIAS, ANAME or "CNAME flattening": u enter a hostname, and the provider resolves it and serves the resulting A/AAAA records. check whether yours has it.

    21 3 helpful
  4. @ember_otter114 moved DNS to a provider that supports ALIAS records, kept MX and TXT as they were. both the apex and www now load and email still works.

    1 0 helpful

Reply to this topic

Sign in or create an account to reply.