joshgallagher24
1 year ago

Heroku Domain and Sub Domain Trouble

Posted 1 year ago by joshgallagher24

Hello all,

I am setting up a site which has a Lumen API and Vue SPA - these are both hosted on Heroku.

(I am using Namecheap)

I have the domain www.example.com - I want to map my SPA to www.example.com and have my API map to www.api.example.com.

For my Vue SPA I give it these details:

Domain name: www.example.com DNS Target: www.example.io.herokudns.com

For my Lumen API I give it these details:

Domain name: www.api.example.com DNS Target: www.api.example.io.herokudns.com

On Namecheap I have a URL Redirect Record with these details:

Host: @ Value: http://www.example.com/ unmasked

Then I have CNAME record with these details:

Host: www Value: www.example.io.herokudns.com TTL: auto

At this point, my Vue SPA points to this domain.

However, When I add my Lumen API CNAME record my API does not point to www.api.example.com.

These are the CNAME record details:

Host: api Value: www.api.example.io.herokudns.com TTL: auto

Can someone tell me why I can not get this working? Is it a limitation? Is there a work around?

I'm new to DNS stuff!

Thanks in advance

Please sign in or create an account to participate in this conversation.