问题
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