One Page Zen

Web Design. Simplified.

  • Tutorials
    • Google Cloud
    • Amazon Cloud
    • Microsoft Cloud
  • Start
  • Resources

How to Reserve a Static IP Address on Google Cloud

November 12, 2020 Leron Amin 48 Comments

FacebookTweetLinkedInEmail

One of the first steps after deploying a website project on Google Cloud Platform is to reserve a static IP address. The majority of technical problems experienced by Google Cloud Platform users occur because the user failed to reserve a static IP address for their website.

In this tutorial you will learn how to easily reserve a static IP address for your website on Google Cloud Platform.

Before starting this tutorial, you should have already deployed a website on Google Cloud Platform Compute Engine.

There are 2 methods in this tutorial:

  • 1. Reserve an Existing IP Address
  • 2. Reserve a New IP Address

1. Reserve an Existing IP Address

reserve static ip address wordpress on google cloud
From your Google Cloud Platform dashboard, navigate to Networking > External IP addresses.
ff
If you already have a website configured, click the down arrow under the Type column and select Static for the External IP address that is connected to your instance (recommended method).

2. Reserve a New IP Address

reserve static ip address wordpress on google cloud
From your Google Cloud Platform dashboard, navigate to Networking > External IP addresses.
reserve static ip address wordpress on google cloud
If you would like to reserve a new static IP address for your instance, instead of using the existing one, click the RESERVE STATIC ADDRESS button. If you choose this option, make sure the IP address matches the IP address in your website’s DNS records.
reserve static ip address wordpress on google cloud
Configure your settings based on the image above, making sure to attach the static IP address to the correct instance, then click the Reserve button.

Troubleshoot

reserve static ip address google cloud
Depending on your Google Cloud configuration, your External IP Addresses may be located either under VPC Network > External IP addresses or Networking > External IP Addresses.

That’s it!

By reserving a Static IP Address, you will prevent your site from breaking after server outages or restarts.

If you have any questions or comments, please post them below!

Thanks,

Up Next…

ssh linux permission errors google cloud
Manage WordPress Files on Google Cloud Platform (Beginner)
ssh linux permission errors google cloud
Manage WordPress Files on Google Cloud Platform (Advanced)

Related Posts

  • How to Access phpMyAdmin via SSH Tunnel (GCP)
  • How To Remove Bitnami Corner Banner From WordPress on Google Cloud Platform
  • Setup CloudFlare CDN for WordPress on Google Cloud
  • How to Fix SSH (Linux Shell) Permission Errors on Google Cloud
  • Get Started with WordPress on Google Cloud Platform
  • Increase File Upload Size WordPress on Google Cloud
FacebookTweetLinkedInEmail

Filed Under: GCP Networking, Google Cloud Platform Tagged With: gcp, google cloud platform, ip, ip address, static

