Heroku自定义域不起作用 [英] Heroku Custom Domain Not Working
问题描述
将Heroku应用程序与自定义域连接的正确方法是什么?
What is the correct way to connect a Heroku app with a custom domain?
这是我过去的做法:
-
将Godaddy的DNS指向heroku提供的目标(例如:
https://peaceful-escarpment-22825.herokuapp.com )
打开域上的域转发
在设置中将域添加到Heroku
Add domain to Heroku in the settings
由于某种原因,我从Heroku提供的目标是这样的:mycustomdomain.com.herokudns.com。当我将该DNS添加到GoDaddy时,我得到的是这里还没有。页。
For some reason now my provided target from Heroku is like this: mycustomdomain.com.herokudns.com. When I add that DNS to GoDaddy I get a There's nothing here, yet. page.
我在哪里错了?谢谢!
推荐答案
我一直跳过此步骤,因为自定义域已经显示在我的Heroku应用程序中。跑这个,它开始工作。
I kept skipping this step because the custom domain already showed up in my Heroku app. Ran this and it started working.
heroku domains:add www.yourwebsite.com
奖金:希望每个页面都是安全的SSL吗?使用这个很棒的NPM软件包 https://www.npmjs.com/package/force-ssl- heroku
Bonus: Want every page to be secure SSL? Use this awesome NPM package https://www.npmjs.com/package/force-ssl-heroku
这篇关于Heroku自定义域不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!