Cloudflare Docs
Learning Paths
Edit this page on GitHub
Set theme to dark (⇧+D)

Block pages

  2 min read

​​ 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. Find the policy for which you would like to display a block page and select Configure. You can only enable the block page for policies with a Block action.
  3. Scroll down to Configure policy settings.
  4. Enable Display block page.
  5. Select Save policy.

End users will now get a block page when they are blocked by this DNS policy.

​​ Customize the block page

You can customize the block page by making global changes that will show up every time a user visits a block page, independently of the type of rule (DNS or HTTP) that is blocking the website.

To apply customizations to your block page:

  1. In Zero Trust, go to Settings > Custom Pages.

  2. Under Block page, enable the custom block page feature.

  3. Select Customize. Available global customizations include:

    • Adding your organization’s name
    • Adding a logo
    • Adding a header text
    • Adding a global block message, which will be displayed above the policy-specific block message
    • Adding a Mailto link
    • Choosing a 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.