简体   繁体   English

如何将我的 Heroku 应用程序与我从 BigRock 购买的域名相关联

[英]How to link my Heroku app with my own domain name bought from BigRock

I have a Heroku app.我有一个 Heroku 应用程序。 I want to link my Heroku app, with my own domain name bought from BigRock.我想将我的 Heroku 应用程序与我从 BigRock 购买的域名关联起来。 I read various tutorials on SO, googled the same, but couldnt find the solution.我阅读了关于 SO 的各种教程,搜索了相同的内容,但找不到解决方案。

In my BigRock account, it asks for Name Servers .在我的 BigRock 帐户中,它要求提供Name Servers Under Domain Forwarding, I provided my heroku app URL, but when I try to hit my domain url, it does not serve my page.在域转发下,我提供了我的 heroku 应用 URL,但是当我尝试点击我的域 url 时,它不提供我的页面。 Instead, it shows a blank page.相反,它显示一个空白页。 Although it loads the heroku app url, it does not show my webpage.虽然它加载了 heroku 应用程序 url,但它没有显示我的网页。

How do I link my heroku app to my own domain url?如何将我的 heroku 应用程序链接到我自己的域网址?

With in BigRock you have to set up your domain to be forwarded to your heroku app, appname.herokuapp.com and then in your heroku app settings, there is a domain section, that is a list of your sub domains, there you must put your domain name that you bought.在 BigRock 中,您必须将域设置为转发到您的 heroku 应用程序 appname.herokuapp.com,然后在您的 heroku 应用程序设置中,有一个域部分,即您的子域列表,您必须将您购买的域名。 You can have infinite subdomains so put yourdomain.com and www.yourdomain.com unless you have a wild card domain then just *.yourdomain.com should be sufficient.您可以拥有无​​限个子域,因此将 yourdomain.com 和 www.yourdomain.com 放在一起,除非您有一个通配符域,那么只需要 *.yourdomain.com 就足够了。

  1. In your Bigrock control panel, set the name servers to Bigrock's default:在您的 Bigrock 控制面板中,将名称服务器设置为 Bigrock 的默认值:

     dns1.bigrock.in dns2.bigrock.in dns3.bigrock.in dns4.bigrock.in
  2. Under Manage DNS section, add CName records to point to DNS targets provided by heroku for your custom domain.在管理 DNS 部分下,添加 CName 记录以指向 heroku 为您的自定义域提供的 DNS 目标。

PS: Don't do domain forwarding as it requires your custom domain to have a static IP address which heroku doesn't provide. PS:不要进行域转发,因为它要求您的自定义域具有 heroku 不提供的静态 IP 地址。

I did and just put the steps here: http://kanhaiyakumawat.com/blog/heroku-and-bigrock-dns-setup/我做了,只是把步骤放在这里: http : //kanhaiyakumawat.com/blog/heroku-and-bigrock-dns-setup/

Heroku and Bigrock DNS Setup Heroku 和 Bigrock DNS 设置

Sept. 13, 2016, 9:50 am | 2016 年 9 月 13 日,上午 9:50 | Tagged under Miscellaneous标记为杂项

For eg kanhaiyakumawat.com and kanhaiyakumawat.herokuapp.com例如 kanhaiyakumawat.com 和 kanhaiyakumawat.herokuapp.com

Here are the steps以下是步骤

  1. Add records in your heroku account for在您的 heroku 帐户中添加记录

    • www.kanhaiyakumawat.com to kanhaiyakumawat.herokuapp.com www.kanhaiyakumawat.com 到 kanhaiyakumawat.herokuapp.com
    • kanhaiyakumawat.com to kanhaiyakumawat.herokuapp.com kanhaiyakumawat.com 到 kanhaiyakumawat.herokuapp.com
    • *.kanhaiyakumawat.com to kanhaiyakumawat.herokuapp.com *.kanhaiyakumawat.com 到 kanhaiyakumawat.herokuapp.com
  2. So now with this heroku side setup is done.所以现在这个 heroku 端设置完成了。 Lets move to bigrock 'DNS Management' section.让我们转到 bigrock 的“DNS 管理”部分。 Click 'Manage DNS'.单击“管理 DNS”。

  3. Add CNAME Records添加 CNAME 记录

    • www.kanhaiyakumawat.com to kanhaiyakumawat.herokuapp.com www.kanhaiyakumawat.com 到 kanhaiyakumawat.herokuapp.com
    • *.kanhaiyakumawat.com to kanhaiyakumawat.herokuapp.com *.kanhaiyakumawat.com 到 kanhaiyakumawat.herokuapp.com
  4. MOST IMPORTANT: Setting up Naked Domain or root domain Setup最重要:设置裸域或根域设置

    • Now this is most trickiest part.现在这是最棘手的部分。 Just leave the 'hostname' text box empty and select 2nd radio button in Values.只需将“主机名”文本框留空并选择值中的第二个单选按钮。
    • Put here your heroku dos value把你的 heroku dos 值放在这里

See the picture below见下图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM