We are trying to point a heroku staging app (something.herokuapp.com
) to a subdomain on our domain (staging.company.com
).
Everything else on the domain (*.company.com
) goes to our previous production app.
I'm having trouble pointing subdomains of the subdomain to the heroku staging app. For example, login.staging.company.com
should point to staging's login portal, and hospital.staging.company.com
should load our app with the Hospital client's data.
I have 3 relevant CNAME records:
*
points tocompany.com.
(Everything goes to production)*.staging
points tosomething.herokuapp.com.
staging
also points tosomething.herokuapp.com.
Current behavior is that login.staging.company.com
goes to app.company.com
, thus it goes to our production app instead of our heroku staging app. However, login.staging.company.com/users/sign_in
goes to our staging app just fine, but it is the ONLY link that is going to our staging app.
Which records do I need to add/remove to make sure that everything under *.staging.company.com
goes to our heroku staging app, and everything not under that continues to go to our production app?
Ex. hospital.staging.company.com
should go to staging, while government.company.com
should go to production.
login.staging.company.com
, and it does indeed point to heroku, but upon visiting the link, it still reroutes to the production login portal (changes fromlogin.staging.company.com
toapp.company.com
.