Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
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 3 '13 at 13:05
    
And what does Heroku have to say about this? –  Michael Hampton Jan 4 '13 at 7: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 4 '13 at 7: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. –  hot2use Jan 4 '13 at 8:49

3 Answers 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
share|improve this answer
    
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 4 '13 at 7:26
    
@iwein that could be the work of the OS's DNS cache –  orip May 28 '13 at 8:10

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.

share|improve this answer

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
share|improve this answer
    
I did that already, but the http request gets served by the wrong host. –  iwein Jan 4 '13 at 7:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.