-
Notifications
You must be signed in to change notification settings - Fork 10k
[R2] Update custom domain docs to align with new UI #22124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Oxyjun
merged 3 commits into
cloudflare:production
from
smellercf:Update-Custom-Domain-Docs
May 6, 2025
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,10 +12,12 @@ Public Bucket is a feature that allows users to expose the contents of their R2 | |
| Public buckets can be set up in either one of two ways: | ||
|
|
||
| - Expose your bucket as a custom domain under your control. | ||
| - Expose your bucket as a Cloudflare-managed subdomain under `https://r2.dev`. | ||
| - Expose your bucket using a Cloudflare-managed `https://r2.dev` subdomain for non-production use cases. | ||
|
|
||
| To configure WAF custom rules, caching, access controls, or bot management for your bucket, you must do so through a custom domain. | ||
| Using a custom domain does not require enabling `r2.dev`. | ||
| These options can be used independently or together, enabling custom domains does not require enabling `r2.dev` access. | ||
|
|
||
| To use features like WAF custom rules, caching, access controls, or bot management, you must configure your bucket behind a custom domain. | ||
| These capabilities are not available when using the `r2.dev` development url. | ||
Oxyjun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| :::note | ||
|
|
||
|
|
@@ -33,7 +35,8 @@ Configure your cache to use [Smart Tiered Cache](/cache/how-to/tiered-cache/#sma | |
|
|
||
| :::note | ||
|
|
||
| By default, only certain file types are cached. To cache all files in your bucket, you must set a Cache Everything page rule. For more information on default Cache behavior and how to customize it, refer to [Default Cache Behavior](/cache/concepts/default-cache-behavior/#default-cached-file-extensions) | ||
| By default, only certain file types are cached. To cache all files in your bucket, you must set a Cache Everything page rule. | ||
| For more information on default Cache behavior and how to customize it, refer to [Default Cache Behavior](/cache/concepts/default-cache-behavior/#default-cached-file-extensions) | ||
Oxyjun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ::: | ||
|
|
||
|
|
@@ -46,14 +49,23 @@ To restrict access to your custom domain's bucket, use Cloudflare's existing sec | |
|
|
||
| :::caution | ||
|
|
||
| Disable public access to your [`r2.dev` subdomain](#disable-managed-public-access) when using products like WAF or Cloudflare Access. If you do not disable public access, your bucket will remain publicly available through your `r2.dev` subdomain. | ||
| Disable public access to your [`r2.dev` subdomain](#disable-public-development-url) when using products like WAF or Cloudflare Access. If you do not disable public access, your bucket will remain publicly available through your `r2.dev` subdomain. | ||
|
|
||
| ::: | ||
|
|
||
| ### Minimum TLS Version | ||
|
|
||
| To specify the minimum TLS version of a custom hostname of an R2 bucket, you can issue an API call to edit [R2 custom domain settings](/api/resources/r2/subresources/buckets/subresources/domains/subresources/custom/methods/update/). | ||
|
|
||
| ## Add your domain to Cloudflare | ||
|
|
||
| The domain being used must have been added as a [zone](/fundamentals/setup/accounts-and-zones/#zones) in the same account as the R2 bucket. | ||
|
|
||
| - If your domain is already managed by Cloudflare, you can proceed to Connect a bucket to a custom domain. | ||
|
||
| - If your domain is not managed by Cloudflare, you’ll need to set it up using a [partial (CNAME) setup](/dns/zone-setups/partial-setup/) to add it to your account. | ||
Oxyjun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Once the domain exists in your Cloudflare account (regardless of setup type), you can link it to your bucket. | ||
|
|
||
| ## Connect a bucket to a custom domain | ||
|
|
||
| <Render file="custom-domain-steps" /> | ||
|
|
@@ -62,14 +74,11 @@ To view the added DNS record, select **...** next to the connected domain and se | |
|
|
||
| :::note | ||
|
|
||
| If the zone is on an Enterprise plan, make sure that you [release the zone hold](/fundamentals/setup/account/account-security/zone-holds/#release-zone-holds) before adding the custom domain. A zone hold would prevent the custom subdomain from activating. | ||
| If the zone is on an Enterprise plan, make sure that you [release the zone hold](/fundamentals/setup/account/account-security/zone-holds/#release-zone-holds) before adding the custom domain. | ||
| A zone hold would prevent the custom subdomain from activating. | ||
Oxyjun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ::: | ||
|
|
||
| ### Restrictions | ||
|
|
||
| There is a restriction when using custom domains to access R2 buckets. The domain being used must have been added as a [zone](/fundamentals/setup/accounts-and-zones/#zones) in the same account as the R2 bucket. | ||
|
|
||
| ## Disable domain access | ||
|
|
||
| Disabling a domain will turn off public access to your bucket through that domain. Access through other domains or the managed `r2.dev` subdomain are unaffected. | ||
|
|
@@ -78,57 +87,60 @@ The specified domain will also remain connected to R2 until you remove it or del | |
| To disable a domain: | ||
|
|
||
| 1. In **R2**, select the bucket you want to modify. | ||
| 2. On the bucket page, Select **Settings**. | ||
| 3. Under **Public access** > **Custom Domains**, select **Connect Domain**. | ||
| 4. Next to the domain you want to disable, select **...** and **Disable domain**. | ||
| 5. The badge under **Access to Bucket** will update to **Not allowed**. | ||
| 2. On the bucket page, Select **Settings**, go to **Custom Domains**. | ||
| 3. Next to the domain you want to disable, select **...** and **Disable domain**. | ||
| 4. The badge under **Access to Bucket** will update to **Not allowed**. | ||
|
|
||
| ## Remove domain | ||
|
|
||
| Removing a domain will remove custom domain configuration that you have set up on the dashboard. Your bucket will still be publicly accessible. | ||
| Removing a custom domain will disconnect it from your bucket and delete its configuration from the dashboard. | ||
| Your bucket will remain publicly accessible through any other enabled access method, but the domain will no longer appear in the connected domains list. | ||
Oxyjun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To remove a domain: | ||
|
|
||
| 1. In **R2**, select the bucket you want to modify. | ||
| 2. On the bucket page, select **Settings**. | ||
| 3. Under **Public access** > **Custom Domains**, select **Connect Domain**. | ||
| 4. Next to the domain you want to disable, select **...** and **Remove domain**. | ||
| 5. Select ‘Remove domain’ in the confirmation window. The CNAME record pointing to the domain will also be removed as part of this step. You can always add the domain again. | ||
|
|
||
| The domain is no longer connected to your bucket and will no longer appear in the connected domains list. | ||
| 2. On the bucket page, Select **Settings**, go to **Custom Domains**. | ||
| 3. Next to the domain you want to disable, select **...** and **Remove domain**. | ||
| 4. Select ‘Remove domain’ in the confirmation window. The CNAME record pointing to the domain will also be removed as part of this step. You can always add the domain again. | ||
Oxyjun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Enable managed public access | ||
| ## Public Development URL | ||
Oxyjun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| When you enable managed public access for your bucket, the content of your bucket is available to the Internet through a Cloudflare-managed `r2.dev` subdomain. | ||
| Expose the contents of this R2 bucket to the internet through a Cloudflare-managed r2.dev subdomain. | ||
| This endpoint is intended for non-production traffic. | ||
Oxyjun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| :::note | ||
|
|
||
| Public access through `r2.dev` subdomains are rate limited and should only be used for development purposes. | ||
|
|
||
| To enable access management, Cache and bot management features, you must set up a custom domain when enabling public access to your bucket. | ||
|
|
||
| Avoid creating a CNAME record pointing to the `r2.dev` subdomain. This is an **unsupported access path**, and we cannot guarantee consistent reliability or performance. | ||
| For production use, [add your domain to Cloudflare](#add-your-domain-to-cloudflare) instead. | ||
Oxyjun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ::: | ||
|
|
||
| ### Enable public development url | ||
|
|
||
| When you enable public development URL access for your bucket, its contents become available on the internet through a Cloudflare-managed `r2.dev` subdomain. | ||
|
|
||
| To enable access through `r2.dev` for your buckets: | ||
|
|
||
| 1. In **R2**, select the bucket you want to modify. | ||
| 2. On the bucket page, select **Settings**. | ||
| 3. In **Settings**, go to **Public Access**. | ||
| 4. Under **R2.dev subdomain**, select **Allow Access**. | ||
| 5. In **Allow Public Access?**, confirm your choice by typing ‘allow’ to confirm and select **Allow**. | ||
| 6. You can now access the bucket and its objects using the Public Bucket URL. | ||
| 3. Under **Public Development URL**, select **Enable**. | ||
| 4. In **Allow Public Access?**, confirm your choice by typing ‘allow’ to confirm and select **Allow**. | ||
| 5. You can now access the bucket and its objects using the Public Bucket URL. | ||
|
|
||
| You can review if your bucket is publicly accessible by going to your bucket and checking that **Public URL Access** states **Allowed**. | ||
| To verify that your bucket is publicly accessible, check that **Public URL Access** shows **Allowed** in you bucket settings. | ||
|
|
||
| ## Disable managed public access | ||
| ### Disable public development url | ||
|
|
||
| Your bucket will not be exposed to the Internet as an `r2.dev` subdomain after you disable public access. If you have connected other domains, the bucket will remain accessible on those domains. | ||
| Disabling public development URL access removes your bucket’s exposure through the `r2.dev` subdomain. | ||
| The bucket and its objects will no longer be accessible via the Public Bucket URL. | ||
| If you’ve connected other domains, the bucket will remain accessible through those. | ||
Oxyjun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To disable public access for your bucket: | ||
|
|
||
| 1. In **R2**, select the bucket you want to modify. | ||
| 2. On the bucket page, select **Settings**. | ||
| 3. Under **Bucket Details** > **R2.dev subdomain**, select **Disallow Access**. | ||
| 3. Under **Public Development URL**, select **Disable**. | ||
| 4. In **Disallow Public Access?**, type ‘disallow’ to confirm and select **Disallow**. | ||
|
|
||
| Your bucket and its objects can no longer be accessed using the Public Bucket URL. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| --- | ||
| {} | ||
|
|
||
| --- | ||
|
|
||
| 1. Go to **R2** and select your bucket. | ||
| 2. On the bucket page, select **Settings**. | ||
| 3. Under **Public access** > **Custom Domains**, select **Connect Domain**. | ||
| 3. Under **Custom Domains**, select **Add**. | ||
| 4. Enter the domain name you want to connect to and select **Continue**. | ||
| 5. Review the new record that will be added to the DNS table and select **Connect Domain**. | ||
|
|
||
| Your domain is now connected. The status takes a few minutes to change from **Initializing** to **Active**, and you may need to refresh to review the status update. If the status has not changed, select the *...* next to your bucket and select **Retry connection**. | ||
| Your domain is now connected. The status takes a few minutes to change from **Initializing** to **Active**, and you may need to refresh to review the status update. If the status has not changed, select the _..._ next to your bucket and select **Retry connection**. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.