GAE 裸到 www 自定义域映射不起作用
我使用 aral balkan 上的教程在 GAE 上设置了一个自定义域,以访问 http;//app.apspot.com http://app.com。 (我可以在 www.app.com 上访问该应用程序)
该教程相当旧(2008 年 9 月),其中提到
为裸机添加四个主机名 域(即,yourdomain.com,不带 www)并让它们指向 IP 地址216.239.32.21, 216.239.34.21、216.239.36.21 和 216.239.38.21。
我将所需的 A 名称添加到我的域名 dns,但访问 app.com 会将我引导至 Google 404 页面
我已经使用类似的方法在 Blogger 上使用赤裸裸的 www 重定向(Google Blogger 帮助提供的名称)它对我有用(它仍然有效)。然而,除了 aralbalkan.com 上的文章之外,我还没有遇到过任何官方消息来源表明使用这些 IP 的裸至 www 域重定向适用于 Google Apps(GAE 用于管理自定义域)上的域。
我的问题:
是否有人使用类似的方法(指向 Google IP 的名称)将裸域中的 www 域解析为 GAE 上的自定义域?如果是,IP 是否不同或者我做错了?
我能想到使用的替代方法是,获取第三方主机并将 app.com 的 A 名称指向该第三方的 IP 地址派对主机,然后在该主机上放置一个 301 重定向脚本到 www.app.com。但这将需要我管理另一个主机,只是为了赤裸裸地到 www 重定向。
如果有人知道任何更简单的方法可以在 GAE 的自定义域上实现裸到 www 重定向,请提供帮助。
更新:
谢谢您的回答。如果有任何帮助,我正在使用 geoscaling.com 作为 DNS。我也有一个 everydns 帐户。该域名位于 namecheap 上,并且 namecheap 也提供 freedns 选项。
更新 2
将我的 dns 切换回 namecheap。我猜 geoscaling.com 不提供 301 url 重定向(如果我错了,请纠正我),尽管它仍然是一项很棒的服务。 Namecheap 提供 301 URL 重定向。应该在一段时间后开始工作。
I setup a custom domain on GAE using the tutorial at aral balkan to access http;//app.apspot.com at http://app.com. (I can access the app at www.app.com)
The tutorial is pretty old(Sep 2008) and it mentions
Add four Hostnames for the naked
domain (i.e., yourdomain.com without
the www) and have them point to IP
addresses 216.239.32.21,
216.239.34.21, 216.239.36.21, and 216.239.38.21.
I added the required A names to my domain dns, but accessing app.com leads me to a Google 404 page
I have used naked to www redirection on blogger using a similar method(A names provided by Google Blogger Help) and it has worked for me(it still works). However apart from the article at aralbalkan.com, I have not come across an official source which says that naked to www domain redirection using these IPs works for domains on Google Apps(which GAE uses to manage custom domains).
My Question:
Does anybody use a similar method(A names pointing to Google IPs) to resolve www domains from naked domains for custom domains on GAE? If yes, are the IPs different or am I doing it wrong?
The alternate method that I can think of using is, getting a third party host and pointing the A name of app.com to the IP address of that third party host, followed by placing a 301 redirect script to www.app.com on that host.But that will require me to manage another hosting just for naked to www redirection.
If anyone knows of any easier methods to achieve naked to www redirection on custom domains for GAE, please help.
Update:
Thank you for the answers. If it can be of any help, I am using geoscaling.com for DNS. I have an everydns account too. The domain is on namecheap and namecheap offers a freedns option too.
Update 2
Switched back my dns to namecheap. I guess geoscaling.com does not offer a 301 url redirect(correct me if I am wrong), although it's still a great service. Namecheap offers a 301 URL redirect. Should start working in some time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
虽然 Google 确实不正式支持裸域,但可以使用注册商的 DNS 和域转发工具来实现此目的。
例如,http://conversionsupport.com 托管在 Google App Engine 上,而 GoDaddy 是管理 DNS 的地方。裸域使用域转发规则重定向到 http://www.conversionsupport.com 子域。
对裸域的请求会导致 301 重定向到
www
子域。一些 SEO 资源声称使用一个子域可以更好地确保搜索引擎不会将您网站的内容视为重复。此 301 重定向应有助于确保裸域和 www 子域得到相同的对待。以下是设置网址转发的资源GoDaddy。请注意,虽然这是针对 Google 协作平台的,但我已确认它确实适用于 Google App Engine 应用程序。
更新:
澄清一下,裸域本身将重定向到 www 子域。这意味着,如果您的用户输入 http://example.com 那么他们将被重定向到 http://www.example.com 就像我上面的原始示例一样。
据我了解,大多数Google Apps 帐户与 GoDaddy 合作。以下是 GoDaddy 支持人员关于使用 301 重定向进行域名转发的说明。
While it's true Google doesn't officially support naked domains, it is possible to make this work using your registrar's DNS and Domain Forwarding tools.
For example, http://conversionsupport.com is hosted on Google App Engine, and GoDaddy is where the DNS is managed. The naked domain redirects to the http://www.conversionsupport.com subdomain using a domain forwarding rule.
Requests for the naked domain result in a 301 redirect to the
www
subdomain. Some SEO resources claim that using one subdomain is better for ensuring search engines don't see your site's content as being duplicative. This 301 redirect should help ensure that both naked domain and www subdomain are treated the same.Here is a resource for Setting up URL Forwarding in GoDaddy. Note that while this is intended for Google Sites, I have confirmed that it does work on Google App Engine apps.
UPDATE:
To clarify, the naked domain itself will redirect to the www subdomain. This means that if your users type http://example.com then they'll be redirected to http://www.example.com as is the case with my original example above.
From what I understand, most Google Apps accounts are partnered with GoDaddy. Here are the Instructions from GoDaddy Support on Domain Forwarding Using a 301 Redirect..
App Engine 不支持裸域。您需要按照您的建议使用 www-redirects。
Naked domains are not supported on App Engine. You need to use www-redirects, as you suggest.
可以通过三个步骤设置对 App Engine 的裸域(例如yourdomain.com)支持:
设置裸域重定向到您选择的子域(例如重定向mydomain.com< /em> -> www.mydomain.com)。请参阅 App Engine 常见问题解答,其中指导您通过 Google Apps 控制台为您的域配置重定向.
配置 App Engine 为您的自定义子域提供流量(例如 www .yourdomain.com)通过 Google Apps 控制台。
(可选)为您的自定义域设置 SSL。如果您要提供 https:// 流量,则需要执行此步骤,但如果您仅计划托管 http:// 内容,则不需要此步骤。
Naked domain (e.g. yourdomain.com) support for App Engine can be setup in three steps:
Setup a naked domain redirect to a subdomain of your choice (e.g. redirect mydomain.com -> www.mydomain.com). See the App Engine FAQ, which instructs you to configure the redirect via the Google Apps control panel for your domain.
Configure App Engine to serve traffic for your custom subdomain (e.g. www.yourdomain.com) via the Google Apps control panel.
(Optionally), setup SSL for your custom domain. This step is required if you which to serve https:// traffic, but not required if you only plan on hosting http:// content.
正如尼克所说,应用程序引擎不支持裸域。
关于在自定义域上实现裸到 www 重定向的更简单方法...一些 DNS 主机(例如 dyndns.com)将该功能集成到其 DNS 控制面板中。您可以咨询您的 DNS 提供商,看看是否属于这种情况。
As nick says, naked domains are not supported by app engine.
On your point of easier methods to achieve naked to www redirection on custom domains... Some DNS hosts, (for example, dyndns.com) integrate that ability into their DNS control panel. You may check with your DNS provider to see if that is the case.
随着时间的推移发生了所有的变化,我想表明 GAE(至少在撰写本文时)确实支持裸域。我正在为 wdydfun.com 工作。按照 Fred Sauer 上面提到的指示进行操作,它最终会起作用。我很乐意提供有关这些步骤的更多详细信息,但事情似乎经常发生变化。您必须点击一下才能找到设置内容的位置。 DNS 传播时间可能有点令人沮丧。我建议
从命令行运行以帮助查看发生了什么。我的“www”域名解析为 ghs.google.com,而我的裸域名解析为注册域名的 dreamhost。在填写了谷歌指示中的额外“A”记录后,裸域最终开始返回不同的信息并且它起作用了。如果您在浏览器中对此进行测试,值得一提的是,在撰写本文时,webkit 浏览器似乎比 mozilla 更挑剔。我的 DNS 设置:
您的 DNS 设置可能看起来相似。除非方向再次改变。自我第一次设置以来,CNAME 值发生了变化,因此,如果我在此处编写的内容与 Google 上的说明不同,请相信 Google 上的说明。 HTH。
With all the changes over time, I wanted to post that GAE (at least at the time of this writing) DOES support naked domains. I have this working for wdydfun.com. Follow the directions as mentioned above by Fred Sauer and it will eventually work. I'd love to provide more detail on those steps, but things seem to change frequently. You'll have to click around a bit to find where to set stuff. With the DNS propagation time that can be a bit frustrating. I recommend running
from the command line to help see what is going on. My "www" domain was resolving to ghs.google.com and my naked domain was resolving to dreamhost where the domain was registered. After filling out the extra "A" records from the google directions, the naked domain eventually started returning different information and it worked. If you are testing this out in a browser, it's worth mentioning that at the time of this writing webkit browsers seem to be pickier than mozilla. My DNS settings:
Yours will probably look similar. Unless the directions have changed again. The CNAME value changed since when I first set things up, so if what I'm writing here differs from the directions on Google, trust the directions on Google. HTH.
裸域映射通过 Google Developers Console 进行工作。
https://code.google.com/p/googleappengine/issues/detail ?id=777
Naked domain mapping works from the Google Developers Console.
https://code.google.com/p/googleappengine/issues/detail?id=777
或者,您可以按照以下步骤解决此问题,当然,
Ping 您想要转发到的网站,以获得
IP 地址(如果您不知道)。
“运行”;指令; “ping yourwebsite.com”
将显示 ping 数据并从 IP 地址回复。记下这个地址。
登录 Godaddy.com 管理您的帐户或其他域名注册机构
网站
在“主机”下输入:@
在“指向”下输入您之前获得的 IP 地址。
你已经完成了!输入时,站点转发时不带 www 前缀
地址栏。
更多详细信息和参考:
http://www. techproceed.com/2014/05/custom-domain-setup-on-blogger-with.html
Alternatively, you could follow below steps which solves this problem, for sure,
Ping the website you are wanting to forward to, in order to get the
IP address if you don't know it.
"Run"; CMD; "ping yourwebsite.com"
Will display ping data and reply from IP address. Note this address.
Login to Godaddy.com to manage your account or other domain registry
site
Go to DNS Control Modify/Add "A Host"
Under "Host" enter: @
Under "Points To" Enter the IP Address you obtained earlier.
You are done! Site is forwarded without the www prefix when entered into
address bar.
More details and reference :
http://www.techproceed.com/2014/05/custom-domain-setup-on-blogger-with.html