One of the essential steps you need to do after deploying WordPress on Google Cloud Platform (GCP) is setting up a domain name.
In my past tutorial, you learned How to Install and Setup WordPress on Google Cloud. After successful installation of WordPress, you can see your site is live and running, but an External IP address appears in the site address section instead of domain name. You need to replace that External IP address with your domain
Let’s get started!
Steps to Set Up a domain on Google Cloud Platform
Register your domain or Login into your domain provider account
Log in to the Google Cloud Console
Enable the Cloud DNS API on GCP
Create a Cloud DNS Zone
Add DNS Records (Setting Up A Record)
Add DNS Records (Setting Up CNAME Record)
Configure NS Record in Your Domain Provider
Congratulations! You’re done setting up your custom domain with Google Cloud Platform.
Now type your website on any web browser and you will be able to see your WordPress website live. If you can’t see your website, don’t panic. Any changes made to your domain nameservers (DNS) might not reflect immediately. It could take up to 24 hours, so wait for some hours and try again later.
However, only pointing a domain with Google Cloud Server isn’t enough. We need to do a few more changes for proper domain configuration, like Static IP address Configuration on GCP and Domain setup for CMS, to prevent access via IP address.
Reserve and Configure a Static IP address on GCP
I hope that before domain set up, you already reserved and configured static IP on GCP. If you missed the step, then learn here – How to Configure and Reserve a Static IP address on VM Instance of Google Cloud Platform. This set up is very important cause at Google Cloud, VM Instances are launched with an Ephemeral IP address by default, which means this IP address changes every time whenever the server is stopped or restarted. That’s why to prevent our website from technical errors, we need to reserve a Static IP address instated of the default IP address.
Domain setup for CMS
After setting up your domain on Google cloud Server, you need to configure your domain name your CMS so that it can works properly. In our case, we are using WordPress as our CMS. So here you can find – How to Configure a Domain for WordPress on Google Cloud. The process will be similar for other CMS. So don’t worry if you are using a different CMS platform.
So in this tutorial, you learned how to point your domain on Google Cloud. If you have any questions regarding this tutorial, then feel free to let me know by commenting below, and I’ll get back you as soon possible.
It’s a pity you don’t have a donate button! I’d definitely donate to this superb blog!
I guess for now i’ll settle for book-marking and adding your RSS feed to
my Google account. I look forward to new updates and will talk about this
site with my Facebook group. Chat soon!
Thank you for being my blog reader! Stay tuned to get more updates on blogging tutorials.
This is great!
I have followed all the steps here. When I type in my web URL, my site comes up, but the URL is the IP address. And all my inner pages are broken.
In other DNS settings, like the Godaddy example you have, the name of the A record is @ and that points to the ip address, but in Cloud DNS you can’t quite set it up like that. So, I’m not sure what to do.
What do you think?
After Domain setup, you need to configure your domain for WordPress site. That tutorial I mentioned at the end of this tutorial. Did you follow that tutorial, as I described? If not then here is it – How To Configure A Domain For WordPress On Google Cloud Platform
Please follow my instructions as described to complete the domain configuration for the WP site. If you still face the issue, then feel free to let me know by commenting, and I’ll be happy to help you.
Thanks