<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Baleeghuddin shaikh</title>
    <description>The latest articles on DEV Community by Baleeghuddin shaikh (@baleeghuddin_shaikh_ed093).</description>
    <link>https://dev.to/baleeghuddin_shaikh_ed093</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4191555%2Fcc454d78-7dd1-45ee-a253-03e18d4c6f77.png</url>
      <title>DEV Community: Baleeghuddin shaikh</title>
      <link>https://dev.to/baleeghuddin_shaikh_ed093</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/baleeghuddin_shaikh_ed093"/>
    <language>en</language>
    <item>
      <title>ERR_SSL_PROTOCOL_ERROR: What It Means and How to Fix It</title>
      <dc:creator>Baleeghuddin shaikh</dc:creator>
      <pubDate>Fri, 06 Nov 2026 13:42:37 +0000</pubDate>
      <link>https://dev.to/baleeghuddin_shaikh_ed093/errsslprotocolerror-what-it-means-and-how-to-fix-it-2gj</link>
      <guid>https://dev.to/baleeghuddin_shaikh_ed093/errsslprotocolerror-what-it-means-and-how-to-fix-it-2gj</guid>
      <description>&lt;p&gt;The most useful thing to know about this error is what it is &lt;strong&gt;not&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is not a certificate problem. Expired certificates, name mismatches and untrusted issuers all produce a different family of errors — the ones beginning &lt;code&gt;NET::ERR_CERT_&lt;/code&gt; — and every one of those means the connection got far enough for the browser to examine a certificate and reject it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ERR_SSL_PROTOCOL_ERROR&lt;/code&gt; means it never got that far. The two sides could not agree on how to speak TLS at all, so no certificate was ever evaluated.&lt;/p&gt;

&lt;p&gt;That single distinction eliminates most of what people try first. Reissuing the certificate will not help, because the certificate was never the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where you will see it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Chrome and Edge:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This site can't provide a secure connection
example.com sent an invalid response.
ERR_SSL_PROTOCOL_ERROR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Firefox&lt;/strong&gt; words the same failure differently:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Secure Connection Failed
SSL_ERROR_RX_RECORD_TOO_LONG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;curl:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl: (35) error:0A00010B:SSL routines::wrong version number
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those last two are worth memorising. &lt;code&gt;wrong version number&lt;/code&gt; and &lt;code&gt;SSL_ERROR_RX_RECORD_TOO_LONG&lt;/code&gt; almost always mean one specific thing, and it is the first cause below.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually causes it
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The server is not speaking TLS on that port
&lt;/h3&gt;

&lt;p&gt;The most common cause, and the easiest to miss.&lt;/p&gt;

&lt;p&gt;If a server is configured to serve plain HTTP on port 443, the browser opens a TLS handshake and receives an HTTP response instead. It has no idea what to do with that, so it reports a protocol error.&lt;/p&gt;

&lt;p&gt;That is exactly what &lt;code&gt;wrong version number&lt;/code&gt; is telling you: the bytes that came back were not TLS at all.&lt;/p&gt;

&lt;p&gt;Typical when a virtual host was set up on 443 without SSL enabled, when a reverse proxy forwards to a backend expecting HTTP, or when a site has just moved and the SSL configuration did not come with it.&lt;/p&gt;

&lt;h3&gt;
  
  
  TLS version mismatch
&lt;/h3&gt;

&lt;p&gt;Browsers removed support for TLS 1.0 and 1.1 in 2020. A server that still offers only those protocols can no longer negotiate with any current browser.&lt;/p&gt;

&lt;p&gt;The symptom is distinctive: the site works in an old browser, on an old phone, or from a tool that still permits legacy protocols, and fails everywhere modern. &lt;strong&gt;Nothing on the server changed — the browsers did.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The same happens in reverse on hardened servers configured for TLS 1.3 only, when something old tries to connect.&lt;/p&gt;

&lt;h3&gt;
  
  
  No shared cipher suite
&lt;/h3&gt;

&lt;p&gt;The two sides support overlapping TLS versions but no common cipher. Chrome has its own error for this — &lt;code&gt;ERR_SSL_VERSION_OR_CIPHER_MISMATCH&lt;/code&gt; — but a protocol error can surface for the same underlying reason depending on where negotiation breaks.&lt;/p&gt;

&lt;p&gt;Usually a server configured with a restrictive cipher list, often copied from a hardening guide written years earlier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Something is intercepting the connection
&lt;/h3&gt;

