2

I've managed to surprise myself with some DNS configuration. This is the actual output of my terminal:

[]$ host www.sepa-converter.nl
www.sepa-converter.nl is an alias for sepa-converter.herokuapp.com.
sepa-converter.herokuapp.com has address 184.73.167.111

[]$ host sepa-converter.herokuapp.com
sepa-converter.herokuapp.com has address 184.72.248.52

The result is that if you browse to www.sepa-converter.nl, you do not get the content served by sepa-converter.herokuapp.com.

I've used sepa-converter.nl as an alias for overopsepa.nl. And I want the mails to keep showing up at my Google Apps account. For that reason I've kept the A and MX records, but just changed the CNAMES to point to another server.

Why doesn't this resolve www.sepa-converter.nl to the right heroku app?

UPDATE: I understand that heroku doesn't return the same IP each time and I understand that that's not a problem. The problem is that the http requests serve content that is coming from a different dyno than the one aliased. If you check www.sepa-converter.nl against sepa-converter.herokuapp.com you'll see a different index.html being served.

iwein
  • 191
  • 1
  • 6
  • 2
    have not worked with Heroku a lot, but my guess is they are doing DNS load balancing. Getting two different IP addresses does not mean you are not running your code. – n8whnp Jan 03 '13 at 13:05
  • And what does Heroku have to say about this? – Michael Hampton Jan 04 '13 at 07:23
  • I've clarified the question a bit, all the answers and comments are pointing in the same (wrong) direction, so there must be something wrong with my explanation... – iwein Jan 04 '13 at 07:24
  • Have you tried accessing the URLs from outside your company / with a different laptop? Because if I perform a WGET on both addresses I get the same content. – John K. N. Jan 04 '13 at 08:49

3 Answers3

3

This hostname have more that one IP and it is not an issue. I got different IPs on each dig query made to this hostname:

sgeorge-mn:~ sgeorge$ dig sepa-converter.herokuapp.com +short
50.19.86.241
sgeorge-mn:~ sgeorge$ dig sepa-converter.herokuapp.com +short
107.20.162.205
sgeorge-mn:~ sgeorge$ dig sepa-converter.herokuapp.com +short
54.243.85.64
Suku
  • 2,006
  • 13
  • 15
  • yeah, I know, but the ips don't change that often for the host. I ran the commands multiple times and got the same ip for the same command for a couple of seconds at least. See the update to the question. – iwein Jan 04 '13 at 07:26
  • @iwein that could be the work of the OS's DNS cache – orip May 28 '13 at 08:10
1

Your DNS is properly configured, however the webserver you are referencing to is not configured to host the domain "www.sepa-converter.nl".

To make the webserver host "www.sepa-converter.nl" a "ServerAlias" must be configured in the apache configuration.

Reference ServerAlias in the apache documentation.

Bruno Gysels
  • 61
  • 1
  • 2
0

Nothing is wrong with your DNS setup. You need to tell Heroku about the hostname you want to use.

heroku domains:add www.sepa-converter.nl
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940