For an application hosted on Heroku that is still on the Bamboo stack myapp.heroku.com
, how would you change over custom domains to point to the Cedar-compatible version myapp-cedar.herokuapp.com
on the Cedar stack?
Here are the conditions that need to be dealt with:
- The applications cannot be assigned the same Heroku application name even if they are using different stacks.
- Bamboo uses
.heroku.com
while Cedar uses.herokuapp.com
. - Bamboo uses
proxy.heroku.com
to handle routing, and the custom domain name is pointed here. Cedar wants you to point tomyapp-cedar.herokuapp.com
. - For Heroku to know the application a custom domain is for, the application needs to be assigned the custom domain name on the Heroku side of things. (For Cedar, this needs to be done in addition to pointing to
myapp-cedar.herokuapp.com
.) - A custom domain name can only be assigned to one application at a time whether on Bamboo or Cedar. So on the Heroku side of things, there will be only one application serving a domain name.
I have submitted a ticket to Heroku support the other day asking if they allow by request two applications on Bamboo and Cedar to be assigned the same domain name. I doubt that they do this though.
Considering DNS propagation time, what is the best way to switch over to the Cedar application with least user inconvenience?
Let me know if this needs to be moved over to Server Fault.
Update:
We will follow the workaround suggested by Heroku support to use the SSL endpoint. The SSL endpoint serves HTTP too, and it seems they match based on the web request host and the custom domain assignments alone.
So it seems that pointing the custom domains to the endpoint, reassigning the custom domains from the Bamboo application to the Cedar application after the DNS changes have propagated, and then pointing to the correct Cedar subdomain again after the switch will do the trick.
Update:
We ended up just doing a straightforward DNS update with some downtime. TTL was set quite low, so the DNS changes were expected to propagate quickly enough for most users.
I would go like this:
Hope that helps.