<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<p>For a few weeks I was trying to get a custom domain working with
Substack, which does allow it, usually they specify to use the
"www." domain level for the CNAME to point at <b>target.substack-custom-domains.com</b></p>
<p>But some people want to to this at the domain apex, and the
Substack docs state that <i>some </i>providers support zone apex
aliasing.</p>
<p>Which is true.</p>
<p>But most providers do it via CNAME flattening, so at the end of
the process, they aren't really CNAMEs, they're A recs.</p>
<p>But this will not work for Substack custom domains - and after
going back and forth with their support, who took it up with some
ops, it turns out that custom domains <i>at the apex</i> on
Substack will <i>only work</i> when the query returns, literally,
a CNAME when queried.</p>
<p>The example they gave me to replicate was: <b>theamazingnewsletterofjosh.com</b></p>
<p>which if you do<br>
</p>
<p>$ dig theamazingnewsletterofjosh.com @dns1.registrar-servers.com<br>
</p>
<p>gives you<br>
</p>
<p>;; ANSWER SECTION:</p>
<p>theamazingnewsletterofjosh.com. 60 IN CNAME
target.substack-custom-domains.com.</p>
<pre>
</pre>
<div class="moz-signature">Even though if you also do this:</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">$ dig -t ns
theamazingnewsletterofjosh.com @dns1.registrar-servers.com<br>
</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">you'll get</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">;; ANSWER SECTION:<br>
theamazingnewsletterofjosh.com. 1800 IN NS
dns1.registrar-servers.com.<br>
theamazingnewsletterofjosh.com. 1800 IN NS
dns2.registrar-servers.com.</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">Which would seem to be non-compliant
(CNAME and other data)</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">but if you do this</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">$ dig -t soa
theamazingnewsletterofjosh.com @dns1.registrar-servers.com</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">you get</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">;; ANSWER SECTION:<br>
theamazingnewsletterofjosh.com. 60 IN CNAME
target.substack-custom-domains.com.</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">Which is also weird <br>
</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">So apparently, Namecheap (which I believe
uses UltraDNS on the backend) and apparently Cloudflare handle
this apex aliasing, with a literal alias, but if you simply
flatten the apex alias, for some reason, it will not work as a
Substack custom domain.</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">I thought maybe the powerdns ALIAS pseudo
type might facilitate this,</div>
<div class="moz-signature"> <br>
</div>
<div class="moz-signature"><a class="moz-txt-link-freetext" href="https://doc.powerdns.com/authoritative/guides/alias.html">https://doc.powerdns.com/authoritative/guides/alias.html</a><br>
</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">but after setting up a test case, it
looks like it too, implements this by flattening it out to A
records.</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">Am I to assume this is some customized
DNS response then?</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">Is it even standards compliant to be
handing out a CNAME response for the same zone that has NS
records? (I would say no, but it seems to be a thing?)</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">- mark<br>
</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">-- <br>
Mark E. Jeftovic <a class="moz-txt-link-rfc2396E" href="mailto:markjr@easydns.com"><markjr@easydns.com></a><br>
Co-founder & CEO easyDNS Technologies Inc.<br>
+1-(416)-535-8672 ext 225<br>
<br>
<small><i>"Never expect a thing you do not want,<br>
and never desire a thing you do not expect."<br>
-- Bob Proctor </i></small></div>
</body>
</html>