0

I'm trying to create a cname that points from my custom domain (s.mydomain.com) to a multilevel subdomain hosted on heroku (me.myapp.herokuapp.com).

I've created the Cname s.mydomain.com with the value me.myapp.herokuapp.com. When I go to s.mydomain.com it does not route to me.myapp.herokuapp.com, instead I get:

method=GET path=/ host=s.mydomain.com dyno=web.1 queue=0 wait=0ms connect=4ms service=18ms status=404

It's possible I'm not fully understanding how this Cname should be setup. My desired outcome is for s.mydomain.com to act as if it were at me.myapp.herokuapp.com.

0

The CNAME record makes your domain name resolve to the IP address of your Heroku application. The host name sent in the HTTP request will still be your own domain name, though, so he next thing to do is configuring your web server/Heroku server to accept requests for your domain name.

0

Follow along the documentation carefully. There are exactly two things you need to do:

  1. Tell Heroku about your subdomain.

    heroku domains:add s.mydomain.com
    
  2. Set the CNAME record in your DNS.

    s       IN      CNAME   mature-infant-1234.herokuapp.com.
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.