<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Azure on Russell ‛Russ’ Frith</title><link>https://russfrith.com/tags/azure/</link><description>Recent content in Azure on Russell ‛Russ’ Frith</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 01 Dec 2025 12:02:31 -0400</lastBuildDate><atom:link href="https://russfrith.com/tags/azure/index.xml" rel="self" type="application/rss+xml"/><item><title>Diagnosing Intermittent 404s on Azure Static Web Apps</title><link>https://russfrith.com/posts/intermittent-404s-azure-static-web-apps-redeploy/</link><pubDate>Mon, 01 Dec 2025 12:02:31 -0400</pubDate><guid>https://russfrith.com/posts/intermittent-404s-azure-static-web-apps-redeploy/</guid><description>A field story on diagnosing intermittent 404s on custom domains and why DNS propagation is usually the culprit.</description><content:encoded><![CDATA[<p>There&rsquo;s a particular kind of issue that&rsquo;s more frustrating than something being completely broken:</p>
<blockquote>
<p>When everything <em>mostly</em> works.</p>
</blockquote>
<p>I ran into this recently with an Azure Static Web App. The deployment was successful. The default Azure URL worked perfectly. DNS looked correct.</p>
<p>And yet, the custom domain would intermittently return a 404.</p>
<p>Not always. Just enough to make you question everything.</p>
<hr>
<h2 id="if-youre-seeing-intermittent-404s-start-here">If You&rsquo;re Seeing Intermittent 404s, Start Here</h2>
<p>Before going deep, check these in order:</p>
<ol>
<li>
<p><strong>Confirm DNS is pointing to the correct Static Web App</strong></p>
<ul>
<li>Make sure you&rsquo;re not still pointing to an old environment</li>
<li>Double-check ALIAS / ANAME / CNAME targets</li>
<li>Remove any references to previous environments so there&rsquo;s no overlap or ambiguity</li>
</ul>
</li>
<li>
<p><strong>Verify the domain in Azure (TXT record)</strong></p>
<ul>
<li>This confirms ownership, not routing</li>
</ul>
</li>
<li>
<p><strong>Assume you&rsquo;re mid-propagation</strong></p>
<ul>
<li>If it works sometimes but not always, this is the most likely explanation</li>
<li>Wait longer than feels reasonable. Even correct configurations take time to converge globally</li>
</ul>
</li>
<li>
<p><strong>Test from multiple networks</strong></p>
<ul>
<li>Your machine may be cached. Try another device, another network, or a mobile connection</li>
<li>If it works everywhere, you&rsquo;re done</li>
</ul>
</li>
<li>
<p><strong>Avoid making multiple DNS changes at once</strong></p>
<ul>
<li>Change, wait, validate, then repeat</li>
<li>Stacking edits (delete a record, add a new one, re-verify, adjust again) makes it harder to tell what actually fixed things</li>
</ul>
</li>
</ol>
<p>If those don&rsquo;t resolve it, then it&rsquo;s worth digging into what&rsquo;s happening underneath.</p>
<hr>
<h2 id="the-symptoms">The Symptoms</h2>
<p>Here&rsquo;s what this looked like in practice:</p>
<ul>
<li>The Static Web App deployed successfully</li>
<li>The default Azure URL worked consistently</li>
<li>The custom domain worked in one browser but not another, and on one device but not another</li>
<li>The custom domain intermittently returned 404s</li>
<li>DNS queries (<code>nslookup</code>) appeared correct</li>
<li>Azure showed the domain as verified</li>
</ul>
<p>At a glance, everything looked fine. But clearly it wasn&rsquo;t fully resolved yet.</p>
<hr>
<h2 id="what-was-actually-happening">What Was Actually Happening</h2>
<p>This wasn&rsquo;t a single issue. It was a handful of small, reasonable steps that hadn&rsquo;t lined up yet.</p>
<p><strong>DNS wasn&rsquo;t fully aligned.</strong> Even after updating records, different resolvers were returning different answers. Some requests were hitting the correct endpoint; others weren&rsquo;t. That&rsquo;s classic propagation behavior.</p>
<p><strong>Azure verification gave a false sense of completion.</strong> The TXT record check succeeded, which made it seem like everything was ready. But verification only proves ownership, it doesn&rsquo;t guarantee traffic is routing correctly.</p>
<p><strong>Caching made it feel random.</strong> Local DNS caching and browser caching added noise: one browser worked, another didn&rsquo;t; one device worked, another didn&rsquo;t. It wasn&rsquo;t random, it was just inconsistent state settling out over time.</p>
<hr>
<h2 id="lessons-worth-keeping">Lessons Worth Keeping</h2>
<p><strong>Intermittent success is a signal.</strong> If something works sometimes and fails other times, think propagation or caching before you think misconfiguration.</p>
<p><strong>Verification isn&rsquo;t the same as reachability.</strong> Passing Azure&rsquo;s domain check confirms ownership. It says nothing about whether traffic is actually routing correctly yet.</p>
<hr>
<h2 id="final-thought">Final Thought</h2>
<p>You don&rsquo;t need to fully understand how you got into this state to fix it.</p>
<p>In most cases, it comes down to one of two things:</p>
<ul>
<li>DNS is pointing to the wrong place</li>
<li>DNS hasn&rsquo;t finished catching up yet</li>
</ul>
<p>And when your site works, except when it doesn&rsquo;t, you&rsquo;re probably closer to the answer than you think.</p>
]]></content:encoded></item></channel></rss>