Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
In the
Name your bucket section, enter a unique name for your
bucket.
Click Continue.
In the
Choose where to store your data section, do the following:
For Location type, select Region, and then
select us-east1 (South Carolina) from the list.
Click Continue.
In the
Choose a storage class for your data section, do the
following:
Select Set a default class, and then select Standard.
Click Continue.
In the
Choose how to control access to objects section, do the following:
Clear the Enforce public access prevention on this bucket
checkbox.
For Access control, select Uniform.
Click Continue.
In the
Choose how to protect object data section, keep the selected defaults, and
then click
Create.
Upload an object into the bucket
Save the following image on your device:
On the Bucket details page, on the
Objectstab, click
Upload files
.
In the file dialog, select the file that you downloaded.
After the upload completes, the filename and information about the file, such
as its size and file type, are displayed.
Make your bucket public
On the Bucket details page, click the
Permissions tab.
Ensure that the view is set to
View by principals, and then click
Grant access.
The Add principals pane is displayed.
In the
New principals field, enter allUsers.
In the
Select a rolelist, select Cloud Storage
> Storage Object Viewer.
Click
Save.
On the Are you sure you want to make this resource public? page,
click Allow public access.
To verify that the object has been shared publicly, click the
Objects tab to return to the list of objects.
Your object's
Public accesscolumn should read Public to
internet. The Copy URL button provides a shareable URL
similar to the following:
On the New origin page, in the
Origin name
section, enter a name for your origin.
For
Origin type, select Backend bucket.
For
Define your backend bucket, select New backend bucket.
In the Cloud Storage bucket field, click Browse.
Select the Cloud Storage bucket that you created earlier, click
Select, and then click Next.
In the
Attach a load balancer section, select Create new load balancer
for me, enter a name for the load balancer, and then click Next.
For Cache performance, keep the selected defaults, and then click
Done.
The new origin appears in the list of origins. It might take a few minutes
for the origin to be fully created. Proceed to the next step only after you
see a notification indicating that the origin has been created.
Test Cloud CDN
In the Google Cloud console, go to the Load balancing page.
Click the
name
of the load balancer that you created
earlier.
The Load balancer details page is displayed.
Note the IPv4 addresses displayed under
IP:Port.
Test Cloud CDN by entering the following URL with the load
balancer's IP address in a new browser tab:
http://IP_ADDRESS/kitten.png
Your browser should render a page with the uploaded image.
Refresh the page multiple times.
Return to the Load balancer details page, and then click Monitoring.
After a few minutes, observe the served traffic.
Traffic that is served directly from your backend bucket is labeled
SERVED_FROM_BACKEND_BUCKET. Traffic that is served from
Cloud CDN is labeled SERVED_FROM_CACHE. For more information,
see Monitoring metrics.
Clean up
To avoid incurring charges to your Google Cloud account for
the resources used on this page, follow these steps.
Delete the load balancer and the backend bucket:
In the Google Cloud console, go to the Load balancing page.
Select the check box next to the load balancer that you created, and
then click Delete.
On the page that opens, select the check box next to the backend
bucket that you created, and then confirm that you want to delete the
load balancer and the selected resources.
Delete the Cloud Storage bucket:
In the Google Cloud console, go to the Cloud Storage Buckets page.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThis guide demonstrates setting up a backend bucket as an origin for Cloud CDN using the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eYou'll create a Cloud Storage bucket, upload an object, and make it publicly accessible to use it as an origin.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves creating a backend bucket, setting up an external Application Load Balancer, and linking them.\u003c/p\u003e\n"],["\u003cp\u003eYou can test the Cloud CDN setup by accessing the uploaded image via the load balancer's IP address, observing traffic served from either the backend or the cache.\u003c/p\u003e\n"],["\u003cp\u003eThe guide details the steps required to clean up and delete the created resources.\u003c/p\u003e\n"]]],[],null,["# Quickstart: Set up a backend bucket as an origin\n\nSet up a backend bucket as an origin for Cloud CDN\n==================================================\n\nThis quickstart shows you how to set up a backend bucket as an origin for\nCloud CDN by using the Google Cloud console.\n\n*** ** * ** ***\n\nTo follow step-by-step guidance for this task directly in the\nGoogle Cloud console, click **Guide me**:\n\n[Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?walkthrough_id=cdn--console_quickstart)\n\n*** ** * ** ***\n\n\nBefore you begin\n----------------\n\nSign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n\nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\n| **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n[Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n\n[Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project). \nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\n| **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n[Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n\n[Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\nCreate a Cloud Storage bucket\n-----------------------------\n\n\n*Buckets* are the basic containers that hold your data in\nCloud Storage.\n\n\nTo create a bucket, follow these steps:\n\n1. In the Google Cloud console, go to the Cloud Storage **Buckets** page. \n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n2. Click add_box **Create** . Show me.\n3.\n In the\n **Name your bucket** section, enter a unique name for your\n bucket.\n\n\n | **Warning:** Do not include sensitive information in the bucket name. The bucket namespace is global and publicly visible.\n\n \u003cbr /\u003e\n\n\n Click **Continue**.\n4. In the **Choose where to store your data** section, do the following:\n 1. For **Location type** , select **Region** , and then select `us-east1 (South Carolina)` from the list.\n 2. Click **Continue**.\n5. In the **Choose a storage class for your data** section, do the following:\n 1. Select **Set a default class** , and then select **Standard**.\n 2. Click **Continue**.\n6. In the **Choose how to control access to objects** section, do the following:\n - Clear the **Enforce public access prevention on this bucket** checkbox.\n - For **Access control** , select **Uniform**.\n - Click **Continue**.\n7. In the **Choose how to protect object data** section, keep the selected defaults, and then click **Create** .\n\nUpload an object into the bucket\n--------------------------------\n\n1. Save the following image on your device:\n\n2. On the **Bucket details** page, on the **Objects** tab, click **Upload files** .\n3. In the file dialog, select the file that you downloaded.\n\nAfter the upload completes, the filename and information about the file, such as its size and file type, are displayed.\n\nMake your bucket public\n-----------------------\n\n1. On the **Bucket details** page, click the **Permissions** tab.\n2. Ensure that the view is set to\n **View by principals** , and then click\n **Grant access** .\n\n The **Add principals** pane is displayed.\n3. In the **New principals** field, enter `allUsers`.\n4. In the **Select a role** list, select **Cloud Storage\n \\\u003e Storage Object Viewer**.\n5. Click **Save**.\n6. On the **Are you sure you want to make this resource public?** page, click **Allow public access**.\n7. To verify that the object has been shared publicly, click the **Objects** tab to return to the list of objects. Your object's **Public access** column should read **Public to\n internet** . The **Copy URL** button provides a shareable URL similar to the following:\n\n\n `https://storage.googleapis.com/`\u003cvar translate=\"no\"\u003eYOUR_BUCKET_NAME\u003c/var\u003e`/kitten.png`\n\nCreate a backend bucket\n-----------------------\n\nTo create a backend bucket and an external Application Load Balancer, do the following:\n\n1.\n In the Google Cloud console, go to the **Cloud CDN** page.\n\n [Go to Cloud CDN](https://console.cloud.google.com/net-services/cdn)\n\n \u003cbr /\u003e\n\n2. Click\n **Add origin** .\n\n3. On the **New origin** page, in the\n **Origin name**\n section, enter a name for your origin.\n\n4. For\n **Origin type** , select **Backend bucket**.\n\n5. For\n **Define your backend bucket** , select **New backend bucket**.\n\n6. In the **Cloud Storage bucket** field, click **Browse**.\n\n7. Select the Cloud Storage bucket that you created earlier, click\n **Select** , and then click **Next**.\n\n8. In the\n **Attach a load balancer** section, select **Create new load balancer\n for me** , enter a name for the load balancer, and then click **Next**.\n\n9. For **Cache performance** , keep the selected defaults, and then click\n **Done** .\n\n The new origin appears in the list of origins. It might take a few minutes\n for the origin to be fully created. Proceed to the next step only after you\n see a notification indicating that the origin has been created.\n\nTest Cloud CDN\n--------------\n\n1. In the Google Cloud console, go to the **Load balancing** page.\n\n [Go to Load balancing](https://console.cloud.google.com/net-services/loadbalancing/list/loadBalancers)\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n2. Click the\n name of the load balancer that you created\n earlier.\n\n The **Load balancer details** page is displayed.\n3. Note the IPv4 addresses displayed under\n **IP:Port** .\n\n4. Test Cloud CDN by entering the following URL with the load\n balancer's IP address in a new browser tab:\n\n http://\u003cvar translate=\"no\"\u003eIP_ADDRESS\u003c/var\u003e/kitten.png\n\n Your browser should render a page with the uploaded image.\n5. Refresh the page multiple times.\n\n6. Return to the **Load balancer details** page, and then click **Monitoring**.\n\n7. After a few minutes, observe the served traffic.\n\n Traffic that is served directly from your backend bucket is labeled\n **SERVED_FROM_BACKEND_BUCKET** . Traffic that is served from\n Cloud CDN is labeled **SERVED_FROM_CACHE** . For more information,\n see [Monitoring metrics](/load-balancing/docs/https/https-logging-monitoring#monitoring_metrics).\n\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n1. Delete the load balancer and the backend bucket:\n\n 1. In the Google Cloud console, go to the **Load balancing** page.\n\n [Go to Load balancing](https://console.cloud.google.com/net-services/loadbalancing/list/loadBalancers)\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n 2. Select the check box next to the load balancer that you created, and\n then click **Delete**.\n\n 3. On the page that opens, select the check box next to the backend\n bucket that you created, and then confirm that you want to delete the\n load balancer and the selected resources.\n\n2. Delete the Cloud Storage bucket:\n\n 1. In the Google Cloud console, go to the Cloud Storage **Buckets** page. \n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n 2. Select the checkbox next to the bucket that you created, and then click **Delete**.\n 3. In the **Delete bucket** dialog, confirm that you want to delete the bucket, and then click **Delete**.\n\n\nWhat's next\n-----------\n\nHere's what you can do next:\n\n- [Set up Cloud CDN](/cdn/docs/using-cdn)\n- [Automate Cloud CDN setup with Terraform](/cdn/docs/cdn-terraform-examples)\n- [Authenticate content](/cdn/docs/private-content)"]]