Manage domains and subdomains between multiples app engine/compute engine instances

domainsgoogle-cloud-platformsubdomain

The question is simple. How can "distribute" domains and subdomains between app engine/compute engine in Google Cloud?
For example, I have the following domain:
example.com
I want to use the subdomain www.example.com to host static/dynamic web pages related to my company.
Buy another domain, for example, application.com, and here host a web application built in ASP.NET or another framework, I don't know.
Use the subdomain api.example.com to host a ASP.NET Core MVC/Web API application that handles all API requests (related to user data, for example if the application is a chat app) coming from application.com application.

Summary
Domain: example.com
Subdomains:
www.example.com -> Host static/dynamic pages related to my company
api.example.com -> Manage all users, databases, and has the API controllers

Domain: application.com
Subdomains:
www.application.com -> Host chat app for example

How do I have to do it? Create multiple Google Cloud projects? Or multiple instances of App engine/Compute engine? And how can I "distribute" the domains and subdomains explained above

Best Answer

You're able to manage domains and subdomains between multiples App Engine/Compute Engine instances. It's quite broad question, but it general you can follow steps below:

  1. Register domain names using Google Domains or other registrar.
  2. Decide which DNS hosting you prefer: provided by registrar or Cloud DNS.
  3. (in case of switching to Cloud DNS) Create new zones for your domains (you can follow Quickstart for Cloud DNS).
  4. (in case of switching to Cloud DNS) Update name servers at the registrar side for each domain.
  5. To determine how many projects you need have a look at the documentation Creating and managing projects to find more details:

    Google Cloud projects form the basis for creating, enabling, and using all Google Cloud services including managing APIs, enabling billing, adding and removing collaborators, and managing permissions for Google Cloud resources.

  6. Using App Engine or/and Compute Engine depends on your use case and preferences:

Please provide more details in your question or post a new one if you need more detailed instructions.

Related Topic