0

Currently i have an app on Heroku with a wildcard subdomain working like this:

client1.myapp.com, client2.myapp.com, ...

This is working fine. Then, i'd like that each client can access this apps using their own personal domains. So, testing this on my personal domain, i would like to configure test.mydomain.com like this:

CNAME test --- client1.myapp.com

But, this is not working yet. I keep getting the heroku error 'No such app, There's nothing here, yet.'.

Not sure what i am missing. Is it a problem related to my actual Laravel app? Heroku config? DNS?

Thanks in advance for any help.

dmarcos89
  • 59
  • 2
  • 10

1 Answers1

1

Assuming your application will provide an hostname for each client (actually, it would probably be preferable to have a single hostname as in any case it looks like they will all point to the same Heroku app), then you have to complete all these tasks in order to make it work:

  1. Add the subdomain client1.myapp.com as domain attached to the Heroku app
  2. Configure the DNS record for client1.myapp.com
  3. Ensure client1.myapp.com resolves (dig client1.myapp.com)
  4. Add the customer subdomain/domain to your Heroku app, otherwise Heroku will reject routing the requests for that domain
  5. Configure the DNS record for the customer subdomain/domain to CNAME client1.myapp.com
  6. Ensure the customer subdomain/domain resolves

According to your issue description, I assume you probably did not configure the customer subdomain/domain as domain to your Heroku app.

Simone Carletti
  • 173,507
  • 49
  • 363
  • 364
  • 1
    The thing is, i want each costumer to configure their own domains to their myapp subdomains. So let's say you register on myapp and get simone.myapp.com, then you would want to add a CNAME on your domain to get something.yourdomain.com pointing simone.myapp.com. Am i clearer? That's what happening, when adding the CNAME, i get the heroku error screen: http://cotizar.baummstudio.com. I believe traffic is going to Heroku, but not recognizing the actual app. many thanks! – dmarcos89 Jan 27 '18 at 14:14
  • Hi @simone-carletti , is there any chance to avoid adding myself each client CNAME to my heroku domains? Should i migrate to other server? Any recommendation? – dmarcos89 Jan 27 '18 at 15:23
  • Nope. Heroku needs to understand that a domain is valid, and which app the domain should be routed to. As long as you use Heroku, you are required to add every customer domain to the app. You can do it programmatically via API. – Simone Carletti Jan 28 '18 at 15:50