Wednesday, August 8, 2012

Multiple heroku apps on different subdomains managed by Zerigo

Suppose you have 3 different heroku apps but you want them to have their own domains as well as subdomains.

a.herokuapps.com -> a.foo.com or a.com
b.herokuapps.com -> b.foo.com or b.com
c.herokuapps.com -> c.foo.com or c.com
If you wanna use the Zerigo DNS addone, the trick is to use addon in ONLY ONE of the heroku apps. In this instance, I'll add the Zerigo addon into a.herokuapps.com. From the addon dropdown, you should be able to click on the configure button and that'll bring you to the Zerigo admin page. Suppose you've already point the foo.com, a.com, b.com and c.com nameservers to Zerigo nameservers, you should add the subdomains as CNAME entries.

a.foo.com CNAME as a.herokuapps.com
b.foo.com CNAME as b.herokuapps.com
c.foo.com CNAME as c.herokuapps.com
And add all the domains and subdomains as custom domains in each heroku app and should be good to go once the DNS gets propagated.

No comments: