237

After hours of reading about and experimenting with DNS records I can access my Google App Engine app via these URLs:

  • myappid.appspot.com
  • www.myappid.myowndomain.com

What does not work:

  • myowndomain.com
  • www.myowndomain.com

I want to be able to serve my app directly off my domain and not a subdomain. I've seen apps that do this. Is there any way to do this without a URL redirect?

Methkal Khalawi
  • 1,598
  • 1
  • 4
  • 12
Mark
  • 5,281
  • 5
  • 19
  • 10

15 Answers15

259

[Update April 2016] This answer is now outdated, custom naked domain mapping is supported, see Lawrence Mok's answer.

I have figured it out!

First off: it is impossible to link something like mydomain.com with your appspot app. This is considered a naked domain, which is not supported by Google App Engine (anymore). Strictly speaking, the answer to my question has to be "impossible". Read on...

All you can do is add subdomains pointing to your app, e.g myappid.mydomain.com. The key to get your top level domain linked to your app is to realize that www is a subdomain like any other!

myappid.mydomain.com is treated exactly the same as www.mydomain.com!

Here are the steps:

  1. Go to appengine.google.com, open your app
  2. Administration > Versions > Add Domain... (your domain has to be linked to your Google Apps account, follow the steps to do that including the domain verification.)
  3. Go to www.google.com/a/yourdomain.com
  4. Dashboard > your app should be listed here. Click on it.
  5. myappid settings page > Web address > Add new URL
  6. Simply enter www and click Add
  7. Using your domain hosting provider's web interface, add a CNAME for www for your domain and point to ghs.googlehosted.com

Now you have www.mydomain.com linked to your app.

I wished this would have been more obvious in the documentation...Good luck!

Community
  • 1
  • 1
Mark
  • 5,281
  • 5
  • 19
  • 10
  • 12
    Heh, my bad -- I thought you _knew_ www is a subdomain like any other, but should have considered spelling it out! – Alex Martelli May 04 '09 at 00:05
  • Hey Mark, any reason why www.mydomain.com will be showing the google sites instead of the app engine domain? – TimLeung May 15 '09 at 22:24
  • For example, my domain is http://www.wehearttoronto.com/ but this is directing to the google sites ? – TimLeung May 15 '09 at 22:25
  • 21
    To get the naked mydomain.com to work, just redirect it to the www subdomain. – Steve Landey Jul 18 '09 at 14:27
  • tim, check your google sites settings, i imagine you have google sites linked up to your www subdomain. – Dustin Getz Mar 13 '11 at 00:43
  • As a matter of fact, you can use naked domain in App Engine in the very early days when it was just released. But you cant use it anymore. Take a look at this site: http://xuming.net/ – DocWiki Jul 04 '11 at 18:29
  • @Mark just a note : if you need SSL on custom domain forget GAE – themihai Sep 28 '11 at 11:14
  • 21
    The need to setup Google Apps for simply setting up a custom domain is completely unintuitive and almost retarded. It's like forcing one to use a rocket launcher to swat a mosquito. – HRJ Dec 28 '11 at 12:46
  • 4
    Looks like Google has updated the documentation. The cname value should be ghs.googlehosted.com – Krishnaraj Nov 27 '12 at 14:25
  • 4
    See Laurence Mok's answer below: it's now possible from the Developers Console directly. – crb Apr 14 '14 at 11:03
55

[update 2015-09-28] Now Google lets you add custom domains (including naked domains) and setup SSL without the need of Google Apps. For details refer to here: https://cloud.google.com/appengine/docs/using-custom-domains-and-ssl?hl=en

I just discovered today (as of 2014-04-11) a new custom domain settings page is available from Google Developers Console:

1. Go to https://console.developers.google.com/project 2. Click on your project 3. On the left click "App Engine" 4. Click "Settings"

There you go! You can configure custom domain without the need of Google App account!

Dan Cornilescu
  • 37,297
  • 11
  • 54
  • 89
