Note that there are some explanatory texts on larger screens.

plurals
  1. PONaked Domain with Heroku and BigRock
    text
    copied!<p>I have my domain name <code>example.com</code> from domain registrar <strong>BigRock</strong>, which also provides me the DNS management panel.<br> My application is hosted at <strong>Heroku</strong> at <code>example.herokuapp.com</code>.</p> <p>Domain Settings at Heroku:</p> <pre><code>bash-3.2$ heroku domains === MyApp Domain Names *.example.com example.herokuapp.com example.com www.example.com </code></pre> <p>In my DNS Management panel, I have 0 A records, 1 MX records for Hotmail and 1 CNAME record for <code>www.example.com</code>.</p> <p>I know about the problem with Naked domains and A-records with Heroku. I have gone through these: 1. <a href="https://stackoverflow.com/a/16041655/355722">StackOverflow ques - How to setup DNS for an apex domain (no www) pointing to a Heroku app?</a><br> 2. <a href="https://devcenter.heroku.com/articles/custom-domains#root-domain" rel="nofollow noreferrer">Heroku DevCenter - Custom domains - set up root domain</a><br> 3. <a href="https://devcenter.heroku.com/articles/apex-domains" rel="nofollow noreferrer">Heroku DevCenter - Apex Domains</a> </p> <p>The above links and many others point towards 2 solutions: </p> <ul> <li>Using ALIAS or ANAME records by DNSimple/ DNS Made Easy </li> <li>If your DNS provider does not support such a record-type, and you are unable to switch to one that does, you will need to use subdomain redirection to send root domain requests to your app on Heroku.</li> </ul> <p>Since, I couldn't find such records on BigRock DNS Management Console. There were only these records - "A, AAAA, MX, CNAME, TXT, SRV and SOA". </p> <p>Accordingly, I have setup "<strong>Domain Forwarding</strong>" for my domain. But, it only gave me option to provide "<em>Designation URL where you wish to forward requests for www.example.com and example.com</em>". </p> <p>Now, If I do </p> <pre><code>bash-3.2$ host example.com example.com has address 173.194.16.11 example.com mail is handled by 15 888379351a9a.pamx1.hotmail.com. </code></pre> <p>and</p> <pre><code>bash-3.2$ host www.example.com www.example.com is an alias for example.herokuapp.com. </code></pre> <p>This does solve the naked domain problem. But other subdomains like <code>xyz.example.com</code> are still not redirected to <code>www.example.com</code>, because there is no mention to redirect all subdomains i.e "*" to any other designation in the "Domain Forwarding" section on BigRock DNS provider. </p> <p><strong>So, my question is how can I solve this problem of redirecting sub-domains?</strong></p> <blockquote> <p>Another Query Related to SSL -</p> </blockquote> <p>Here in the <a href="https://devcenter.heroku.com/articles/custom-domains#subdomain-redirection" rel="nofollow noreferrer">Heroku Devcenter - subdomain redirection</a>, it says that <em>"However, be aware that, using this method, a secure request to the root domain, e.g., <a href="https://example.com" rel="nofollow noreferrer">https://example.com</a>, will result in an error or warning being displayed to the user."</em></p> <p>Is there any way of fixing the above issue, or do I have to switch to DNSimple or DNS Made Easy to use the ALIAS or ANAME records services they provide?</p> <p><strong>UPDATE:</strong><br> On further digging, I found this SO ques - <a href="https://stackoverflow.com/questions/13536724/rails-manually-redirecting-from-naked-domain">Rails Manually redirecting from Naked Domain</a>, which suggests using: </p> <ul> <li><a href="https://github.com/jtrupiano/rack-rewrite" rel="nofollow noreferrer">Rack_rewrite</a></li> <li><a href="https://github.com/joshsusser/refraction" rel="nofollow noreferrer">Refraction gem</a></li> </ul> <p>Is this a better way?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload