title: Firefox can't connect to a local site, but Chrome can
body: <p>I have a web server running locally that's mapped to project.name.localhost:3011 on a MacOSX box.  My /etc/hosts defines:</p>
  
  <p>127.0.0.1  project.name.localhost</p>
  
  <p>I need to browse to this server in Chrome and Firefox.  Chrome works great when I visit <a href="http://project.name.localhost:3011/" rel="noreferrer">http://project.name.localhost:3011/</a>.  Firefox gives an "Unable to connect" connect error.  I can see in my local server's console that no connection attempt was even sent to the server when I try from FF.</p>
  
  <p>This is on FF version 59.0.2 (64-bit).  FF has no problem with public internet sites like this one, and google.</p>
  
  <p>I've already tried all of the steps suggested here:
  <a href="https://support.mozilla.org/en-US/kb/firefox-cant-load-websites-other-browsers-can" rel="noreferrer">https://support.mozilla.org/en-US/kb/firefox-cant-load-websites-other-browsers-can</a>
  In summary, those steps are:</p>
  
  <ul>
  <li>Check proxy settings, verify proxy is turned off</li>
  <li>Set <code>network.dns.disableIPv6</code> to <em>true</em> in <code>about:config</code></li>
  <li>Set <code>network.dns.disablePrefetch</code> to <em>true</em> in <code>about:config</code></li>
  <li>Cleared <em>all</em> history, including cookies and cache</li>
  </ul>
  
  <p>Also tried disabling HSTS as described here:
  <a href="https://support.mozilla.org/en-US/questions/1204380" rel="noreferrer">https://support.mozilla.org/en-US/questions/1204380</a></p>
  
  <pre><code>ping project.name.localhost
  </code></pre>
  
  <p>works just fine also.  There is no local DNS issue.</p>
  
  <p><a href="http://127.0.0.1:3011/" rel="noreferrer">http://127.0.0.1:3011/</a> gives me the exact same error as using the hostname.  However, I need to access the server via a hostname.  It is not and should not be configured to respond on a direct IP.</p>
  
  <p>How can I get FF to hit my local web server via a hostname?</p>
  
  <p>EDIT:  Two co-workers experienced what they describe as the same problem when they setup their systems, but they both said "it just went away on its own" after a day or two.  My problem has persisted across weeks and reboots.</p>
  
  <hr>
  
  <p>Console output from request:</p>
  
  <pre><code>GET http://global.appen.localhost:3011/invoice_groups
  
  Request headers (398 B) 
  Accept  
  text/html,application/xhtml+xm…plication/xml;q=0.9,*/*;q=0.8
  Accept-Encoding 
  gzip, deflate
  Accept-Language 
  en-US,en;q=0.5
  Cache-Control   
  no-cache
  Connection  
  keep-alive
  Host    
  global.appen.localhost:3011
  Pragma  
  no-cache
  Upgrade-Insecure-Requests   
  1
  User-Agent  
  Mozilla/5.0 (Macintosh; Intel …) Gecko/20100101 Firefox/59.0
  </code></pre>
  
  <p>Network Timing:</p>
  
  <pre><code>Blocked:          → 1 ms
  DNS resolution:                  → 1 ms
  </code></pre>