user1431972
  • 3,036
  • 1
  • 18
  • 26
  • in step 3 it says Create the resource records listed below for the XXX.com domain, what does it mean ? – Kunal Balani Apr 30 '14 at 00:44
  • @KunalBalani That means you need to edit your domain's DNS record (check with the place where you registered your domain for instruction) – user1431972 Apr 30 '14 at 01:15
  • 3
    Be mindful that this method does not support SSL--which sucks. I'm still looking for a workaround. – capitalf May 22 '14 at 16:54
  • 2
    @capitalf Google said it's "coming soon" and as usual there is no ETA. I had tried to look for work around too but there's none. The closest thing I can get now is https working for www, http working for www. and naked (redirect them to https www) – user1431972 May 29 '14 at 04:33
  • 2
    Note that this is the correct answer as of April 2014. Answers prior to that date refer to work-arounds before custom domains were better supported. SSL is still coming soon. – Dave Sep 07 '14 at 02:44
  • According to a Google staff, SSL for custom domain is also coming soon in Google Developers Console around 2015Q3 – user1431972 May 15 '15 at 07:07
  • Support of SSL for custom domain is now available – user1431972 Sep 28 '15 at 07:24
  • Anyone else facing inconsistent behavior even after following all the steps to the last dot? I mean, sometimes the url remains as "mydomain.com" and sometimes it changes to "myid.appspot-preview.com". Or does this has something to do with the default app (the one that is created with initial tutorial) that is currently running? Sample code - https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/hello-world/app.js – mathakoot Feb 08 '17 at 06:42
42

[Update April 2016] This answer is now outdated, custom naked domain mapping is supported, see Lawrence Mok's answer.

See http://www.google.com/support/a/bin/answer.py?hl=en&answer=91077 for the details. Once you have signed up for Google Apps for Your Domain:

# Sign in to the Google App Engine admin console.
# Go to Administration > Versions
# Click the 'Add Domain...' button under Domain Setup.
# Enter your domain name in the 'Domain Name:' field
# Click 'Add Domain'. You will be directed to the Google Apps administrator console to complete the process.
# Log in to the Google Apps control panel with your administrator account.
# Accept the terms and specify the access URL you'd like to provide for your application.
# Click 'Accept

You can't use a naked domain, though, such as whatever.com (but www.whatever.com does work), because:

Due to recent changes, Google App Engine no longer supports mapping your app to a naked domain. If your domain registrar supports URL redirects, you can redirect from http://yourdomain.com to your app, which can be served from domains like http://www.yourdomain.com or http://appid.yourdomain.com.

as specified at http://www.google.com/support/a/bin/answer.py?answer=91080

Community
  • 1
  • 1
Alex Martelli
  • 762,786
  • 156
  • 1,160
  • 1,345
  • Thanks for the quick reply. I had done all that already, I added my domain to my Google Apps account. Now my app is listed as a service. The primary domain is set to mydomain.com and my app lists the subdomain (www.myappid.mydomain.com). I must be missing something. Adding the subdomain worked right away, so I doubt that it is some update/DNS/settings issue... When I go to www.mydomain.com I get "Server Not Found". – Mark May 03 '09 at 20:06
  • I think I have the same problem... adding "www." for the google app engine Web address doesn't respond. Right now wehearttoronto.com is directing to the google sites... – TimLeung May 15 '09 at 21:39
  • 1
    As of Issue 777 being resolved, Appengine now supports both Naked Domans again as well as not having to first set up GoogleApps for domains. There are very brief instructions on the last comment. However, the process is basically as described in Alex's original post. http://code.google.com/p/googleappengine/issues/detail?id=777 – Blaine Garrett Apr 28 '14 at 19:42
18

If like me you have seen this message while trying to add 'www' as a subdomain inorder to get your own domain working:

'Already used, please remove previous mapping first . '

The above process mentioned in other answers has changed slightly if you are using Google Apps for your domain.

You must now do this as well:

Google Apps -> Service Settings -> Sites. Click 'Web address mapping' and remove the 'www' mapping which has been added by default to Sites.

Then you can add the 'www' subdomain for your App engine app

see this link:

http://groups.google.com/group/google-appengine/web/deleting-existing-www-mapping-from-google-apps

andy boot
  • 10,179
  • 3
  • 47
  • 62
9

Another solution which is given by Google is URL forwarding: http://www.google.com/support/a/bin/answer.py?hl=en-in&answer=61057

Tahir Akram
  • 3,134
  • 11
  • 47
  • 65
8

Google does offer naked domain redirection.

  • Login to your google apps account and select "manage this domain"
  • Navigate to Domain settings
  • Within Domain Setings, navigate to Domain names
  • There's a link that says "change the A record". Clicking that will give you the destination IPs for the A records you need to create.
Evgeny Karpov
  • 2,100
  • 21
  • 13
5

Google does not provide an IP for us to set A record. If it would we could use naked domains.

There is another option, by setting A record to foreign web server's IP and that server could make an http redirect from e.g domain.com to www.domain.com (check out GiDNS)

4

I know all these steps and actually the following is the short and fantastic way.

