Forwarding Naked Domains for Appengine with Apache Posted on August 26, 2009 by Dave Fowler

Google Appengine currently does not allow configuration of naked domains. Meaning, if you're building something on Appengine you'll have to settle for a URL like or and you will not be able to use

Its not so bad in most cases, but not having isn't going to stop people from trying to go there. So its important to set up some sort of device to forward the naked domain to the www.

Unfortunately you're going to need a server and for this example it will need to be running Apache2. The redirect is handled by placing the following line in an apache config file (/apache2/httpd.conf).

Redirect permanent /

Where is the example site being hosted on Appengine.

Or, if your apache server is hosting other apps and domains you'll need to set up the redirect in a VirtualHost as shown here.

<VirtualHost *:80>
 Redirect permanent /

Note that the 'permanent' parameter in the Redirect command enforces a 301 or permanent redirect. You can choose other forms of redirect by replacing the 'permanent' with either the redirect number (ie 302) or the keywords from the following table I've shamelessly copied from here.

HTTP Code Status Description



The resource has permanently moved



The resource has temporarily moved



The resource has been replaced and refer to new resource



Use proxy to access site



The resource has temporarily moved



The resource has permanently removed

Finally set your DNS to point the base domain to this apache server and in a few hours it should be permanently re-directing to

If you're not using apache or are looking for more ideas here's a list of other techniques.

Also, please vote for Google to fix the issue here and here.