title: How to create a subsubdomain for an app on heroku: (e.g. sub.myapp.herokuapp.com)
body: <p>I am running a multi tenant app that uses subdomains for tenants on Heroku. In production I have a domain where subdomains point to my heroku app. (This all works fine)</p>
  
  <p>For staging, I'd like to test without creating another domain. Since my app uses the first subdomain it sees to find the current tenant, I was hoping to use a url like: tenant.myapp.herokuapp.com. However, this is not working (heroku returns a 'no such app' error.)</p>
  
  <p>I've found <a href="https://getsatisfaction.com/heroku/topics/subsubdomains_for_appname_heroku_com_domains" rel="noreferrer">this post</a> from 2 years ago that says it should be possible, but I don't see this add-on/option anymore in the referenced documentation.</p>
  
  <p>I have tried adding the subdomains as a wildcard in heroku by running </p>
  
  <p><code>heroku domains:add *.myapp.herokuapp.com</code></p>
  
  <p>but this returned </p>
  
  <p><code>!    Trying to hijack another Heroku app?  Tsk, tsk.</code></p>
  
  <p>Does anyone know if this can still be accomplished and if so, how?</p>
  
  <p><em>note:</em> I'm currently using my staging environment by CNAMING *.staging.myapp.com to myapp.heroku.com, but would like to clean that up.</p>