Is it possible to host a static HTML website on App Engine? And how to make my domain name work with it?
7 Answers
Yes you can host your static files on AppEngine. Just configure your app.yaml-file like the following
- url: /
static_dir: static_files
And put your files in the directory static_files. This way every request is routed to your static files.

- 5,080
- 4
- 35
- 43
I just had the same problem and decided to use this solution... It serves static files from the root directory and uses index.html if you don't give an file. Hope that helps.
# re-direct to index.html if no path is give
- url: /
static_files: index.html
upload: index.html
# access the static resources in the root director
- url: /(.*)
static_files: \1
upload: (.*)

- 681
- 5
- 4
-
AWESOME: just what I was looking for, that is, serve a static `.js` file directly from the `root` folder. Thanks. – Leniel Maccaferri Mar 23 '14 at 04:36
-
This is the correct approach and should be voted as a correct answer, thanks Brad! :) – Maksim Luzik Oct 28 '15 at 12:38
I've found what I believe is a really neat solution.
DryDrop
Basically, from what I'm led to believe, you deploy DryDrop to GAE, configure (domains, Github html repository etc.), then publish your static HTML by pushing to the GitHub repository (GitHub utilises 'hooks' to alert your DryDrop install to any new HTML changes).
I haven't used it personally, yet, but if the former CTO of Threadless Tees, Harper Reed, thinks it's OK, that's good enough for me :-D .
Cheers
Rich

- 5,864
- 1
- 40
- 64
To use your own domain with Google App Engine first you have to set your domain to work with Google Apps.
You then link the relevant Google App Engine application to the Google Apps Domain.

- 190,537
- 57
- 313
- 299
I wrote a library to do just that, and it works on AppEngine or any other server you want:
https://github.com/stochastic-technologies/static-appengine-hoster
You just throw your files in the directory, and it hosts them. It also supports Jinja2 templates, URL rewriting and multiple domains.

- 4,680
- 10
- 35
- 42
This also worked for me. It's exactly like @BradAbrams solution only with static_dir for the second part :
handlers:
- url: /
static_files: index.html
upload : index.html
- url: /*
static_dir: "."

- 4,922
- 2
- 44
- 52
-
This method did not work for me, as of January 2017 (only `index.html` gets served). The version from Brad [above](http://stackoverflow.com/a/9456859/356942) does work very well for all files in the root directory. – Greg Haskins Jan 22 '17 at 05:56
You don't need to make use of any other scripts per say to host a static website. I just had to do similar things that you have mentioned.
- A custom domain addition
- Hosting Mostly HTML and Static content
- A few php scripts (Not required for you)
Define Handlers for every static .html file like this
handlers:
- url: /
static_files: index.html
upload : index.html
- url: /index.html
static_files: index.html
upload : index.html
For Static Directories use this
- url: /images
static_dir: images
Making Use of Custom Domain
If you have purchased domain from somewhere else then you'll have to add your domain as custom domain and then go on with verification process for your domain. In my case my domain provider was godaddy.com and google did the verification process automatically. Although I had to add the Cname records after that manually in godaddy domain's DNS section. Google has complete automated system in place for the same so that wont be difficult at all.

- 2,415
- 2
- 18
- 39