Skip to content
Cloudflare Docs

Block pages

Enable the block page for DNS policies

For DNS policies, you will need to enable the block page on a per-policy basis.

  1. In Zero Trust, go to Gateway > Firewall policies > DNS.
  2. Select Add a policy to create a new policy, or choose the policy you want to customize and select Edit. You can only edit the block page for policies with a Block action.
  3. Under Configure policy settings, turn on Modify Gateway block behavior.
  4. Choose your block behavior:
    • Use account-level block setting: Use the global block page setting configured in your account settings. The global setting can be either an HTTP redirect or a custom Cloudflare block page.
    • Override account setting with URL redirect: Redirect users with a 307 HTTP redirect to a URL you specify on a policy level.
  5. Select Save policy.

Depending on your settings, Gateway will display a block page in your users' browsers or redirect them to a specified URL when they are blocked by this policy.

Customize the block page

You can customize the block page by making global changes that Gateway will display every time a user reaches your block page. Customizations will apply regardless of the type of policy (DNS or HTTP) that blocks the traffic.

To customize your block page:

  1. In Zero Trust, go to Settings > Custom Pages.
  2. Under Account Gateway block page, select Customize.
  3. Choose Custom Gateway block page. Gateway will display a preview of your custom block page. Available global customizations include:
    • Your organization's name
    • Logo
    • Header text
    • Global block message, which will be displayed above the policy-specific block message
    • Mailto link
    • Background color
  4. Select Save.

Users will now get a custom block page when visiting a blocked website.

Add a logo image

You can include an external logo image to display on your custom block page. The block page resizes all images to 146x146 pixels. The URL must be valid and no longer than 2048 characters. Accepted file types include SVG, PNG, JPEG, and GIF.