Monday, May 4, 2009

How to identify if a website is hosted using Google App Engine

If a website is hosted using Google App Engine the following three conditions should hold true:
  • The website's CNAME points to ghs.google.com, ghs.l.google.com or appspot.l.google.com
  • Accessing the website's /form path returns a Google-styled 404 page
  • The website's "Server"-header is "Google Frontend"
The three conditions can easily be tested. On a standard Mac OS X system these commands can be used to test if www.example.com is hosted using Google App Engine:

CNAME google.com:
  dig www.example.com cname | egrep -i 'cname.*google.com'
Google 404 page for /form:
  curl -s -D - http://www.example.com/form | egrep 'G.+o.+o.+g.+l.+e'
"Google Frontend" server string
  curl -s -D - http://www.example.com/ | egrep '^Server:'


Please note that the first two conditions (CNAME + /form) are true also for Blogspot hosted domains, Google Apps hosted domains and possibly other Google hosted services. However, the server string can be used to distinguish between GAE hosted domains (with server string "Google Frontend") and Blogspot/Google Apps domains (with server string "GFE/2.0").

So if all three conditions are true that would strongly indicate that the website is hosted using Google App Engine.

Please let me know if you have any counter-examples - either sites that fulfill the three conditions but are NOT hosted using Google App Engine (false positives), or sites that are hosted using Google App Engine but do not fulfill the three conditions (false negatives).

10 comments:

  1. Why would you want to know if a site is hosted using Google App Engine?

    ReplyDelete
  2. @Chris: If you're developing applications for GAE or considering doing so you might be interested in GAE success stories. I sure am! :-)

    ReplyDelete
  3. Just add Server Spy to Firefox and it'll report 'Google' for sites hosted on GAE.

    ReplyDelete
  4. @GSMD: The server string ("Google Frontend") is a necessary condition, but are you sure it's a sufficient condition?

    ReplyDelete
  5. Thanks for such an interesting article here. I was searching for something like that for quite a long time and at last I have found it here.
    Call Option || Option Tips || Stock Option Tips || Options || Nifty Options


    ReplyDelete
  6. Wow, awesome blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is great, let alone the content!
    Ncdex Tips || Indian Stock Market || Bullion Tips || Nifty Future Tips || Nifty Option Tips || Future Tips

    ReplyDelete
  7. I was very encouraged to find this site. I wanted to thank you for this special read.
    Commodity tips || Stock Market || Share Market || Nse Tips || Bse Tips

    ReplyDelete
  8. Nice Information! I personally really appreciate your article. This is a great website.
    Intraday Nifty Future Tips
    Share market tips
    Share and Earn .

    ReplyDelete
  9. I found so many interesting stuff in your blog especially its discussion.
    Commodity tips || Stock Market || Share Market || Nse Tips || Bse Tips

    ReplyDelete
  10. This is a magnificent post How to identify if a website is hosted using Google App Engine . I benefit from the knowledge lot. I will bookmark this page. show gratitude’s for sharing this knowledge.

    nursing dissertation examples

    ReplyDelete