Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku Staging App Subdomain DNS Configuration

Tags:

heroku

web

dns

I want to have 2 heroku apps use the same domain.

I recently set up a staging version of my Heroku application on a new app in Heroku. Everything is running fine, but I want the url of my staging app to be similar to my production application. For example my production site's URL is http://www.mysite.com and I want a staging url to be http://staging.mysite.com.

I setup a new CNAME record with a value staging. My DNS configuration is as follows:

Hostname    RecordType      Value
@           A               62.116.130.8
www         CNAME           myapp.herokuapp.com
staging     CNAME           staging-myapp.herokuapp.com

Does anyone have an experience trying this? I'm too cheap to pay $7/month for DNS management through Zeringo or equivalent service. I'd rather just live with having the shitty staging-myapp.herokuapp.com url.

like image 514
Carlos Cervantes Avatar asked Nov 12 '22 12:11

Carlos Cervantes


1 Answers

After a few days I came back to this issue. With the settings above it is now working. I think it just took unusually long for the changes to propagate or maybe DNS flushing was not working.

like image 88
Carlos Cervantes Avatar answered Nov 15 '22 10:11

Carlos Cervantes