title: How to point a domain at a heroku application
body: <p>While I've done this on my VPS, I've never done this for a heroku application, and now I have to do it for a fairly large company so I really want a simple list of bullet-points in how to do this.</p>
  
  <p>I've read <a href="https://devcenter.heroku.com/articles/custom-domains" rel="nofollow">these instructions</a>, and I'm still a little bit unclear on what exactly they mean. Again, if I had more time I'd buy some rubbishy domain and test it myself, but I don't have time on my side and need to get this right first time!</p>
  
  <p>Thankfully, no SSL is required at this time.</p>
  
  <p>Here's what I can gather I need to do to point the url <code>www.foobaryfoobs.com</code> at my application, running at <code>warm-chamber-1882.herokuapp.com</code>. Please correct me:</p>
  
  <hr>
  
  <p>1) I add <code>www.foobaryfoobs.com</code> to the local repository containing the application.</p>
  
  <p>I presume I do this by navigating to the repository on my local machine and running: </p>
  
  <pre><code>$ heroku domains:add www.foobaryfoobs.com
  </code></pre>
  
  <ul>
  <li><p>How does this work? Does it update some configuration file somewhere that I need to add to the repository and then push up to heroku?</p></li>
  <li><p>Are there any caveats or best practices here? What other domains should I add? <code>heroku domains:add *.foobaryfoobs.com</code>, for example?</p></li>
  <li><p>Heroku advises we use the above wildcard domain here. Why?</p></li>
  </ul>
  
  <hr>
  
  <p>2) Log into the registrar that created <code>www.foobaryfoobs.com</code> and navigate to its control panel.</p>
  
  <p>3) Update the domain's CNAME record to point at <code>warm-chamber-1882.herokuapp.com</code></p>
  
  <ul>
  <li><p><strong>Am I done for the most part? Now do I just wait?</strong></p></li>
  <li><p>Is there no IP related stuff?</p></li>
  <li><p><strong>The domain has several dozen emails attached to it. As long as I don't touch the MX record, I should be fine?</strong></p></li>
  <li><p>What's a root domain? Why should I add it?</p></li>
  <li><p>Why should I care that: </p></li>
  </ul>
  
  <blockquote>
    <p>Some DNS hosts provide a way to get CNAME-like functionality at the
    zone apex using a custom record type.</p>
  </blockquote>
  
  <hr>
  
  <p>4) Update the domain's  FORWARD / URL record so that <code>foobaryfoobs.com</code> points to <code>www.foobaryfoobs.com</code></p>
  
  <ul>
  <li>For a nooby, please explain why this is necessary. </li>
  </ul>
  
  <hr>
  
  <h2> 3 Conclusive Questions: </h2>
  
  <p><strong>1) Is this how it should be set up?:</strong></p>
  
  <p>The app:</p>
  
  <pre><code>warm-chamber-1882.herokuapp.com
  </code></pre>
  
  <p>Should have the following configurations (saved in some weird config file that I wouldn't mind knowing more about about):</p>
  
  <pre><code>domains:
  www.foobaryfoobs.com
  *.foobaryfoobs.com
  </code></pre>
  
  <p>The domain:   </p>
  
  <pre><code>www.foobaryfoobs.com
  </code></pre>
  
  <p>Should have the following records:</p>
  
  <pre><code>CNAME: warm-chamber-1882.herokuapp.com
  URL / FORWARD: foobaryfoobs.com target: www.foobaryfoobs.com
  MX: *as long as I don't touch them the emails will still work*
  </code></pre>
  
  <p><strong>2) Am I covered against:</strong></p>
  
  <blockquote>
    <p>It’s important to make sure your DNS configuration agrees with the
    custom domains you’ve added to Heroku. In particular, if you have
    configured your DNS for *.example.com to point to
    example.herokuapp.com, be sure you also run heroku domains:add
    *.example.com. Otherwise, a malicious person could add baddomain.example.com to their Heroku app and receive traffic intended
    for your application.</p>
  </blockquote>
  
  <p><strong>3) How should I adjust the steps for a site that has an SSL backend section?</strong></p>