Skip to content
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
27f33f1
Reorder actions
maxvp Mar 7, 2025
5082ab0
Add redirect section
maxvp Mar 7, 2025
57c31c8
Add selectors
maxvp Mar 7, 2025
975ab5d
Add policy options
maxvp Mar 10, 2025
29f467e
Add more context
maxvp Mar 11, 2025
c0f2090
Merge branch 'production' into max/gw/http-redirect
maxvp Mar 11, 2025
ba8f0af
Add policy context fields
maxvp Mar 11, 2025
5385b1f
Add example table
maxvp Mar 11, 2025
71b01b7
Improve definitions
maxvp Mar 13, 2025
8aa1ee3
Improve context fields
maxvp Mar 17, 2025
e54a2cb
Merge branch 'production' into max/gw/http-redirect
maxvp Mar 25, 2025
a83f9af
Remove caveat from replace your VPN
maxvp Mar 25, 2025
8c66180
Update customize block page procedure
maxvp Mar 25, 2025
ad52fe3
Add redirect section for block page
maxvp Mar 25, 2025
34e857e
Add more details for block page
maxvp Mar 26, 2025
cf590f7
Merge branch 'production' into max/gw/http-redirect
maxvp Apr 1, 2025
7ecdd05
Add available selectors partial
maxvp Apr 1, 2025
337ebd1
Update context field table
maxvp Apr 1, 2025
65c4099
Add more info
maxvp Apr 2, 2025
314e6da
Update turn on block page partial
maxvp Apr 3, 2025
bd3425c
Add configure section
maxvp Apr 4, 2025
70c2da1
Rearrange sections
maxvp Apr 7, 2025
c59d2d3
Add new flow
maxvp Apr 7, 2025
7358b1d
Add policy ID placeholder
maxvp Apr 7, 2025
6eaa36b
Add policy context partial
maxvp Apr 7, 2025
bf45e78
Add per policy options
maxvp Apr 7, 2025
50cae9a
Add block notifications to AV scanning
maxvp Apr 7, 2025
fbf9054
Add block notifications to DNS and network policies
maxvp Apr 7, 2025
d1bb1a1
Remove cert warning
maxvp Apr 8, 2025
56d45d7
Add default block page section
maxvp Apr 8, 2025
b49dc96
Write new overview section
maxvp Apr 8, 2025
eac51d1
Update customize block page info
maxvp Apr 8, 2025
5edb723
Clarify limitation is DNS level only
maxvp Apr 8, 2025
a5513f9
Update client-notifications partial with toggle names
maxvp Apr 8, 2025
eb921b0
Revert request warning
maxvp Apr 9, 2025
cea683d
Add filter to context fields
maxvp Apr 9, 2025
d9c5b63
Improve block page overview
maxvp Apr 9, 2025
a0bffd9
Add HTTP redirect examples
maxvp Apr 9, 2025
6c21508
Add redirect precedence to block page
maxvp Apr 9, 2025
cf21ea5
Add cross links
maxvp Apr 9, 2025
82e4e66
Update block page in other sections
maxvp Apr 9, 2025
ff92aa2
Update src/content/docs/cloudflare-one/policies/gateway/block-page.mdx
maxvp Apr 10, 2025
4c26b35
Add changelog entry
maxvp Apr 10, 2025
c437c83
Merge branch 'production' into max/gw/http-redirect
maxvp Apr 10, 2025
d46a7b8
Apply suggestions from review
maxvp Apr 11, 2025
b0e0895
Apply suggestions from code review
maxvp Apr 11, 2025
940c77e
Delete src/content/changelog/gateway/2025-04-11-http-redirect-custom-…
maxvp Apr 11, 2025
30f9153
Readd changelog
maxvp Apr 11, 2025
e49f1c9
Reword changelog
maxvp Apr 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ curl --silent "https://<ACCOUNT_ID>.cloudflare-gateway.com/dns-query?name=exampl
--header "CF-Authorization: <USER_DOH_TOKEN>" | jq
```

If the site is blocked and you have enabled [**Display block page**](/cloudflare-one/policies/gateway/block-page/#turn-on-the-block-page) for the policy, the query will return `162.159.36.12` (the IP address of the Gateway block page). If the block page is disabled, the response will be `0.0.0.0`.
If the site is blocked and you have turned on the [block page](/cloudflare-one/policies/gateway/block-page/#configure-policy-block-behavior) for the policy, the query will return `162.159.36.12` (the IP address of the Gateway block page). If the block page is disabled, the response will be `0.0.0.0`.

<Details header="Example response">

Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/cloudflare-one/faq/getting-started-faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ After changing your team name, you will need to check your Block page, Login pag
To verify that your team name change is successfully rendering on the Block page, Login page and App Launcher:

1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Settings** > **Custom Pages**.
2. Find the **Block page** and **Login page** > select **Customize** next to the page you would like to review first.
2. Find the **Account Gateway block page** and **Login page** sections, then select **Customize** next to the page you would like to review first.
3. Review that the value in **Your Organization's name** matches your new team name.
4. If the desired name is not already displayed, change the value to your desired team name and select **Save**.
5. Check both pages (**Block page** and **Login page**) to set **Your Organization's name** as your desired team name.
5. Check both pages (**Account Gateway block page** and **Login page**) to set **Your Organization's name** as your desired team name.

The App Launcher will display the same team name set on the Login page, so you do not need to update the **Your Organization's name** field in the App Launcher page.

Expand Down
99 changes: 76 additions & 23 deletions src/content/docs/cloudflare-one/policies/gateway/block-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,67 @@ sidebar:
order: 14
---

import { Render } from "~/components";
import { Render, Tabs, TabItem } from "~/components";

Gateway responds to any domain blocked at the DNS level with `0.0.0.0` for IPv4 queries or `::` for IPv6 queries, and does not return that blocked domain's IP address. As a result, the browser will show a browser default error page, and users will not be able to reach that website. This may cause confusion and lead some users to think that their Internet connection is not working.
When Gateway blocks traffic with a [DNS](/cloudflare-one/policies/gateway/dns-policies/#block) or [HTTP Block policy](/cloudflare-one/policies/gateway/http-policies/#block), you can configure a block page to display in your users' browsers. You can configure the Cloudflare-hosted block page can provide a descriptive reason for blocking traffic and contact information, or you can redirect your users' browsers to another page. You can apply these customizations globally for every Block policy, or override the settings on a per-policy basis.

Configuring a custom block page in Zero Trust helps avoid this confusion. Your block page will display information such as the rule ID of the policy blocking the website, a policy-specific block message, your organization's name, and a global message you may want to show — for example, a message explaining that the website has been blocked by Gateway and providing any points of contact for support within the organization.
## Prerequisites

Gateway supports custom block pages for DNS and HTTP policies.
In order to display the block page as the URL of the blocked domain, your organization's devices must have a [Cloudflare certificate](/cloudflare-one/connections/connect-devices/user-side-certificates/manual-deployment/) installed. Enterprise users can also [deploy their own root CA certificate](/cloudflare-one/connections/connect-devices/user-side-certificates/custom-certificate/). If you do not install a certificate, the block page [will not display correctly](#certificate-error).

:::caution[Default Cloudflare certificate expiring]
The default Cloudflare root certificate expires on 2025-02-02.
## Configure the block page

If your organization is still using the default Cloudflare certificate, you will need to use a new certificate to display the block page. For more information, refer to [User-side certificates](/cloudflare-one/connections/connect-devices/user-side-certificates/) or [Troubleshooting](/cloudflare-one/faq/troubleshooting/#as-of-february-2-2025-my-end-user-devices-browser-is-returning-a-your-connection-is-not-private-warning).
:::
Gateway will display a global block page in the browser of any user whose traffic is blocked. By default, Gateway will display the block page for any DNS Block policies you turn it on for and all HTTP Block policies. You can [turn on or override the global setting](#configure-policy-block-behavior) on a per-policy basis.

## Prerequisites
To configure the global block page:

In order to display the block page as the URL of the blocked domain, your devices must have a [Cloudflare certificate](/cloudflare-one/connections/connect-devices/user-side-certificates/manual-deployment/) installed. Enterprise users can also [deploy their own root CA certificate](/cloudflare-one/connections/connect-devices/user-side-certificates/custom-certificate/). If you do not install a certificate, the block page [will not display correctly](#certificate-error).
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **Custom Pages**.
2. Under **Account Gateway block page**, Gateway will display the current block page setting. Select **Customize**.
3. Choose whether to use the [default Gateway block page](#use-the-default-block-page), a [URL redirect](#redirect-to-a-block-page), or a [custom Gateway block page](#customize-the-block-page).
4. Select **Save**.

## Turn on the block page
### Use the default block page

For all HTTP Block policies, Gateway automatically displays a generic Cloudflare block page. For DNS Block policies, you will need to turn on the block page on a per-policy basis.
When you choose **Default Gateway block page**, Gateway will display a [block page hosted by Cloudflare](https://blocked.teams.cloudflare.com/). This is the default option for all traffic blocked by Gateway.

To turn on the block page and specify a custom block message:
### Redirect to a block page

<Render
file="gateway/add-block-page"
params={{
firewallPolicyPath:
"**Gateway** > **Firewall policies** > **DNS** or **Gateway** > **Firewall policies** > **HTTP**",
}}
/>
Instead of displaying the Cloudflare block page, you can configure Gateway to return a `307` (Temporary Redirect) HTTP response code and redirect to a custom URL.

To redirect users to a non-Cloudflare block page:

1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **Custom Pages**.
2. Under **Account Gateway block page**, select **Customize**.
3. Choose **URL redirect**
4. Enter the URL you want to redirect blocked traffic to.
5. (Optional) Turn on **Send policy context** to send [additional policy context](#policy-context) to the redirected URL.
6. Select **Save**.

## Customize the block page
Gateway will now redirect users to a custom page when user traffic matches a Block policy with the block page configured.

To create an HTTP policy to redirect URLs, refer to the [Redirect action](/cloudflare-one/policies/gateway/http-policies/#redirect).

#### Policy context

<Render file="gateway/policy-context" />

#### Redirect precedence

Paths and queries in the redirect URL take precedence over the original URL. When you turn on **Send policy context**, Gateway will always append context to the end of the redirected URL. For example, if the original URL is `example.com/path/to/page?querystring=X&k=1` and the redirect URL is `cloudflare.com/redirect-path?querystring=Y`, Gateway will redirect requests to:

```txt ins="&[email protected]"
cloudflare.com/redirect-path?querystring=Y&[email protected]
```

### Customize the block page

<Render file="gateway/customize-block-page" />

### Add a logo image
#### Add a logo image

<Render file="gateway/add-logo-image" />

### Allow users to email an administrator
#### Allow users to email an administrator

You can add a Mailto link to your custom block page, which allows users to directly email you about the blocked site. When users select **Contact your Administrator** on your block page, an email template opens with the email address and subject line you configure, as well as the following diagnostic information:

Expand All @@ -59,6 +79,39 @@ You can add a Mailto link to your custom block page, which allows users to direc
| Device ID | The ID of the device that visited the page. This is generated by the WARP client. |
| Block Reason | Your policy-specific block message. |

## Configure policy block behavior

For DNS Block policies, you will need to turn on the block page for each policy you want to display it. For HTTP Block policies, Gateway automatically displays your global block page setting by default. You can override your global block page setting for both policy types within each policy's settings.

To turn on the block page or override your global block page setting for an individual policy:

<Tabs>

<TabItem label="DNS policy">

<Render
file="gateway/add-block-page"
params={{
firewallPolicyPath: "**Gateway** > **Firewall policies** > **DNS**",
blockBehaviorAction: "turn on",
}}
/>

</TabItem>
<TabItem label="HTTP policy">

<Render
file="gateway/add-block-page"
params={{
firewallPolicyPath: "**Gateway** > **Firewall policies** > **HTTP**",
blockBehaviorAction: "go to",
}}
/>

</TabItem>

</Tabs>

## Limitations

### Certificate error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ With the [Request Context Categories](/cloudflare-one/policies/gateway/dns-polic

<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">

| Selector | Operator | Value | Action |
| ------------------------ | -------- | ------- | ------ |
| Selector | Operator | Value | Action |
| ------------------------ | -------- | --------- | ------ |
| Request Context Category | is | _Present_ | Block |

</TabItem>
Expand Down Expand Up @@ -485,7 +485,7 @@ Enterprise users can pair these policies with an [egress policy](/cloudflare-one
Optionally, you can use the Domain selector to control the IP version for specific sites.

:::note
To ensure traffic routes through your preferred IP version, disable **Display block page**.
To ensure traffic routes through your preferred IP version, turn off **Modify Gateway block behavior**.
:::

### Force IPv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,17 @@ Policies with Block actions block DNS queries to reach destinations you specify

#### Custom block page

When choosing the Block action, turn on **Display custom block page** to respond to queries with a block page and to specify the message you want to display to users who go to blocked websites. If the block page is disabled, Gateway will respond to blocked queries with an `A` record of `0.0.0.0` for IPv4 destinations, or with an `AAAA` record of `::` for IPv6 destinations. For more information, refer to the dedicated documentation on [customizing the block page](/cloudflare-one/policies/gateway/block-page/).
When choosing the Block action, turn on **Modify Gateway block behavior** to respond to queries with a block page to display to users who go to blocked websites. Optionally, you can override your global block page setting with a URL redirect for the specific DNS policy. For more information, refer to [Block page](/cloudflare-one/policies/gateway/block-page/).

If the block page is turned off for a policy, Gateway will respond to queries blocked at the DNS level with an `A` record of `0.0.0.0` for IPv4 destinations, or with an `AAAA` record of `::` for IPv6 destinations. The browser will display its default connection error page.

#### WARP client block notifications

<Render file="gateway/client-notifications-os" product="cloudflare-one" />
<Render
file="gateway/client-notifications"
product="cloudflare-one"
params={{ toggleName: "**Display block notification for WARP Client**" }}
/>

### Override

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For example, if you created a policy to block `example.com`, you can do the foll

2. Type `dig example.com` (`nslookup example.com` if you are using Windows) and press **Enter**.

3. If the [block page](/cloudflare-one/policies/gateway/block-page/) is disabled for the policy, you should see `REFUSED` in the answer section:
3. If the [block page](/cloudflare-one/policies/gateway/block-page/) is turned off for the policy, you should see `REFUSED` in the answer section:

```sh
dig example.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@ To turn on AV scanning:
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **Network**.
2. In **Firewall**, turn on **AV inspection**.
3. Choose whether to scan files for malicious payloads during uploads, downloads, or both. You can also block requests containing [non-scannable files](#non-scannable-files).
4. (Optional) Turn on **Display AV block notification for WARP Client** to send [block notifications](#warp-client-block-notifications) to users connected to Gateway with the WARP Client when AV inspection blocks a file.

When a request is blocked due to the presence of malware, Gateway will log the match as a Block decision in your [HTTP logs](/cloudflare-one/insights/logs/gateway-logs/#http-logs).

### WARP client block notifications

<Render
file="gateway/client-notifications"
product="cloudflare-one"
params={{ toggleName: "**Display AV block notification for WARP Client**" }}
/>

## File scan criteria

If AV scanning is turned on, Gateway will use the following criteria to determine whether a file is present in a request or response, and whether to scan that file. The first match will result in the file being scanned.
Expand Down
Loading