title: Opening my website via the domain name opens up a different website than when opening using IP. No VirtualHosts used
body: <h3>Raw details</h3>
  <pre><code>Site: blog.helloenglish.com
  IP:   107.22.249.42
  </code></pre>
  <h3>Noticing the problem</h3>
  <p>Started to notice that all google caches, search metadata, webarchive pages, facebook link previews for blog.helloenglish.com have turned japanese.</p>
  <p>I could not replicate the issue though. I have an Indian ISP (Airtel broadband) with Google DNS.</p>
  <p>Only if I open the website via a US VPN (Tunnelbear, in my case), or use a VPS (EC2 instance in N. Virginia) to curl, I'm able to see the japanese site.</p>
  <h3>The website</h3>
  <p>Examining the site, it's some weird blog with posts about softwares, screwdrivers (yeah, actual screwdrivers. not even sonic), anchors, pliers, etc. I still have not found what website is this, but in the source it loads resources from <a href="http://bnote.net" rel="nofollow noreferrer">bnote.net</a>, which has a similar layout, is in japanese, and has similar posts. But the site I see on <a href="http://blog.helloenglish.com" rel="nofollow noreferrer">blog.helloenglish.com</a> is different from bnote. Bnote behaves like an actual blog, focusing on softwares, each link referring to a post. But most of the links on blog.helloenglish.com are broken, with no <code>href</code> tags.</p>
  <p>Opening any page on the domain opens up a different post in the japanese site. Examples:</p>
  <ul>
  <li><a href="http://blog.helloenglish.com/robots.txt" rel="nofollow noreferrer">http://blog.helloenglish.com/robots.txt</a></li>
  <li><a href="http://blog.helloenglish.com/manifest.xml" rel="nofollow noreferrer">http://blog.helloenglish.com/manifest.xml</a></li>
  <li><a href="http://blog.helloenglish.com/helloworld" rel="nofollow noreferrer">http://blog.helloenglish.com/helloworld</a></li>
  <li><a href="http://blog.helloenglish.com/foobar" rel="nofollow noreferrer">http://blog.helloenglish.com/foobar</a></li>
  </ul>
  <p>Some screenshots <a href="https://imgur.com/a/Ce69m" rel="nofollow noreferrer">here</a>.</p>
  <h3>Some details about the infrastructure</h3>
  <p>Our setup is based on AWS completely.
  The website is deployed using an Elasticbeanstalk application, hosted on EC2 Instances. The EC2 instance has the elastic IP 107.22.249.42. Our DNS Server is Route53 by AWS.
  There's an A record there for <code>blog.helloenglish.com</code> with the value <code>107.22.249.42</code>.
  For the purpose of solving this problem, I've also set up an identical record for <code>blog2.helloenglish.com</code>. That domain has faced no issue.</p>
  <p>The server has no virtual hosts.</p>
  <h3>curl</h3>
  <p>I'm ssh'ing into the blog's webserver now. I'll post the results from my ISP too.</p>
  <pre><code>VPS $ nslookup helloenglish.com
  Server:     172.16.0.23
  Address:    172.16.0.23#53
  
  Non-authoritative answer:
  Name:   blog.helloenglish.com
  Address: 107.22.249.42
  
  
  MY_ISP $ nslookup blog.helloenglish.com
  Server:     8.8.8.8
  Address:    8.8.8.8#53
  
  Non-authoritative answer:
  Name:   blog.helloenglish.com
  Address: 107.22.249.42
  </code></pre>
  <p>The results for my PC and the VPS are the same.</p>
  <pre><code>Input:
  
  VPS $ curl -v 107.22.249.42 --header 'Host: blog.helloenglish.com'
  VPS $ curl -v blog.helloenglish.com
  
  Output for all those commands:
  
  * Rebuilt URL to: 107.22.249.42/
  *   Trying 107.22.249.42...
  * Connected to 107.22.249.42 (107.22.249.42) port 80 (#0)
  &gt; GET / HTTP/1.1
  &gt; User-Agent: curl/7.40.0
  &gt; Accept: */*
  &gt; Host: blog.helloenglish.com
  &gt;
  &lt; HTTP/1.1 200 OK
  &lt; Date: Thu, 19 Jan 2017 06:08:17 GMT
  &lt; Server: Apache
  &lt; Transfer-Encoding: chunked
  &lt; Content-Type: text/html; charset=utf-8
  &lt;
  &lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;ja&quot;&gt;
  &lt;head&gt;
  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
  &lt;title&gt;2013春の新作,ファッション-その他&lt;/title&gt;
  &lt;meta name=&quot;description&quot; content=&quot;その他-城東テクノ Joto 高気密型床下点検口 (高断熱型450×600mm) フローリング15mm対応 ナチュラル (1セット) SPF-R45F15-BL2-NL,2013春の新作-ファッション&quot; /&gt;
  &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
  &lt;meta name=&quot;keywords&quot; content=&quot;その他,2013春の新作,ファッション,人気blog&quot; /&gt;
  ... (the japanese source)
  
  ----
  
  Input:
  
  MY_ISP $ curl -v 107.22.249.42 --header 'Host: blog.helloenglish.com'
  MY_ISP $ curl -v blog.helloenglish.com
  MY_ISP $ curl -v blog2.helloenglish.com
  VPS $ curl -v blog2.helloenglish.com
  VPS $ curl -v 107.22.249.42
  VPS $ curl -v 107.22.249.42 --header 'Host: foobar'
  VPS $ curl -v 127.0.0.1
  VPS $ curl -v 127.0.0.1 --header 'Host: blog.helloenglish.com'
  
  Output for all those commands:
  
  * Rebuilt URL to: 107.22.249.42/
  *   Trying 107.22.249.42...
  * TCP_NODELAY set
  * Connected to 107.22.249.42 (107.22.249.42) port 80 (#0)
  &gt; GET / HTTP/1.1
  &gt; Host: blog.helloenglish.com
  &gt; User-Agent: curl/7.51.0
  &gt; Accept: */*
  &gt;
  &lt; HTTP/1.1 200 OK
  &lt; Date: Thu, 19 Jan 2017 06:08:02 GMT
  &lt; Server: Apache
  &lt; Link: &lt;http://blog.helloenglish.com/wp-json/&gt;; rel=&quot;https://api.w.org/&quot;
  &lt; Transfer-Encoding: chunked
  &lt; Content-Type: text/html; charset=UTF-8
  &lt;
  &lt;!DOCTYPE html&gt;
  &lt;!--[if IE 7]&gt;
  &lt;html class=&quot;ie ie7&quot; lang=&quot;en-US&quot; prefix=&quot;og: http://ogp.me/ns#&quot;&gt;
  &lt;![endif]--&gt;
  &lt;!--[if IE 8]&gt;
  &lt;html class=&quot;ie ie8&quot; lang=&quot;en-US&quot; prefix=&quot;og: http://ogp.me/ns#&quot;&gt;
  &lt;![endif]--&gt;
  &lt;!--[if !(IE 7) &amp; !(IE 8)]&gt;&lt;!--&gt;
  ... (correct source)
  </code></pre>
  <p>Sending any other host apart from blog.helloenglish.com serves the correct site. It does make it sound like a vhosts problem, but it doesn't explain why I wouldn't see that on my PC.</p>
  <p>It appears to me that it's a bug in how AWS forwards ElasticIPs. If it is, then it's a very serious and scary bug. Because the problem doesn't seem to be with route53, as curling the IP with host header reproduces the bug. curling the private IP of the instance doesn't reproduce it. I have no Idea what this has to do with the request coming from different zones though.</p>