1 - Go to appengine.google.com, open your app

2 - Administration > Versions > Add Domain... (your domain has to be linked to your Google Apps account, follow the steps to do that including the domain verification.)

3 - Go to www.google.com/a/yourdomain.com

4 - Dashboard > your app should be listed here. Click on it.

5 - myappid settings page > Web address > Add new URL

6 - Simply enter www and click Add

7 - Using your domain hosting provider's web interface, add a CNAME for www for your domain and point to ghs.googlehosted.com

8 - Now you have www.mydomain.com linked to your app.

  • If you want naked domain, i.e. mydomain.com, use a redirect un your DNS administrator (not in Google Apps) and point it to www.mydomain.com.

Now that I've done that all, I can go to my appengine app successfully using my custom domain. For example http://cic.mx and http://www.cic.mx both take me to my app. But URL changes to -myappid-.appspot.com and I don't want it to happen !

Has anyone solved this issue?

I'm using a php app on the appengine, with a wordpress instance.

chuycepeda
  • 316
  • 2
  • 6
2

For App Engine in 2019, googles has made it easier to set up a custom domain.

  1. Google App Engine -> Settings -> Custom Domains

  2. Verify your domain

  3. Select Your Domain Name Registra

Reminder: Use TXT Record with the value Google provides without a existing CNAME record, otherwise TXT Record will be override

  1. Follow the steps on the page, which includes the configuration of your subdomain, CNAME Record, A Record, AAAA Record, and you'll be good to go.
Eddie Tsai
  • 31
  • 2
1

When you go to "Application Settings -> Add Domain" It will ask to select login account, probably you are already on gmail account so it will show gmail account as well, but you should use Google Apps account where you have mapped your custom domain.

Prakash
  • 3,996
  • 26
  • 35
1

Just managed to sort this finally after hours. The www subdomain was pointing to Sites, but the front end wasn't showing me that.

After taking the plunge and setting the CNAME to gwh.google.com, and enabling / disabling Sites a couple of times (see the comment from Rodrigo Moraes on http://groups.google.com/group/google-appengine/web/deleting-existing-www-mapping-from-google-apps) I was able to set the Sites address to use the www subdomain.

I was then able to change it away from using the www subdomain, at which point the appengine app allowed me to specify the www subdomain.

That is one dirty fix - basically turning on and off Sites until it works!

0

You can redirect forward or mask your domain name in godaddy but I don't know about other hosting sites.Have a look on this link

Saurabh Ande
  • 407
  • 3
  • 12
0

Here is a tutorial from Google about mapping your App on custom domain: https://cloud.google.com/appengine/docs/domain?hl=FR

It should be the latest update. But please note these 2 things:

1- You may not find you App in the new developer console, then the only workaround for that is download your source code, create a new app from the new developer console and deploy it.

2- You find your App on the developer console, but under the Compute menu you may not find the App Engine Settings as mentioned in the tutorial, then you have to proceed the same as i explained in the first point (create another application)

I hope this helps !

Zouhaier
  • 1
  • 1
0

You can create a custom domain (including naked domain) for your App Engine and you can also set up self managed SSL certificates there.

To use a custom domain, map the domain to your app, then update your DNS records. You can map a naked domain, such as example.com or a subdomain, such as subdomain.example.com. You can also use wildcards to map subdomains.

The steps to map custom domain to your application are following -

  1. In Console,go to the Application settings tab of the App Engine Settings page -->If you need to enable G Suite authentication then click Edit to modify the Google Accounts API Referrer-->In the Google Authentication drop-down menu, select G Suite domain, then add your domain such as example.com in the empty field.

  2. Go to the Custom Domains tab of the App Engine Settings page--> Click on add custom Domain-->If your Domain is already verified then select it from the drop down menu-->click Continue.

If you haven't verified your domain yet, follow the steps below:

 a) Select Verify a new domain from the drop-down menu.

 b) Enter your naked domain name (such as "example.com") and click Verify.   
          
 c)  Enter information in the Webmaster Central window that appears. 

 d) After you complete the steps in Webmaster Central, return to the Add a new    
 custom domain page in the Google Cloud Console.
  1. In the Point your domain to (project-ID) section, specify the domain and subdomains that you want to map.We recommend mapping the naked domain and the www subdomain-->click Save mapping.

  2. Sign in to your domain registrar web site and update your DNS records.

Please refer to the following link for detailed description of required steps -

https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains

-3

You must try like this, Application Settings > Add Domain...

Echilon
  • 9,631
  • 27
  • 126
  • 209