&lt;p&gt;Antivirus products with HTTPS scanning, corporate proxies and some VPN clients insert themselves into TLS connections by design. When that interception is misconfigured or outdated, the result is a protocol error.&lt;/p&gt;

&lt;p&gt;The giveaway: the site fails on one machine and works on every other device on the same network.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to diagnose it
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Try another device on the same network
&lt;/h3&gt;

&lt;p&gt;Works elsewhere → the problem is on that one machine. Antivirus, a browser extension, or the browser's own TLS state.&lt;/p&gt;

&lt;p&gt;Fails everywhere → the problem is the server.&lt;/p&gt;

&lt;p&gt;Thirty seconds, and it splits the problem in half. Do it first.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Ask the server directly what it supports
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl s_client &lt;span class="nt"&gt;-connect&lt;/span&gt; example.com:443 &lt;span class="nt"&gt;-servername&lt;/span&gt; example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read the reply:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;wrong version number&lt;/code&gt;&lt;/strong&gt; → the server is not serving TLS on 443&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A handshake that completes&lt;/strong&gt;, showing a protocol and cipher → the server is fine and your client is the problem&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;no protocols available&lt;/code&gt;&lt;/strong&gt; or an immediate close → version or cipher mismatch&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Pin down which TLS versions work
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl s_client &lt;span class="nt"&gt;-tls1_2&lt;/span&gt; &lt;span class="nt"&gt;-connect&lt;/span&gt; example.com:443 &lt;span class="nt"&gt;-servername&lt;/span&gt; example.com
openssl s_client &lt;span class="nt"&gt;-tls1_3&lt;/span&gt; &lt;span class="nt"&gt;-connect&lt;/span&gt; example.com:443 &lt;span class="nt"&gt;-servername&lt;/span&gt; example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If 1.2 fails and 1.3 succeeds — or the reverse — you have found the mismatch, and the fix is in the server's protocol configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Confirm the port is actually open
&lt;/h3&gt;

&lt;p&gt;If nothing answers at all, you do not have a TLS problem — you have a connectivity problem wearing a TLS error.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to fix it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;If it is only your machine:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Disable HTTPS scanning in your antivirus temporarily and retest&lt;/li&gt;
&lt;li&gt;Try an incognito window to rule out extensions&lt;/li&gt;
&lt;li&gt;Clear the browser's SSL state — &lt;code&gt;chrome://net-internals/#hsts&lt;/code&gt; can hold stale entries for a specific domain&lt;/li&gt;
&lt;li&gt;Test in a different browser. Chrome failing where Firefox works points at Chrome's own state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;If it is the server:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Confirm SSL is actually enabled on the listening block for 443 — this resolves the &lt;code&gt;wrong version number&lt;/code&gt; case outright&lt;/li&gt;
&lt;li&gt;Enable TLS 1.2 alongside 1.3. Serving only 1.3 excludes a meaningful share of clients; serving only 1.0 or 1.1 excludes every current browser&lt;/li&gt;
&lt;li&gt;Review the cipher list, especially if it was copied from an old hardening guide&lt;/li&gt;
&lt;li&gt;Verify the certificate and private key are a matching pair, and that the configuration was actually reloaded&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it differs from the other SSL errors
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;ERR_SSL_PROTOCOL_ERROR&lt;/code&gt;&lt;/strong&gt; — the handshake failed. No certificate was examined.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;NET::ERR_CERT_DATE_INVALID&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;ERR_CERT_AUTHORITY_INVALID&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;ERR_CERT_COMMON_NAME_INVALID&lt;/code&gt;&lt;/strong&gt; — the handshake succeeded and a certificate was presented, then rejected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;ERR_SSL_VERSION_OR_CIPHER_MISMATCH&lt;/code&gt;&lt;/strong&gt; — same family as a protocol error, but Chrome has identified the specific reason. Treat it as a protocol error with a head start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;ERR_CONNECTION_RESET&lt;/code&gt; on port 443&lt;/strong&gt; — not TLS at all. Something closed the TCP connection before TLS began, usually a firewall.&lt;/p&gt;

&lt;p&gt;The practical rule: a &lt;code&gt;CERT&lt;/code&gt; error is about the certificate. Everything else is about whether a TLS conversation could happen in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  One thing worth knowing
&lt;/h2&gt;

