This is a simple guide on how to host static websites with Google App Engine. It may sound intimidating but it is actually really simple, let’s start!
Limitations: You receive 1 GB of free storage space for images, HTML pages and other files and 1 GB of bandwidth a day. Requirements:
- Google Account
- Registered Domain Name – Only if you want a custom domain name
- Download and install Python
- Download and install App Engine SDK
- Download and unzip this: My Website somewhere on your desktop
Lets get started it is literally risk free – all a learning experience right?
- Go to appengine.google.com and create a application. Follow the prompts carefully-they may ask to verify a mobile device.
- Give your application a name! It can only be lowercase alphabets and numbers. For our little walk through let’s make our application identifier be: “mylittlesnippet“.
- Now lets go back to the unzipped file on your desktop and open the app.yaml file with notepad and replace ‘myfirstgoogleapp‘ with our application identifier from above-‘mylittlesnippet‘ and save!
- We’re almost there, we are now going to deploy or ‘upload’ our website to Google App Engine.
– Open the Google App Launcher program we installed earlier (App Engine SDK)
– Now go File > Add Existing Application and find the folder where you unzipped My Website
– Hit deploy and enter your Google Account and password
– Voila! Your website should be available at: mylittlesnippet.appspot.com.
What if I want a custom domain name? When you create your application with Google App Engine, the application is served under mylittlesnippet.appspot.com. However most people would want a website with a custom domain, however most of the time this is not free. The following are the main steps to customize your app to use a domain:
- Acquire a domain through a domain registrar. I used https://www.godaddy.com/.
For those wondering what a domain registrar is, to put it simply it turns an IP address like 184.108.40.2068 into an easy-to-remember words like chouprojects.com. For the people with that itch for further knowledge: http://en.wikipedia.org/wiki/Domain_name_registrar
- Once you have purchased a domain, go to the Google Developers Console and select your project. To your left click Compute>App Engine>Settings. Select the Custom Domains tab. Follow the numbered sections similar to this.
- In the first section, enter the domain name you purchased from a domain registrar and click verify. This takes you Webmaster Central and asks you to confirm the domain name provider. It will look something like this:
After you click verify you will have to log in your registrar site and click accept.
- In the second section you can add the domain name you just verified. To add the domain name, click the first bubble(http://mydomain.com) and click add.
- Now comes the trickiest part of the guide(at least to me).
After you add the domain they will list two columns in section three, type and data. You will now have to go to your domain registrar(GoDaddy etc.) and you will need to create the DNS records and point to Google severs.
For GoDaddy you find the domain name you ‘purchased’ click Launch>DNS Zone File> Add Record.
Record type will correspond to the Type column above and Points to is the Data section.
Host you will put the symbol: @.
TTL will be an hour.
- Finally on the settings page, just make sure you have clicked the Add button. Now that the domain is associated with this application it will appear at the bottom of the page under Custom Domain Names.
Wait approximately an hour or so for your website to be available at your domain. You have now successfully ‘created’ a website under a custom domain, but this is only the beginning. There are endless opportunities on the web!