Google Compute Engine

Google Compute Engine (GCE) lets you create and run a virtual machine (VM) on the Google infrastructure. The VM can be used as an origin with your Fastly service once you set up and configure your VM instance and link your instance to a Fastly service.

Creating and setting up your GCE instance

  1. Sign up for Google Compute Engine and start the basic set up. If you are already signed up and at your dashboard, click the Get started link in the Try Compute Engine area.

  2. Create or select a project to hold your origin's data.

    Google Compute Engine create project

  3. Click Create instance to set up your VM. You can set up your instance using either Windows or Linux.

    Google Compute Engine create new instance

  4. Fill in the necessary fields and click Create. When making your firewall selection, select either Allow HTTPS traffic (port 443) or Allow HTTP traffic (port 80); you will use one of those ports when you create your new origin in your Fastly service. If you select HTTPS traffic, you need to configure the VM to respond on port 443 with a valid TLS certificate.

    Google Compute Engine VM instance

  5. Make note of the following information for when you create your new origin in your Fastly service:

    • The instance's IP address (located in the External IP column at the bottom of the page). You'll use this in the Address field when you create your new origin.
    • The zone you are using (located in the Zone column at the bottom of the page). You'll use this to guide your selection of an appropriate shielding location for your origin.

Creating a new origin in your Fastly service for your GCE account

Link your GCE account to a Fastly service following the steps below.

  1. Log in to the Fastly web interface.
  2. Create a new service if you don't already have one set up.

  3. Follow the instructions for working with hosts. You'll add specific details about your origin server when you fill out the Create a host fields:

    • In the Name field, enter the name of your server (for example, Google Compute Engine).
    • In the Address field, enter the IP address of your server. This should match the port that you selected in the GCE interface.
    • From the Shielding menu, select an interconnect location from the list of shielding locations.

Interconnect locations

Interconnect locations allow you to establish direct links with Google's network edge when you choose your shielding location. By selecting one of the locations listed in our developer documentation, you will be eligible to receive discounted pricing from Google CDN Interconnect for traffic traveling from Google Cloud Platform to Fastly's network. Most customers select the interconnect closest to their origin. Review our caveats of shielding and select an interconnect accordingly.

Creating new domains for GCE to respond to

  1. Log in to the Fastly web interface.
  2. From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
  3. Click the Edit configuration button and then select the option to clone the active version. The Domains page appears.
  4. Click the Create domain button. The Create a domain page appears.

    new domain

  5. In the Domain Name field, enter the name that users will enter in their browsers to access your site.

  6. In the Comment field, optionally enter a comment that describes your domain.

  7. Click the Create button. The new domain appears on the Domains page.

  8. Click the Activate button to deploy your configuration changes.

Creating a CNAME record

You can now test your configuration. In the example above, your domain would appear as After you test and you're satisfied with the results, create a CNAME record for your domain (e.g., pointing to

This article describes an integration with a service provided by a third party. Read our note on integrations for details.

Was this guide helpful?

Do not use this form to send sensitive information. If you need assistance, contact support.