Host Your GoDaddy Registry Domain Name on Google Cloud in Minutes!
Hello hackers! So another week has come & gone and you find yourself gearing up for a weekend filled with awesome hacktivities at an MLH sponsored hackathon. Or maybe you’re new to the scene and don’t quite know what the next couple of days has in store. Either way, I’m here to lighten the load for everyone reading and help y’all get started with claiming your free domain name, courtesy of GoDaddy Registry, and hosting it through Google Cloud. By the end of this article, not only will you have your own domain name but anyone with an internet connection will be able to see the content you have uploaded to your very own Google Cloud storage bucket.
Getting Started
First thing’s first, head over to www.tech.study to claim your free domain of choice for 1-year. Here we can check for the availability of our domain name, with potential choices ranging from .co, .us, .biz, .courses & .study domain extensions.
Once you’ve got your domain name selected and the submission form completed, you’ll be redirected to a checkout page. The only additional requirement for claiming your free domain is to create an account with GoDaddy Registry’s registrar partner, Porkbun.
You can take a look at everything you’ll have available after creating an account, including a free trial for Porkbun’s drag and drop site builder along with access to your domain via the Porkbun management console. Once you hit continue, you’ll see a pop-up confirming that your purchase is free of charge and from there be directed to the Domain Management panel, where you can administer your new domain.
Congratulations! You now have a domain name to call your very own. Next up, let’s get it hosted on Google Cloud!
Hosting on Google Cloud
Alright, if you don’t already have one, you’ll need a Google Cloud account. Head over to Cloud.Google.Com and use your google email to sign in. You’ll be redirected to the Google Cloud landing page where you can find a button that navigates you to your console (Check the top right corner next to your profile image).
Once you’re in the dashboard, you can either create a new project or use an existing one. Checkout the workflow below to get a better idea of how to get past the initial set up.
From here, you’ll need the following services in order to get our new domain name and website content hosted on Google Cloud.
Google Storage — you will need to create a storage bucket to house your website content.
Load Balancing — once you have your website content uploaded, you will need an IP address to redirect content over to your personalized domain name via HTTP.
Setting Up Your Storage Bucket
Now that your project is set up, go to the search bar at the top of the page and type in storage. You should see a tab populate beneath the search bar entitled ‘Storage’ beneath the heading ‘Products and Pages.’ Go ahead and navigate to the Storage Page and select the ‘Create Bucket’ option.
Get Rosendo Pili’s stories in your inbox
Join Medium for free to get updates from this writer.
The first step of this process is going to be the most important. Make sure you give your bucket the same name as your domain. This will point your domain name directly towards the contents of your storage bucket. For me, it’s going to be notimeto.study. Notice that I have not added the ‘www’ to my bucket name in order to give it root access to my domain name.
Here, you’ll be prompted with some useful information. We’ll need to go into the Google Search Console to find our domain name and authorize Google as the hosting provider by verifying our domain name ownership. Once you’re in the Google Search Console, you can click on the top left drop down tab and select the Add Property option. We’ll search for our domain name on the left hand side of the modal and be given a verification token. We can then use this to update the DNS Record we have in our Porkbun admin panel. The process is outlined in the photos below.
Once you’ve edited the DNS Record to reflect the google authorization token, you’ll see that your ownership is verified and can proceed to complete the rest of the storage bucket set up. Simply head back to the storage page in your Google Cloud project.
I select a single region ‘Location type’ along with ‘us-east1’ due to my current location. My ‘default storage class’ is standard based on the temporary nature of my project. If, however, the scope of your application changes over time, you can always go back and edit these settings to reflect your new use case. Finally, I allow uniform access to the objects in my bucket. If you plan on adding additional administrators and want to limit content access to specific objects, you can edit the setting to be ‘fine-grained’ within 90 days of launching your bucket.
Uploading Your Content
Now that you have a storage bucket set up, we can add the content we want displayed. Go into your storage bucket and click on upload files. Here I’ll be uploading a simple index.html file, a CSS file and a 404.html file that should display if an error occurs.
Once the upload completes, go back to your bucket details and click on the ellipses to the far right of the bucket name.
Here, we’ll need to go into ‘Edit bucket permissions’ to add a new member. We will be giving ‘view only access’ of our bucket objects to ‘allUsers.’ Please note that formatting is important here and that ‘allUsers’ should be typed in camel-case. You’ll then select the ‘Cloud Storage’ option from the ‘select a role’ dropdown menu and add ‘Storage Object Viewer’ on the right side. Hit save and allow public access to your bucket. Now your content should be accessible on the web.
Next we’ll need to define what displays to the end user when they navigate to our domain. Go back to the ellipses and click on ‘Edit website configuration.’ Here we’ll add our index.html and 404.html as the default landing pages for folks visiting our website. Hit save and we should be good to go.
Currently this content is being served to the web via the c.storage.googleapis.com IP address. If you click on the ‘Copy URL’ column of your index.html file and paste that into your web browser, you should see your content populate at the location: ‘storage.googleapis.com/custom domain here/index.html.’ In order to make the bucket content accessible using only the custom domain, we’ll need to generate a new IP address using a Google Cloud Load Balancer.
Google Cloud Load Balancer
Let’s get our new IP address set up! Go to the search bar at the top of your page and type in ‘Load Balancing.’ You should see the appropriate tab populate in a drop down menu, navigating you to the network services page. Once we’re there, we can select ‘Load balancing’ and click on the ‘Create Load Balancer’ option at the top of the page. You can see the workflow illustrated in the following images.
When setting up your HTTP load balancer, you will first need to give it a unique name. For your backend configuration, head over to the drop down menu, select the ‘backend buckets’ break out menu and create a backend bucket. Give your backend bucket a unique name, click the browse button and select the Google Storage bucket that we set up in the previous step. Mine is named ‘notimeto.study.’ You can keep the rest of the settings at default and hit create.
For ‘Host and path rules’, select the ‘Simple host and path rule’ radio button and keep the rest default.
Your frontend configuration will also need a unique name. Select ‘HTTP’ from the drop down menu, select the ‘Premium’ Network Service Tier radio button, your IP version should remain IPv4 and in the IP address drop down menu, select the ‘Create IP Address’ field. Your newly generated IP address will also need a unique name, and once it’s been reserved, you can hit the ‘Done’ button.
As the name suggests, for ‘Review and finalize’ just look over your load balancer details. If everything meets the criteria we have listed, go ahead and hit the ‘Create’ button.
It will take a moment for your load balancer to spin up, but once it has, you can click on the load balancer name to view the details. Here you will see your IP address listed. You can now take the IP, and head over to your Porkbun admin panel. Check out the row with your domain name, click the details drop down menu and edit your DNS records. What we’ll be doing next is adding two separate A records. They should look something like the following:
Once these are set up, you will need to wait 5 minutes or 300 seconds (as denoted by the Time To Live or TTL number) before these changes are reflected. Be patient as you will likely get a 404 error from Google if you try to access your domain before the 300 second delay. If you continue to receive errors AFTER the 300 seconds, double check the new A records you created in your DNS settings and ensure that they are pointing towards the correct IP address. You may also want to check the domain name from your phone while using a mobile network. The error page may have been cached to your internet IP causing a delay.
Sweet Success!
Barring any setbacks, you should now see the content of the index.html file you uploaded into your Google Storage bucket. Congratulations! You’re now the proud owner of a brand new domain hosted on Google Cloud! Feel free to update your storage bucket with any new content you come up with and be sure to submit your now eligible hackathon project to the ‘Best Domain from GoDaddy Registry’ prize category at your participating MLH event.