&lt;p&gt;An expired certificate does &lt;strong&gt;not&lt;/strong&gt; cause this. That produces &lt;code&gt;NET::ERR_CERT_DATE_INVALID&lt;/code&gt;, and the browser offers a bypass option.&lt;/p&gt;

&lt;p&gt;A protocol error has no bypass — there is nothing to bypass, because no secure channel was ever established.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;Test another device first: if the site works there, the fault is on your machine, usually antivirus HTTPS scanning. If it fails everywhere, run &lt;code&gt;openssl s_client&lt;/code&gt; — &lt;code&gt;wrong version number&lt;/code&gt; means the server is serving plain HTTP on 443, and a handshake that completes means the server is fine and your client is not.&lt;/p&gt;

&lt;p&gt;If you want to check what a server is actually presenting from outside your own network — chain, covered names, expiry — I keep a free checker at &lt;a href="https://webtoolsrealm.com/tool/ssl-checker" rel="noopener noreferrer"&gt;webtoolsrealm.com/tool/ssl-checker&lt;/a&gt;. Full disclosure, that's my own site.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://webtoolsrealm.com/blog/err-ssl-protocol-error" rel="noopener noreferrer"&gt;webtoolsrealm.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>security</category>
      <category>ssl</category>
    </item>
    <item>
      <title>SERVFAIL: What It Means and How to Diagnose It</title>
      <dc:creator>Baleeghuddin shaikh</dc:creator>
      <pubDate>Tue, 03 Nov 2026 17:59:42 +0000</pubDate>
      <link>https://dev.to/baleeghuddin_shaikh_ed093/servfail-what-it-means-and-how-to-diagnose-it-5fo3</link>
      <guid>https://dev.to/baleeghuddin_shaikh_ed093/servfail-what-it-means-and-how-to-diagnose-it-5fo3</guid>
      <description>&lt;p&gt;SERVFAIL is a DNS response code, and it is the least specific one you can get:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The resolver tried to answer your query and could not produce a valid result.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is deliberately vague, because SERVFAIL covers everything from a broken cryptographic signature to a name server that is simply switched off. The domain probably exists. Something between you and the authoritative answer went wrong.&lt;/p&gt;

&lt;p&gt;This makes it harder to diagnose than NXDOMAIN — but there is one command that splits the possibilities in half immediately, and most explanations never mention it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where you will see it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dig example.com
;; -&amp;gt;&amp;gt;HEADER&amp;lt;&amp;lt;- opcode: QUERY, status: SERVFAIL, id: 18442
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nslookup example.com
** server can't find example.com: SERVFAIL

host example.com
Host example.com not found: 2(SERVFAIL)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That &lt;code&gt;2&lt;/code&gt; is the numeric code. NXDOMAIN is 3, SERVFAIL is 2, NOERROR is 0.&lt;/p&gt;

&lt;p&gt;In browsers it usually surfaces as &lt;code&gt;DNS_PROBE_FINISHED_NXDOMAIN&lt;/code&gt; or &lt;code&gt;ERR_NAME_NOT_RESOLVED&lt;/code&gt; — browsers collapse DNS failures into one message, which is exactly why people end up diagnosing the wrong problem. The browser text does not tell you which response code came back. Only a direct query does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one command that narrows it immediately
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +cd example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;+cd&lt;/code&gt; means &lt;strong&gt;checking disabled&lt;/strong&gt; — it tells the resolver to skip DNSSEC validation and hand you whatever it gets.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Works with &lt;code&gt;+cd&lt;/code&gt;, fails without it&lt;/strong&gt; → DNSSEC validation failure. The data is there; the signatures do not check out&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fails both ways&lt;/strong&gt; → the resolver genuinely cannot reach or get a usable answer from the authoritative name servers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That one comparison eliminates roughly half the possible causes. Do it before anything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually causes it
&lt;/h2&gt;

&lt;h3&gt;
  
  
  DNSSEC validation failure
&lt;/h3&gt;

&lt;p&gt;The most common cause on domains that were working yesterday.&lt;/p&gt;

&lt;p&gt;DNSSEC signs DNS records cryptographically. If the chain breaks — an expired signature, a DS record at the registry that no longer matches the zone's key, a key rotation done incorrectly, or DNSSEC left enabled after moving to a provider that does not sign — validating resolvers refuse to serve the answer at all.&lt;/p&gt;

&lt;p&gt;Refusing is correct behaviour: the alternative is serving data that may have been tampered with.&lt;/p&gt;

