这是我关于将网络解决方案上的域重定向到 Heroku 上托管的 Web 应用程序的一个非常具体的问题。我已经设置好,在 CNAME 记录中,Allias www 指的是 heroku 中的主机名。问题是,目前如果我输入不带 www 的网址,它不会呈现我的页面。有人可以帮我吗?我已经非常努力地想弄清楚这一点。希望这篇文章将来也能对其他人有所帮助。
最佳答案
将 yourdomain.com 指向 www.yourdomain.com 的网络解决方案。方法如下。
在客户管理器中,选择“我的域名”
Select the domain name that you want to manage
在绿色框中,选择“更改域点位置”
Select Advanced DNS, then Continue
首先,通过选择“编辑 A 记录”来编辑 A 记录
For the "@ none" enter the following IP address 205.178.189.129,
clear (delete) the records for the "www" and "* (All others)",
then select Continue.
Sometimes this takes a few moments for the first step to take effect.
其次,选择“编辑 CNAME 记录”来编辑主机别名(CNAME 记录)
Enter "www" in the Alias column
Leave TTL set to 7200 but on the same line, enter the name servers provided by the blogging service in the Other Host section [ IE FOLLOW THE HEROKU INSTRUCTIONS NOW www --> yourapp.herokuapp.com (Cedar Stack) ]
选择继续
现在等待并使用以下终端命令检查域:
主机域名.com 主机 www.domain.com
关于heroku - heroku非www重定向到www域的网络解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16182098/