Custom Domain Name setup for WordPress GCP Bitnami NGINX, Apache

You’ve installed WordPress using Bitnami NGINX on the cloud platform, and now you want to add a domain name to the installation. It helps the users to access your application using the domain name of your website.

Domain Name setup Bitnami WordPress NGINX

Setup Domain Name for Bitnami WordPress on Google Cloud

To add a domain name to the WordPress website, you’ve to reserve a static IP Address for WordPress deployment. And only after that process further.

It would be best if you have a domain name for the WordPress website. If you don’t have one, Buy it domain name from the Best Domain Name Providers.

Updating DNS settings

Now login to the domain name provider and edit DNS settings. In DNS settings, you’ve to enter A name and CNAME. That will be for

  • The A entry would be “@” and Target “your static IP” like
  • The CNAME Name entry would be “www” and the target value “@”.

After properly configuring all the above settings, please check that your new settings are updated or not on It may take a few hours to propagate all settings; you’ve to wait.

Your WordPress site with Domain is Live Now.

Now you can check your domain which is online. By entering the direct IP address, it is not redirecting to your domain. To solve this, follow the steps guided below.

Updating WordPress URL with IP

Open SSH Terminal of GCP

Google Cloud Console SSH Terminal
Google Cloud Console SSH Terminal
  • Open Google Cloud Console Dashboard.
  • Click Compute Engine> VM Instance.
  • Now Click on the SSH terminal link.

Now you’ve to define the WordPress application URL in its wp-config.php file.

Open nginx.conf bitnami
Open wp-config.php bitnami

In the SSH terminal, type the following command (new update)

sudo -i
nano /opt/bitnami/wordpress/htdocs/wp-config.php
Domain Name WordPress Config
Domain Name Config

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');



In the above command, please replace with your preferred domain address like Change with your domain name.

Press ctrl+X(windows) or cmd+x(mac) and then Y to confirm the changes.

NGINX user, Reload the NGINX by the following command.

nginx -s reload

Apache user, execute the following command to restart the server.

sudo /opt/bitnami/ restart apache

You can access your domain now using the IP address or DNS.

Check the following related to Google Cloud Bitnami NGINX WordPress Settings.

Ashok Sihmar

Ashok Kumar working in the Search Engine Optimization field since 2015. And worked on many successful projects since then. He shares the real-life experience of best SEO practices with his followers on You also can learn Advance level SEO for WordPress, Blogger, or any other blogging platform. Stay tuned.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button