&lt;p&gt;Those signatures carry expiry dates, so a zone that stops being re-signed breaks at a predictable moment without anyone touching anything. &lt;strong&gt;A domain that "broke overnight with no changes" is very often this.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Non-validating resolvers still answer normally, which is why the domain works for some people and not others.&lt;/p&gt;

&lt;h3&gt;
  
  
  The authoritative name servers are unreachable
&lt;/h3&gt;

&lt;p&gt;Nothing exotic — servers down, host offline, or a firewall blocking port 53. The resolver asked, nothing usable came back.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lame delegation
&lt;/h3&gt;

&lt;p&gt;The parent zone points at name servers that do not host the zone. They are reachable and they respond — they just have no authoritative data for this domain.&lt;/p&gt;

&lt;p&gt;Happens after a migration where name servers were changed at one end but not the other, or where a hosting account was closed while the registrar still points at it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inconsistent name servers
&lt;/h3&gt;

&lt;p&gt;A domain lists four name servers; two have the zone, two do not, or they hold different versions. Resolvers pick whichever they like, so the domain resolves intermittently — with no pattern anyone can reproduce.&lt;/p&gt;

&lt;p&gt;Query each one individually and compare. If they disagree, you have found it.&lt;/p&gt;

&lt;h3&gt;
  
  
  EDNS and packet size
&lt;/h3&gt;

&lt;p&gt;DNSSEC-signed responses regularly exceed the 512-byte limit of classic DNS. Some firewalls and older middleboxes drop oversized UDP responses or block fragments outright.&lt;/p&gt;

&lt;p&gt;Symptom: small queries work, large ones fail.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +bufsize&lt;span class="o"&gt;=&lt;/span&gt;512 example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Succeeds where the default fails → packet size, not DNS data.&lt;/p&gt;

&lt;h2&gt;
  
  
  SERVFAIL vs NXDOMAIN
&lt;/h2&gt;

&lt;p&gt;They point in opposite directions, and treating one as the other wastes hours.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SERVFAIL&lt;/strong&gt; — no usable answer arrived. The domain probably exists. The problem is DNSSEC, the name servers, or the path to them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NXDOMAIN&lt;/strong&gt; — an authoritative server answered, and the answer was that the name does not exist. The problem is the name itself.&lt;/p&gt;

&lt;p&gt;The rule: NXDOMAIN is an answer you should believe. SERVFAIL means try again, against a different resolver, and look at the infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to diagnose it, in order
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. &lt;code&gt;dig +cd&lt;/code&gt;.&lt;/strong&gt; DNSSEC or not. Halves the problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Try different resolvers.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig example.com @1.1.1.1
dig example.com @8.8.8.8
dig example.com @9.9.9.9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some answer and others do not → almost certainly DNSSEC. Cloudflare, Google and Quad9 all validate, but they cache independently, and a resolver holding a pre-breakage answer keeps serving it until that entry expires.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Query each delegated name server.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig NS example.com
dig example.com @ns1.provider.com
dig example.com @ns2.provider.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All should agree. Any that times out, refuses, or disagrees is the fault.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Trace from the root.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +trace example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Walks root → TLD → authoritative, showing exactly which step fails. Fastest way to spot a lame delegation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Check what the registry actually has.&lt;/strong&gt; If the registry's name servers do not match the ones you expect, the delegation was never updated. A &lt;a href="https://webtoolsrealm.com/tool/dns-lookup" rel="noopener noreferrer"&gt;DNS lookup&lt;/a&gt; from outside your own network shows the delegation as the rest of the internet sees it — full disclosure, that's a free tool I built, and the reason it helps here is that it removes your own resolver's cache from the picture.&lt;/p&gt;

&lt;h2&gt;
  
  
  If it is DNSSEC
&lt;/h2&gt;

&lt;p&gt;Two options, depending on whether you control the zone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix the chain.&lt;/strong&gt; Re-sign the zone, or correct the DS record at the registrar so it matches the key the zone actually publishes. This is the proper fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remove DNSSEC.&lt;/strong&gt; Delete the DS record at the registrar, wait for it to expire from caches, and the domain resolves again unsigned. This is the usual emergency measure, and it removes the protection entirely.&lt;/p&gt;

