Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
heroku和namescape example.com url(从www.example.com重定向到just example.com)_Heroku_Dns - Fatal编程技术网

heroku和namescape example.com url(从www.example.com重定向到just example.com)

heroku和namescape example.com url(从www.example.com重定向到just example.com),heroku,dns,Heroku,Dns,我有一个网页example.com,我已经用Heroku设置好了。现在,在Heroku上的我的域设置中,我有: Domain Name DNS Target example.com example.herokuapp.com www.example.com example.herokuapp.com 在这方面,我有: Type Host Value TTL

我有一个网页example.com,我已经用Heroku设置好了。现在,在Heroku上的我的域设置中,我有:

Domain Name                    DNS Target

example.com       example.herokuapp.com


www.example.com   example.herokuapp.com
在这方面,我有:

Type         Host            Value                TTL          
CNAME       www  example.herokuapp.com.  30 min

URL Redirect Record @  http://www.example.com Unmasked
发生的情况是,如果我键入example.com,它将重定向到www.example.com。我希望example.com和www.example.com都重定向到example.com


不知道该怎么做(heroku DNS的新功能)。谢谢大家!

你不能用Namecheap这样做,因为他们不支持你在Apex记录中使用example.herokuapp.com。如果您想在example.com这样的URL上访问,您需要将DNS移动到支持它的提供商,如PointDNS、DNSimple、CloudFlare等。这些提供商实施了一种技术,允许您在apex记录上使用CNAME