安装Heroku和GoDaddy? [英] Setup Heroku and GoDaddy?

查看:229
本文介绍了安装Heroku和GoDaddy?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获得一个通过GoDaddy购买的域名,与我的Heroku托管站点一起工作。

I am trying to get a domain name I bought through GoDaddy to work with my Heroku hosted site.

如何配置我的域名与Heroku配合使用?

How do I configure my domain name to work with Heroku?

推荐答案

p> [Updated 31.10.2014] 好的!有用!这是我从头开始做的,所以有同样问题的人也可以解决它。首先,我将解释如何设置Heroku和GoDaddy,然后我将解释如何创建一个裸域(www.example.com - > example.com)。

[Updated 31.10.2014] Allright! It works! Here is how I did it from scratch, so others with the same problem can fix it too. First I will explain how to setup Heroku and GoDaddy, then I will explain how to create a naked domain (www.example.com -> example.com).

设置Heroku和GoDaddy:


  1. 在终端(在您的计算机上)的项目文件夹中写入 heroku域名:添加www.example.com (其中 www.example.com 是您在GoDaddy购买的域名)

  1. In your project folder in terminal (on your computer) write heroku domains:add www.example.com (where www.example.com is the domain you have bought at GoDaddy)

登录GoDaddy - > DOMAINS - >选择您的域 - >
启动(这将带您进入域详细信息)

Sign in to GoDaddy -> DOMAINS -> choose your domain -> Launch (this will take you to the Domain Details)

点击DNS区域文件选项卡

Click 'DNS Zone File' tab

删除名为www的CNAME记录to @)

Remove the CNAME record named 'www' (which points to @)

点击添加记录 - > CNAME(别名) - >主持人应该是 www
'指向'应该是您的Heroku地址(例如
supermoo-bil-3411.herokuapp.com )。 TTL可以是1小时。

Click 'Add record' -> CNAME(Alias) -> 'Host' should be www and 'Points to' should be your Heroku address (example supermoo-bil-3411.herokuapp.com). TTL can be 1 hour.

DNS可能需要一些时间来传播。对我来说,花了大约10分钟。

It can take some time for the DNS to propogate. For me it took about 10 minutes.

就是这样! supermoo-bil-3411.herokuapp.com 现在将在 www.example.com 下:)

That's it! supermoo-bil-3411.herokuapp.com will now be under www.example.com :)

创建一个裸体域:

裸体域不需要将www写在您的域名。这可以通过将 example.com 转发到 www.example.com 来完成。在GoDaddy中这是非常简单的:

A naked domain removes the need to write www in front of your domain name. This can be done by forwarding example.com to www.example.com. This is super easy on GoDaddy:


  1. 在与上述相同的窗口中,点击设置标签

  1. In the same window as above, click on the 'Settings' tab

在转发 - >域名 - >点击管理 - >然后单击添加转发

Under Forwarding -> Domain -> Click 'Manage' -> then click 'Add Forwarding'

'转发'应该是 www.example.com (你的域),'重定向类型'应该是'301
(永久)','转发设置'应该是'仅转发'

'Forward to' should be www.example.com (your domain), 'Redirect type' should be '301 (Permanent)', 'Forward settings' should be 'Forward only'

确保更新我的名称服务器和DNS设置以支持此更改(推荐)选中

Make sure "Update my nameservers and DNS settings to support this change. (Recommended)" is checked

就是这样!你完成了:)

That's it! You are done :)

有用的链接

  • https://devcenter.heroku.com/articles/custom-domains

感谢Ryan Kazinec的帮助:)

Thanks to Ryan Kazinec for help :)

这篇关于安装Heroku和GoDaddy?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