&lt;p&gt;What you cannot do is tell other people's resolvers to ignore the problem. Validation failing is them doing their job.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;SERVFAIL means no usable answer arrived, not that the name is missing — the opposite of NXDOMAIN, which is why people troubleshoot the wrong thing.&lt;/p&gt;

&lt;p&gt;Start with &lt;code&gt;dig +cd&lt;/code&gt;: if that works and a normal query does not, it is DNSSEC, and the fix is the DS record rather than anything in the zone. If both fail, query each delegated name server individually — one that times out, refuses, or disagrees with the others is your answer.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://webtoolsrealm.com/blog/servfail-explained" rel="noopener noreferrer"&gt;webtoolsrealm.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dns</category>
      <category>devops</category>
      <category>sysadmin</category>
      <category>networking</category>
    </item>
    <item>
      <title>Connection Refused vs Connection Timed Out: What Each Error Actually Means</title>
      <dc:creator>Baleeghuddin shaikh</dc:creator>
      <pubDate>Sun, 18 Oct 2026 06:16:10 +0000</pubDate>
      <link>https://dev.to/baleeghuddin_shaikh_ed093/connection-refused-vs-connection-timed-out-what-each-error-actually-means-1fef</link>
      <guid>https://dev.to/baleeghuddin_shaikh_ed093/connection-refused-vs-connection-timed-out-what-each-error-actually-means-1fef</guid>
      <description>&lt;p&gt;Two of the most common networking errors look identical from the outside — in both cases you can't reach the server. But they're opposites, and knowing which one you're looking at narrows the cause from dozens of possibilities to two or three.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connection refused&lt;/strong&gt; means something answered you and said no.&lt;br&gt;
&lt;strong&gt;Connection timed out&lt;/strong&gt; means nothing answered at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's actually happening
&lt;/h2&gt;

&lt;p&gt;Every TCP connection starts with a three-step handshake. You send &lt;code&gt;SYN&lt;/code&gt;. The server replies &lt;code&gt;SYN-ACK&lt;/code&gt;. You send &lt;code&gt;ACK&lt;/code&gt;. Connection established.&lt;/p&gt;

&lt;p&gt;What you see when that fails depends on where it broke:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server sends back an &lt;code&gt;RST&lt;/code&gt; packet → &lt;strong&gt;connection refused&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Nothing comes back at all, and your machine eventually gives up → &lt;strong&gt;connection timed out&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An &lt;code&gt;RST&lt;/code&gt; is an active reply. Your packet reached a real machine, that machine processed it, and it deliberately rejected you. A timeout means your packet vanished somewhere and no reply ever arrived.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connection refused
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ERR_CONNECTION_REFUSED
curl: (7) Failed to connect to example.com port 443: Connection refused
ssh: connect to host 203.0.113.5 port 22: Connection refused
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What causes it
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Nothing is listening on that port.&lt;/strong&gt; By far the most common cause. The host is up and reachable, but nothing is bound to the port you asked for. The service crashed, never started, or you're hitting the wrong port.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The service is bound to the wrong interface.&lt;/strong&gt; A service listening on &lt;code&gt;127.0.0.1&lt;/code&gt; accepts connections only from the machine itself. From anywhere else they get refused. To accept outside traffic it needs &lt;code&gt;0.0.0.0&lt;/code&gt; or the server's actual IP.&lt;/p&gt;

