Reputation: 135
I have a heroku app, lets call it showering-wind-33
. I purchased a top level domain, let's call it example.com
, and correctly configured my domain to render content on heroku by adding a CNAME pointing to showering-wind-33.herokuapp.com
. So when I visit example.com
it renders the content from showering-wind-33.herokuapp.com
.
I have another domain foo.com
and I want store.foo.com
to point to a the content in store_for_foo.example.com
, and I'm having problems doing this.
I tried:
1. Adding a CNAME record in my DNS to point store.foo.com
to store_for_foo.example.com
2. Adding store.foo.com
to "Domains" under Settings in my heroku app.
But the result is that store.foo.com
ends up pointing to example.com
but not store_for_foo.example.com
What am I doing incorrectly? Any help would be appreciated - thanks! How can I get the content of store.foo.com
to show store_for_foo.example.com
Upvotes: 4
Views: 1416
Reputation: 22238
Can't be done with pure DNS, but there are some alternatives:
Use example.com/store, and have store.foo.com URL redirect to that.
Use some sort of middleware to pipe those requests on that domain only.
Remind your husband that he has written a book containing a section on DNS and he should know this ;).
Upvotes: 7