2013-10-22 49 views
1

我想將Site5中的自定義域名指向heroku域名。我下面這個指南:https://devcenter.heroku.com/articles/custom-domains如何將Site5域名指向Heroku

裏面我Site5控制面板我選擇高級DNS區編輯器,並插入以下值:

Record type: CNAME 
Record name: www 
CNAME host: stark-plains-xxx.herokuapp.com 

我保存這些值,但沒有當我訪問我的網站WWW變化.mysite.com。首頁仍然有默認索引。

命令host www.mysite.com只給出我的網站的IP地址。

我做了一切正確嗎?謝謝。

回答

3

我只想回答我自己的問題。我描述的這個過程對於www是正確的。它只需要一點點時間來實現它的工作。

因此,對於www.mysite.com這些都是Site5控制面板中正確的價值觀 - >Advanced DNS Zone Editor

Record type: CNAME 
Record name: www 
CNAME host: stark-plains-xxx.herokuapp.com 

mysite.com,程序有點不同,因爲你不能刪除默認值。在這種情況下,需要簡單的重定向。在Site5儀表板,我們需要選擇Domains -> URL Redirects,並把以下值:

enter image description here

就是這樣。現在,www.mysite.commysite.com都將重定向到我們在Heroku上託管的網站。

+0

有趣的是,如果您使用'https',則從裸域轉發到'www'將導致SSL證書檢查失敗,因爲轉發僅適用於'http'。 https://devcenter.heroku.com/articles/apex-domains和https://devcenter.heroku.com/articles/custom-domains#configuring-dns-for-root-domains還有一些討論 – srt32