问题
I've got an app up and running on Heroku. I've purchased a top level .com domain from 1and1 (I have other sites there, so I thought that would make life easier).
When I attempted to redirect to my Heroku app, I was not allowed to modify the CName
alias record like I have done for other sites - which were all subdomains. I was given two options: Frame redirect or HTTP
redirect, I've tried both. The frame redirect doesn't seem to function at all - the page stays blank. The HTTP
redirect does actually get to my heroku site, but when it displays the address bar shows myproject.herokuapp.com
instead of mydomain.com
.
I've added both the www.mydomain.com
and mydomain.com
to my heroku domains.
Is there anyway to add a mask or similar?
回答1:
Short answer: you can not set CNAME for top of your domain.
Detailed answer: Why can't a CNAME record be used at the apex (aka root) of a domain?
Some DNS providers might offer workaround hacks.
来源:https://stackoverflow.com/questions/33026513/url-redirection-and-1and1