use both www and naked domain to point my heroku app

孤街浪徒 提交于 2021-01-27 20:11:02

问题


I am having trouble to set both my www.domain.org and domain.org to point to Heroku rails app.

I did a CNAME from www to www.example.org.herokudns.com. it works fine and my www.example.org point to my example.herokuapp.com

Concerning https://example.org

Should I do a CNAME from @ to example.herokudns.com ? ALIAS is only accepted for IPs with my domain provider..

I having trouble finding an answer in stackoverflow.

Should I use http://wwwizer.com/naked-domain-redirect ? Do I have a solution without using a third party free service ?


回答1:


    heroku domains:add example.com

    heroku domains:add www.example.com

    heroku domains:add *.example.com

This is to point your domain name from heroku side

Here is a youtube video to make it easier https://www.youtube.com/watch?v=kKGSGT7mSnQ&t=29s

Please let me know if this does work




回答2:


For naked domain example.com you can use the forwarding functionality. If you have purchased domain from GoDaddy you can follow this:

Go to manage DNS and scroll down to forwarding section where you will see something like this:

You can choose https and forward to www.example.com. (You can also make your naked domain point to some other subdomain)



来源:https://stackoverflow.com/questions/52045188/use-both-www-and-naked-domain-to-point-my-heroku-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!