Comments

  1. bk KALIA says

    January 11, 2020 at 11:44 am

    i have a working static ip with domain (tender84.com) mapped to google compute engine wordpress vm.
    Later I created new wp vm with more settings, Now when I’m reassigning static existing ip to my new vm then it is not loading either by static ip address nor domain name. it was working fine without static ip.

    So my query is, can we assign static ip to new google vm ? if yes then how to do it

    Reply
    • Leron Amin says

      January 18, 2020 at 9:19 pm

      Hi Bk,

      You can change which IP’s are assigned to which instances by navigating to VPC network > External IP addresses.

      There will be a dropdown next to the IP address allowing you to select which instance to assign it to.

      Let me know if you have questions,
      Joe

    • bk KALIA says

      January 19, 2020 at 11:20 pm

      Exactly followed this process many times but new VM DNS never resolve …. Loading circle rotates endlessly.
      I mean, i have working wordpress VM on ephemeral IP.
      When I go to External IP addresses (with domain mapped) and replace its IP by attaching STATIC IP of other Production WP VM then Domain or Static IP never loads new wordpress in browser.

    • Leron Amin says

      February 4, 2020 at 1:34 pm

      Hi Bk,

      When you’re re-assigning IP addresses, it can sometimes take a while for the updates to reflect. Was the VM working correctly before assigning the new IP address?

      Talk to you soon,
      Joe

  2. Paul says

    December 21, 2019 at 2:01 pm

    Hi,

    Bit of a noob question – can I use the static ID as a nameserver? I have a domain on a hosting site I am no longer using and want to make sure traffic ends up at my Google cloud site. I can’t port the domain over as it is not 60 days old yet.

    Thank you for your great tutorials!

    Reply
    • Leron Amin says

      January 23, 2020 at 8:50 pm

      Hi Paul,

      What do you mean by the static ID?

      Talk to you soon,
      Joe

  3. Sunil says

    June 30, 2019 at 5:31 am

    I Have Assigned A Static Ip To My WordPress Website And Also Updated The Same In Cloud Dns A Record …..Website Is Loading But I Cannot Access Wp-admin Page Unable To Login Now That Just Doesn’t Load …How Much Time It Takes To Be New Static Ip To Be Fully Working

    Reply
    • Leron Amin says

      July 8, 2019 at 5:24 pm

      Hi Sunil,

      It typically takes less than an hour. Did it start working?

      Let me know and I will see how I can help,
      Joe

    • Sunil says

      July 9, 2019 at 1:24 am

      Yeah It Worked …..Also The Permalink Error 404 Is Also Resolved By The Ftp File Permissions Error…Tha k You So Kuch For All The Tutorial ….Site Is Up And Running

  4. Aaron says

    May 23, 2019 at 3:47 am

    Hi,

    Thanks for this post. What I am trying to do is reserve additional IP addresses to use in Plesk so they can be assigned to an individual website instead of all of the websites using the same shared IP.

    I have followed this step and it works just fine. However when I click to add another external static IP it does not allow me to attach it to the VM instance.

    It may be outside the scope of this video perhaps due to my limited understanding, so I thought I’d ask a pro!

    Reply
    • Leron Amin says

      May 26, 2019 at 1:05 pm

      Hi Aaron,

      I think it’s possible to attach multiple ephemeral IP addresses to a single instance, but the quota for static IP addresses is just one per instance.

      So you’re running multiple applications on a single VM and are trying to assign a unique IP address to each one?

      Talk to you soon,
      Joe

  5. peguy says

    March 12, 2019 at 1:27 am

    Hi ! thank you for all, your tutorial has really helpful.

    I’m trying to do that but my own don’t working. when i clicking on SSH button nothing happent .

    Reply
    • Leron Amin says

      March 18, 2019 at 7:24 pm

      Hi Peguy,

      What do you mean nothing happens? Do you have a pop-up blocker enabled?

      Talk to you soon,
      Joe

  6. Valentino says

    December 17, 2018 at 11:47 am

    Hi OP, thanks for the tutorial, is the static ip cost will be deducted from the 300 credit?

    Reply
    • Leron Amin says

      December 24, 2018 at 3:26 pm

      Yes – the networking costs will be deducted from the $300 credit.

  7. Coki says

    August 21, 2018 at 3:09 pm

    Hi,

    First of all, I have to say thank you for all your tutorials 😉

    I’ve deployed WordPress via the click and deploy solution. At the begining It was possible to connect the compute engine VM via the IP which appeared in the “Deployment Manager” menu but now I don’t know why it don’t works anymore, my browser is loading everytime. It is true for the IP adresse and also for the IP adress with the “wp-admin” at the end.

    On the other hand, I can access to the phpmyadmin configuration, and it’s the same IP.

    Note : I’ve configured a static IP adress.

    I really don’t understand why.. If you have any inputs 🙂

    Regards,

    Romain

    Reply
    • Leron Amin says

      August 22, 2018 at 8:27 am

      Hi Coki,

      Did you configure a domain name for the website on the VM?

      If so, over time, the IP will begin to resolve to the domain name.

      Also, what do you mean by, “At the begining It was possible to connect the compute engine VM via the IP which appeared in the “Deployment Manager” menu but now I don’t know why it don’t works anymore, my browser is loading everytime”?

      Talk to you soon,
      Joe

    • Coki says

      August 23, 2018 at 12:01 pm

      Hi,

      I configured a domain name for the website on the VM at the begining and after I deleted the cloud DNS API because I was thinking that it might be the cause of the issue.

      So now I’ve got a VM with WordPress click and deploy on it and a static external IP for the VM.

      When I’ve launched the VM with wordpress on it for the first time, it was possible to go to the wordpress admin panel but now I just cannot. I just can connect to the PHPmyadmin panel.

      Thank for your help,

      Coki

    • Leron Amin says

      August 23, 2018 at 12:29 pm

      Hi Coki,

      Deleting the Cloud DNS API will break your website configuration.

      You will have to re-enable it and make sure your DNS A record matches up with the IP of your domain.

      It sounds to me like there is a DNS issues – either your domains/IP address aren’t matching up, or you have a redirect in your Apache configuration that it causing problems.

      Talk to you soon,
      Joe

  8. Egor says

    August 7, 2018 at 2:08 am

    Hello, thank you for your tuts, they help a lot. But, look, after I rebooted my instance my ephemeral IP has changed. (I was doing your auto back up tut) I reserved this new ephemeral IP as a static IP, What happens now I got the redirect to my old ephemeral IP, which happens even when I create a new VM under another static IP. How I fix that, as it is empty now?

    Reply
    • Leron Amin says

      August 8, 2018 at 1:33 pm

      Hi Egor,

      This is a problem with your browsers cache and with DNS propagation. Unfortunately, it can sometimes take a day or two for the IP address change to fully take effect.

      The first workaround is to try visiting your website through a free proxy/VPN and see if your old IP is still loading; this will bypass your browsers cache and give you an idea of which IP address your website is using in real-time.

      As I mentioned before, this change can take awhile (sometimes a couple of days) – especially if your website had been using the same IP for a long time.

      Hope this helps and let me know if you have any questions,
      Joe

  9. Allen says

    July 1, 2018 at 5:48 pm

    Good descriptions, very useful. I did this on 7/1/18 so a little has changed in the layout of the GCP dashboard, but not enough to cause any problems following along with the video. So thanks for the work, saved me a lot of research and time! I do have one suggestion. like to read the feedback, before I do something like this. It would be great to have a button, arrow ect, to send you back to the top of the page.
    Thanks,
    Al

    Reply
    • Leron Amin says

      July 3, 2018 at 11:02 am

      Hi Al,

      I’m glad you were able to follow along despite the layout changes.

      I will look into implementing a ‘back-to-top’ button, as I know many users will find this functionality useful.

      Talk to you soon,
      Joe

  10. Swapan Kumar Manna says

    May 19, 2018 at 9:28 am

    Hello Leron,

    Very nice tutorial. At first, I was not aware of it, now I understood what it really means. My website is running on GCP and learning day-by-day, since the first thing I do visit your website to get a solution. Earlier I just created an instance and installed Click-to-deploy WordPress. Now, I’m this to another Managed Group Instance. Since this is news website and traffic is increasing, I want to make sure we can handle traffic in future, that should have a proper Load Balancer and CDN. I have created Managed group instance and reserved an IP, but a day after I see the IP has changed an created another Ephemeral IP. Here is the screenshot – https://bit.ly/2IRDesF

    Can you please let how I can reserve IP in Managed group? Or is this correct? Do I need to just reserve on VM Instance rather than concentrating Managed Group IP?

    A reply will much be appreciated 🙂

    Reply
    • Leron Amin says

      May 19, 2018 at 5:03 pm

      Hi Swapan,

      When used with a load balancer, instances in your instance group are meant to be dynamic – meaning they spin up (and die off) when certain criteria are met as defined by a health check or an autoscaler policy that you define when you configure the instance group. For this reason, it is not important to have a static IP address on the instance’s themselves, as the global (static) IP address is attached to the load balancer itself, which is required to distribute traffic among the VMs in your instance group.

      Also – remember that load balancers and managed instance groups are expensive to both maintain (usage fees to Google) and configure (developer fees), so resort to load balancing only when you’re running an application with the profitability and daily traffic to justify the cost.

      Let me know if you have any questions,
      Joe

  11. Addy says

    May 15, 2018 at 3:23 am

    Make a tutorial on static site how to create bucket on google cloud

    Reply
    • Leron Amin says

      May 15, 2018 at 10:17 pm

      Will do – thanks for the suggestion Addy!
      Talk to you soon,
      Joe

  12. Jane says

    April 8, 2018 at 5:10 pm

    Hi thanks for nice tutorials on gcloud and wordpress. i am using bitnami version of wordpress. i assigned static ip address and now i am getting 500 server error. what should i do?

    Reply
    • Leron Amin says

      April 9, 2018 at 12:34 pm

      Hi Jane,
      Go to your CloudDNS and click on the zone for your domain name.
      Next, make sure the IP address assigned to the A record matches the IP of your instance from the Compute engine > VM Instances page. Please let me know if you have any questions,
      Joe

    • Wann says

      March 2, 2019 at 11:36 pm

      I also experienced the same incident. It took several times to reload so that the page could be accessed. Even sometimes a “page not found” or “page does not respond” warning appears. Can you help find a solution?

    • Leron Amin says

      March 6, 2019 at 6:01 pm

      Hi Wann,

      The first thing that I’d recommend doing is to check your DNS – this is usually the root of these types of errors. Also, make sure that your DNS is configured for the correct instance IP address.

      Let me know if you have questions,
      Joe

  13. Andrew says

    February 28, 2018 at 2:16 pm

    There seems to be a change to Google Cloud Platform External IP address steps.

    I followed your tutorial instructions. When I tried to select “Static” from “Ephemeral”, I was shown an option to “Reserve a new static IP address”. I had to key in a Name in lower case, with no spaces….? Is it possible for static IP address to be lower case letters???

    Please see screen grab below.
    http://i64.tinypic.com/34ybot5.jpg

    I could not enter the ephemeral external IP address already assigned to my website.

    I am worried that if I enter a new name, it will effect website functioning later.

    What should I do?

    Reply
    • Leron Amin says

      February 28, 2018 at 2:29 pm

      Hi Andrew,

      It doesn’t matter what name you assign to your IP address.

      In the name field, you are only choosing what to call the static IP address, you are not choosing the static IP address itself. If you are switching an ephemeral IP address to static, then the IP address has already been assigned.

      Let me know if you have any questions,
      Joe

  14. Greg says

    February 21, 2018 at 3:45 pm

    Hi, thanks for the great tutorial. I don’t have much experience with gcloud, but needed some suggestions. If I am going to upgrade my server to high memory, can I reserve the IP of the instance and then restart the instance and after that delete the reserved IP. Will this lead to any issues.

    Reply
    • Leron Amin says

      February 22, 2018 at 12:05 pm

      Hi Greg,

      It won’t causes any issue with the website itself – but it will probably cause some networking issues if the virtual machine running your website was already integrated with that IP address.

      That being said, I don’t understand what the purpose would be of doing what you described in your question. If you could provide more details about your end-goal, I can offer some additional suggestions!

      Talk to you soon,
      Joe

  15. David says

    January 4, 2018 at 12:08 pm

    I never ever leave comments in posts but your blog has helped me SO much that I am seriously thankful for all the tutorials you have provided (much better than the ones created by Google even!). Thank you so so so much!!! It was straightforward and helped me get on the Google Cloud Platform… also, you should submit some of these to be added to Google’s tutorials, I think they would benefit greatly (and may provide monetary incentives back to you). Thanks again Leron!!!

    Reply
    • Leron Amin says

      January 4, 2018 at 2:30 pm

      Hey David,
      Thanks so much for the feedback!
      I am glad to hear that the tutorials have been helpful to you. 🙂

  16. mohd zafar says

    December 30, 2017 at 11:19 pm

    Excellent job amin .
    1. Can you tell me if we are getting 300 dollar. And one year free.. that means 1 year we will not be charged and if if it charges 7 dollar that will be deducted from 300 dollar. Means 7 ×12 equal 84 will be deducted… Is it???

    Means first year will be free??

    2. Can we add google ads on wordpress sites.???

    I am starting a new wordpress website should I go with blue host hostgator or I should avail one year free google cloud hosting to run wordpress

    Plz tell me …..

    My email is
    Khanzafar44@gmail.com

    Reply
    • Leron Amin says

      December 30, 2017 at 11:42 pm

      Hi Mohd,

      Thanks for the feedback!

      You are getting a $300 credit to your Google Cloud account, which will disappear after one year if you do not use the full $300.

      Certain necessary service charges, such as DNS charges, are not covered under the free tier. This means that, even though you have the $300 credit, it will still cost your around $1-2 dollar per month to host your WordPress website on Google Cloud.

      Yes you can add Google ads to your website, but Google will not approve you to use Google Ads (AdSense) unless your website has enough traffic.

      If you’re just looking for the simplest hosting provider, go with BlueHost.

      Google Cloud is a very powerful platform for hosting websites, but there is a steep learning curve.

      Let me know if you have any questions,
      Joe

  17. TARIK says

    November 29, 2017 at 2:25 pm

    hello joe
    great job as ever
    my question is
    how much cost static IP
    i didn’t find answer in documentation
    and in 3 GCP i mean for 3 clients in the first i have always 300$ of credit
    the second 225$ and 65 day left
    i didn’t understand how they calculate , you know it’s the same installation( absolutely the same )

    thank you for everything

    Reply
    • Leron Amin says

      November 29, 2017 at 3:04 pm

      Hey Tarik,

      In the cost example I used in this tutorial, the cost of using a static IP address was $7 dollars per month for the instance. I am not sure if this is an anomaly or not, but the cost was taken directly from the billing page.

      For that reason, you could probably expect to incur a similar charge for using a static IP. You should remember, though, that you can typically run your instances without a static IP without incurring any issues – however, if you can’t allow for even the slightest possibility of website downtime, then you should stick to using a static IP address.

      I hope this answers your question! 🙂
      Joe

    • TARIK says

      December 2, 2017 at 6:09 am

      Yes very clear
      thank you bro

      Tarik

    • Leron Amin says

      December 4, 2017 at 1:01 pm

      Hi Tarik!
      I am glad that you found the instructions easy to follow! 🙂

  18. Jovica says

    September 15, 2017 at 1:44 pm

    What is the use of the static IP address?

    Reply
    • Leron Amin says

      September 15, 2017 at 2:23 pm

      Hi Jovica,
      By default, your website is assigned an ephemeral [not permanent] IP address. However, many of your website’s components depend on a static [permanent] IP address in order to function properly. For example, users who do not use a static IP address may notice their website breaking down every time their server restarts.
      Hope this answers your question!
      Joe

  19. Leron Amin says

    August 29, 2017 at 12:52 am

    What did you think of this tutorial?
    Please share your questions and comments below!
    Thanks,
    Joe

    Reply
    • Satz says

      October 22, 2017 at 3:42 am

      I Don’t generally comment on websites I read But Your tutorial has really helped me move my website under 30 mins.

      I understand that when an instance restarts it changes the IP address. What if we don’t restart instance at all? Can we live with Ephemeral IP Address for a small WordPress site(10 – 20 visits a day)? or do we ‘have’ to use static IP for WordPress?

    • Leron Amin says

      October 22, 2017 at 12:42 pm

      Hey Satz,

      Great question! You can absolutely live with an ephemeral IP address, and if you are hosting a small WordPress site with 10-20 visits a day, there is really no reason to spend the extra money go to with static.

      The static option is more important for large WordPress websites, with lots of DNS records and other advanced features that require a permanent IP address.

      I hope this answers your question! 🙂

      Joe

Leave a Reply Cancel reply

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

Want Exclusive Tutorials?

Welcome to One Page Zen!

Through this blog I hope to introduce web developers to cloud computing!

author-bio

facebook-support-group kinsta-cloud-hosting

Want Exclusive Tutorials?


Contact | Sitemap | Legal | Privacy Policy | Affiliate Disclosure
      Copyright © 2017 - 2019 One Page Zen
Share this Article

Email sent!