&lt;p&gt;This one catches everyone during development. Works perfectly on localhost, fails the moment someone else tries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A firewall set to REJECT rather than DROP.&lt;/strong&gt; Firewalls dispose of unwanted packets two ways. &lt;code&gt;REJECT&lt;/code&gt; sends back an &lt;code&gt;RST&lt;/code&gt; → refused. &lt;code&gt;DROP&lt;/code&gt; silently discards → timeout. Most server firewalls use &lt;code&gt;DROP&lt;/code&gt;; many consumer routers and corporate appliances use &lt;code&gt;REJECT&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to check
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss &lt;span class="nt"&gt;-tlnp&lt;/span&gt;        &lt;span class="c"&gt;# what's listening, and which process owns it&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your port isn't in that list, nothing is running. If it shows &lt;code&gt;127.0.0.1:3306&lt;/code&gt; rather than &lt;code&gt;0.0.0.0:3306&lt;/code&gt;, you've found the bind-address problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connection timed out
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ERR_CONNECTION_TIMED_OUT
curl: (28) Failed to connect to example.com port 443 after 130000 ms
ssh: connect to host 203.0.113.5 port 22: Operation timed out
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What causes it
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A firewall silently dropping your packets.&lt;/strong&gt; The most common cause by a wide margin. Security groups on AWS, firewall rules on GCP, NSGs on Azure. Your packet arrives, the rule matches, the packet is discarded, nothing is sent back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Missing or misconfigured port forwarding.&lt;/strong&gt; When the service sits behind NAT, traffic hitting the public IP has to be forwarded inward. Without that rule, packets reach the router and stop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The host isn't reachable at all.&lt;/strong&gt; Powered off, or the IP no longer points at it. A dynamic IP that changed overnight is a common culprit — and if that IP was in a whitelist somewhere, the whitelist now points at a stranger.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your ISP blocks the port.&lt;/strong&gt; Residential providers routinely block outbound 25 (SMTP), and sometimes 80, 443 and 445. The block is silent, so it shows up as a timeout rather than a refusal.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shortcut
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fails fast&lt;/strong&gt; → refused → the host is alive, the &lt;strong&gt;service&lt;/strong&gt; is the problem&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fails slow&lt;/strong&gt; (20–130 seconds) → dropped → a &lt;strong&gt;firewall, NAT rule or route&lt;/strong&gt; is the problem&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you remember nothing else from this post, remember that. The speed of the failure tells you which half of the stack to stop looking at, before you even read the error text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common ports, common causes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Port 22 (SSH)&lt;/strong&gt;&lt;br&gt;
Refused usually means sshd isn't running, or it's listening on a non-standard port. Timed out usually means a security group never allowed your IP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Port 25 (SMTP)&lt;/strong&gt;&lt;br&gt;
Refused means no MTA is listening. Timed out from a home connection is almost always your ISP blocking outbound mail — use port 587 with authentication instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ports 80 and 443 (HTTP / HTTPS)&lt;/strong&gt;&lt;br&gt;
Refused means the web server is down. Timed out means a firewall never let you near it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ports 3306 (MySQL) and 5432 (PostgreSQL)&lt;/strong&gt;&lt;br&gt;
Refused is nearly always the bind address, since both ship listening on localhost only. Timed out means a firewall, or the database was never exposed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Port 3389 (RDP)&lt;/strong&gt;&lt;br&gt;
Refused means the service is disabled. Timed out is usually the Windows Firewall profile, which blocks by default on public networks.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical order of checks
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Note whether the failure was fast or slow — this alone splits the problem in half&lt;/li&gt;
&lt;li&gt;Confirm DNS resolves to the IP you expect. If it doesn't, you're timing out against the wrong machine entirely&lt;/li&gt;
&lt;li&gt;Ping the host, keeping in mind many servers block ICMP, so silence here isn't conclusive&lt;/li&gt;
&lt;li&gt;Test the specific port &lt;strong&gt;from outside your own network&lt;/strong&gt; — testing from the server bypasses every firewall between you and it&lt;/li&gt;
&lt;li&gt;If the port opens but the site still fails, the network layer is fine. Move up to the application&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For step 4 I use an &lt;a href="https://webtoolsrealm.com/tool/open-port-checker" rel="noopener noreferrer"&gt;online port checker&lt;/a&gt; — full disclosure, that's a free tool I built — since the whole point is testing the path a real visitor takes, not the path from your own machine. A &lt;a href="https://webtoolsrealm.com/tool/ping" rel="noopener noreferrer"&gt;ping test&lt;/a&gt; covers step 3 the same way.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why does refused happen instantly but timeout take 30 seconds?&lt;/strong&gt;&lt;br&gt;
A refusal is an active reply, so the &lt;code&gt;RST&lt;/code&gt; comes back at network speed. A timeout is the &lt;em&gt;absence&lt;/em&gt; of a reply, so your system waits out a timer — typically 20 to 130 seconds depending on the OS and client.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does connection refused mean the server is down?&lt;/strong&gt;&lt;br&gt;
Usually the opposite. Something on that machine was awake enough to reject you. The host is up; the specific service isn't listening on that specific port.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does it work locally but not from outside?&lt;/strong&gt;&lt;br&gt;
Almost always bind address or firewall. Test externally, not from the server.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://webtoolsrealm.com/blog/connection-refused-vs-connection-timed-out" rel="noopener noreferrer"&gt;webtoolsrealm.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>backend</category>
      <category>devops</category>
      <category>networking</category>
    </item>
  </channel>
</rss>
