My aim is this

  1. Host multiple websites/apps on IIS that is configured on my windows server instance on Google cloud e.g example.com (to host the website), api.example.com (to host api endpoints), app.example.com (to host the web app). The parent domain example.com is configured on godaddy and currently points to a static ip. I've set up the subdomains (api.example.com, app.example.com) and i need to point them to separate ips.
  2. Have each website use attached to individual static IPS already reserved
  3. Requests are routed to the exact app it is meant for based on the ip addressing

What I've done

  1. Created a windows server 2012 instance on google cloud
  2. Attached a static ip to the instance and currently have one website pointing to that static ip
  3. Reserved extra static ip and attempted to attach to the existing instance


Google cloud won't allow me attach an ip to an existing intance that already has an ip (fair enough). so I thought it would make sense creating multiple network interfaces and attach separate IP to them. However google cloud docs says 1. You can only configure a network interface when you create an instance. - I really do not have the luxury of recreating this instance 2. You cannot attach multiple network interfaces to the same VPC network. - I do not have needs for multiple vpc network. I'm trying to have IIS as a web server hosting multiple applications that can each be reached via its own IP

I also attempted IP Forwarding rules but it turns out It can only be toggled on creation and since I have a running instance with IP forwarding turned off, I would have to recreate the instance to fit my needs.

Is there a way out for me? what do I have to do?

  • Excuse me Sir, do you have a moment to talk about our Lord and Saviour, Name-based virtual hosts? – Esa Jokinen Apr 11 '18 at 17:24
  • @EsaJokinen I do not seem to understand. – ibnhamza Apr 11 '18 at 17:26
  • HTTP/1.1 was released in 1999, including a tecnology for hosting several sites on one IP address. SNI from 2011 does the same for HTTPS and is the widely accepted standard today. Having multiple IP addresses has been made this hard only for one reason: you do not need multiple IP addresses. – Esa Jokinen Apr 11 '18 at 17:43
  • @EsaJokinen how do i achieve the aim in the question? – ibnhamza Apr 11 '18 at 17:46

You can only have a single external IP per network interface. You can only have 1 network interface per VPC network You cannot add network interfaces after instance creation. You could create an image of your instance so that you can recreate it easily.

The IP forwarding option on the instance allows the instance to pass IP traffic through to another destination. You can use IP Forwarding rules for your use case.

Alternatively, you can configure individual TCP Load Balancers (this is similar to using forwarding rules), or use a single HTTP(S) Load Balancer to handle all of your websites using a single IP address

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.