如何在Google App Engine上设置我的域名?

时间:2021-03-10 18:19:26

I've made a website to go on App Engine, and have deployed it. I've redirected my domain name to ghs.google.com, and it successfully goes to my site.

我已经建立了一个可以继续使用App Engine的网站,并且已经部署了它。我已将我的域名重定向到ghs.google.com,并且它已成功转到我的网站。

The problem is that in the address bar, 'www.mysite.com' turns into 'myappid.appspot.com', and I haven't got a clue as to how I make it stay with 'www.mysite.com'.

问题是在地址栏中,“www.mysite.com”变成了“myappid.appspot.com”,我还没有得到如何让它留在'www.mysite.com'的线索。

It seems like such a simple thing, but It's starting to drive me insane!

看起来这么简单,但它开始让我疯了!

How do I fix this?

我该如何解决?

4 个解决方案

#1


Have a look at this quick guide, in essence:

看看本快速指南,实质上:

Add a CNAME for www.yourdomain.com and point it to ghs.googlehosted.com.

为www.yourdomain.com添加CNAME并将其指向ghs.googlehosted.com。

Sign in to your application via appspot.com.

通过appspot.com登录您的应用程序。

Click the Administration → Application Settings link.

单击管理→应用程序设置链接。

Click the Add Domain... button under the Domain Setup section

单击“域设置”部分下的“添加域...”按钮

Add www.yourdomain.com in the domain name box and click the Add Domain... button

在域名框中添加www.yourdomain.com,然后单击添加域...按钮

#2


With respect to the naked domain question. Please take a look at: http://code.google.com/appengine/kb/general.html#naked_domain and follow the link provided there.

关于裸域问题。请查看:http://code.google.com/appengine/kb/general.html#naked_domain并按照其中提供的链接进行操作。

#3


The only reason you'd get the behaviour you're describing is if your app is issuing a 301 or 302 redirect from www.mysite.com to mysite.appspot.com. App Engine won't do this itself. If you paste the relevant handler code, perhaps we can spot the issue.

您获得所描述行为的唯一原因是您的应用是从www.mysite.com向mysite.appspot.com发布301或302重定向。 App Engine本身不会这样做。如果您粘贴相关的处理程序代码,也许我们可以发现问题。

#4


I found that my domain name provider allowed me to do a URL redirect from http://mysite.com to another url, but unfortunately it didn't let me redirect http://mysite.com to http://www.mysite.com.

我发现我的域名提供商允许我从http://mysite.com进行URL重定向到另一个URL,但遗憾的是它没有让我将http://mysite.com重定向到http://www.mysite .COM。

I found that it would however let me redirect to http://www.mysite.com/home though, so I've done that. From www.mysite.com/home, I could have done a redirect to www.mysite.com, but I'm not that fussy :)

我发现它会让我重定向到http://www.mysite.com/home,所以我已经这样做了。从www.mysite.com/home,我本可以重定向到www.mysite.com,但我不是那么挑剔:)

I think that in my original question, my browser might have been caching things, so when I was playing around it wasn't responding properly. A reset of my history or a ctrl+F5 helped the second time around.

我认为在我原来的问题中,我的浏览器可能已经缓存了一些东西,所以当我玩它时它没有正确响应。重置我的历史记录或ctrl + F5帮助第二次。

The first answer provides pretty good instructions on the google apps side of things but the link provided really threw me off with the instructions about setting up stuff at dyndns.com (which seems really strange to me). I only needed to touch google apps, and my domain name provider.

第一个答案在谷歌应用程序方面提供了相当不错的说明,但提供的链接真的让我失去了关于在dyndns.com上设置东西的说明(这对我来说似乎很奇怪)。我只需要触摸谷歌应用程序和我的域名提供商。

Google has some doc as well which I found http://www.google.com/support/a/bin/answer.py?hl=en&answer=61057

谷歌也有一些文档,我找到了http://www.google.com/support/a/bin/answer.py?hl=zh-CN&answer=61057

Thanks for everyone's help :)

谢谢大家的帮助:)

#1


Have a look at this quick guide, in essence:

看看本快速指南,实质上:

Add a CNAME for www.yourdomain.com and point it to ghs.googlehosted.com.

为www.yourdomain.com添加CNAME并将其指向ghs.googlehosted.com。

Sign in to your application via appspot.com.

通过appspot.com登录您的应用程序。

Click the Administration → Application Settings link.

单击管理→应用程序设置链接。

Click the Add Domain... button under the Domain Setup section

单击“域设置”部分下的“添加域...”按钮

Add www.yourdomain.com in the domain name box and click the Add Domain... button

在域名框中添加www.yourdomain.com,然后单击添加域...按钮

#2


With respect to the naked domain question. Please take a look at: http://code.google.com/appengine/kb/general.html#naked_domain and follow the link provided there.

关于裸域问题。请查看:http://code.google.com/appengine/kb/general.html#naked_domain并按照其中提供的链接进行操作。

#3


The only reason you'd get the behaviour you're describing is if your app is issuing a 301 or 302 redirect from www.mysite.com to mysite.appspot.com. App Engine won't do this itself. If you paste the relevant handler code, perhaps we can spot the issue.

您获得所描述行为的唯一原因是您的应用是从www.mysite.com向mysite.appspot.com发布301或302重定向。 App Engine本身不会这样做。如果您粘贴相关的处理程序代码,也许我们可以发现问题。

#4


I found that my domain name provider allowed me to do a URL redirect from http://mysite.com to another url, but unfortunately it didn't let me redirect http://mysite.com to http://www.mysite.com.

我发现我的域名提供商允许我从http://mysite.com进行URL重定向到另一个URL,但遗憾的是它没有让我将http://mysite.com重定向到http://www.mysite .COM。

I found that it would however let me redirect to http://www.mysite.com/home though, so I've done that. From www.mysite.com/home, I could have done a redirect to www.mysite.com, but I'm not that fussy :)

我发现它会让我重定向到http://www.mysite.com/home,所以我已经这样做了。从www.mysite.com/home,我本可以重定向到www.mysite.com,但我不是那么挑剔:)

I think that in my original question, my browser might have been caching things, so when I was playing around it wasn't responding properly. A reset of my history or a ctrl+F5 helped the second time around.

我认为在我原来的问题中,我的浏览器可能已经缓存了一些东西,所以当我玩它时它没有正确响应。重置我的历史记录或ctrl + F5帮助第二次。

The first answer provides pretty good instructions on the google apps side of things but the link provided really threw me off with the instructions about setting up stuff at dyndns.com (which seems really strange to me). I only needed to touch google apps, and my domain name provider.

第一个答案在谷歌应用程序方面提供了相当不错的说明,但提供的链接真的让我失去了关于在dyndns.com上设置东西的说明(这对我来说似乎很奇怪)。我只需要触摸谷歌应用程序和我的域名提供商。

Google has some doc as well which I found http://www.google.com/support/a/bin/answer.py?hl=en&answer=61057

谷歌也有一些文档,我找到了http://www.google.com/support/a/bin/answer.py?hl=zh-CN&answer=61057

Thanks for everyone's help :)

谢谢大家的帮助:)