title: Prevent browser from redirecting CNAME record to A record in URL address bar
body: <p>There seems to be either a DNS configuration issue or something else I'm not understanding, with respect to CNAMEs and redirection.</p>
  
  <p>I have a CNAME record:</p>
  
  <pre><code>CNAME     myserver.example.com     www.example2.com
  </code></pre>
  
  <p>www.example2.com points to an A record.</p>
  
  <p>I ran a Wireshark to get a better understanding of what's going on. </p>
  
  <p>The very first time I type the CNAME in the browser's URL address bar, the Wireshark shows it does a DNS lookup for the A record and the browser redirects to this A record (www.example2.com), as evidenced by what appears in the URL address bar. It's performing a redirect.</p>
  
  <p>The second time I type the CNAME in the URL address bar, I don't see a DNS lookup. It automatically resolves to www.example2.com and the URL address bar redirects from the CNAME I typed to www.example2.com. I checked with Fiddler and Fiddler doesn't even show the CNAME record. It's as if I typed www.example2.com in the URL address bar, from the perspective of Fiddler.</p>
  
  <p>As best as I can tell, the browser has its own DNS cache and resolves the CNAME record to the A record. No need to go out to the name server. So, that explains that. But what I don't understand is why is the browser performing a redirect from the CNAME record to the A record, as evidenced by the URL address bar changing from myserver.example.com to www.example2.com. Is there something I'm missing? Is there some DNS configuration step that has to be performed on the name server for example.com and/or the name server for example2.com? </p>
  
  <p>I want myserver.example.com to be a vanity URL. It shouldn't redirect.</p>
  
  <p>Any help on this matter would be most appreciated. Thank you.</p>