Hi Martin, There are 2 things.
1. The browser needs to resolve the domain name to heroku's servers. You tell DNS to point a.app.com (http://a.app.com) or example.com (http://example.com) to the right app server [app.heroku.com (http://app.heroku.com)]. The CNAME record does this. You can tell DNS to point all *.app.com to point to heroku.com. 2. The app server at Heroku needs to route the request to the right Application. The heroku.add_domain example does this. Or if you have a simple app, the web configuration does this. If you use a wild card domain (heroku wild card), then it is easy to say *.app.com (http://app.com) all point to your code base. If you do not/can not wild card the domains, then you will need to add every entry to link to your app. So if you are adding another domain, e.g.: example.com (http://example.com), you'll probably need to add this via the command line. Did that help? —Keenan On Sunday, February 19, 2012 at 2:04 PM, Martin Streicher wrote: > I have a Rails 3.2 app on Heroku. > > It accepts wildcards and subdomains, so each user can have a vanity > subdomain, such as a.app.com (http://a.app.com), b.app.com > (http://b.app.com), etc. > > What I want to do is let a user point example.com (http://example.com) to > a.app.com (http://a.app.com). > > What would I have to change in the example.com (http://example.com) DNS > config to make this > work? And what do I change in my app? > > I am guessing example.com (http://example.com) is just a CNAME for a.app.com > (http://a.app.com). But how does > my app know what to do -- it needs to know that example.com > (http://example.com) is really > a.app.com (http://a.app.com). I suppose I could tell the app that -- the user > could > configure it. > > Just trying to figure out the proxy madness for this... since > a.app.com (http://a.app.com) is a proxy to app.heroku.com > (http://app.heroku.com). Does example.com (http://example.com) have to be a > proxy to app.heroku.com (http://app.heroku.com)? I am guessing that wont work. > > Any ideas would be awesome. > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to [email protected] > (mailto:[email protected]). > To unsubscribe from this group, send email to > [email protected] > (mailto:[email protected]). > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > > -- 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.
