The whole "mixing CNAME's, A and MX records" problem is solvable, but
not without a little something extra.  So I thought I'd share my setup
for graphomatic.net.

Two things to note:
1) A CNAME record should never be mixed with other records, even if
your DNS provider allows it, the behaviour of mail servers is
undetermined.  To quote djb: ``You keep using CNAME records. I do not
think they mean what you think they mean.''
2) However, you can have a CNAME record on a sub-domain, the root of
which has other records.

So, given that to route mail to @graphomatic.net the MX record needs
to be for the base domain, that's where that has to go.  Creating an
MX record for mail.graphomatic.net will not do what some people appear
to think it will.  It will mean that all e-mail would have to be
addressed to @mail.graphomatic.net, which is almost certainly not what
you want.


Since the CNAME cannot now be applied to graphomatic.net (as it has an
MX record), it is instead applied to www.graphomatic.net, pointing to
heroku.com.

So mail will go to wherever you MX record points, and www.graphomatic.net
works as expected.


Now, since the CNAME is against www.graphomatic.net, we can safely
give graphomatic.net an A record, which points to a server setup to
redirect any request for http://graphomatic.net to http://www.graphomatic.net.

If you have your own server (I have a cheap VPS so that's not a
problem), then you can setup your own redirector.  Make it a 301
permanent redirect to minimise the number of repeat hits.  You do not
need a powerful server to handle these redirects.

If you don't have your own server, then your domain registrar may
provide the ability to redirect.  I'm fairly certain that GoDaddy will
allow you to do this.

After all the above, mail to @graphomatic.net goes to the right place,
and both http://www.graphomatic.net and http://graphomatic.net do what
you would expect them to do.  And it's all done without having to
bodge your DNS with on-standard mixes of records, risking non-delivery
of mail.


Paul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to