Just a quick update,

I have now taken my VPS out of the equation (except for mail
handling), and am now using GoDaddy's redirection service to redirect
from http://graphomatic.net to http://www.graphomatic.net

So, in brief, my setup is:

graphomatic.net --> redirects to www.graphomatic.net using GoDaddy's
redirect service.

www.graphomatic.net has a CNAME record pointing to heroku.com.

graphomatic.net has an MX record pointing to my mail server.

So, web page requests for http://www.graphomatic.net and http://graphomatic.net
both end up at Heroku, and my mail is sent to the correct server.

Not sure if this will work if you need wildcard subdomains, I suspect
probably not.

Paul

On Jun 29, 2:09 pm, Paul Leader <paul.lea...@gmail.com> wrote:
> 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 towww.graphomatic.net, pointing to
> heroku.com.
>
> So mail will go to wherever you MX record points, andwww.graphomatic.net
> works as expected.
>
> Now, since the CNAME is againstwww.graphomatic.net, we can safely
> give graphomatic.net an A record, which points to a server setup to
> redirect any request forhttp://graphomatic.nettohttp://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 bothhttp://www.graphomatic.netandhttp://graphomatic.netdo 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 heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to