问题描述
我有一个app在Heroku上运行。我从1and1购买了一个顶级的.com域名(我有其他网站,所以我认为这会使生活更轻松)。当我尝试重定向到我的Heroku应用程序时,我不允许修改 CName
别名记录,就像我已经为其他网站做过 - 这都是子域名。我被给了两个选项:框架重定向或 HTTP
重定向,我已经尝试了两个。框架重定向似乎没有起作用 - 页面保持空白。 HTTP
重定向实际上到达我的heroku网站,但是当它显示地址栏显示 myproject.herokuapp.com
而不是 mydomain.com
。
我添加了 www.mydomain。 com
和 mydomain.com
到我的英雄域名。
有没有添加掩码或类似的东西?
简短的答案:。
详细答案:
某些DNS提供商可能会提供 。
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?
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.
这篇关于URL重定向和1和1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!