Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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.

share|improve this answer

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.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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