Block a URL (Page Rules)

If you want to block access to a certain URL or set of URLs, you can utilize our page rules feature to do so.

Click on the “CDN & Caching” section and navigate to Page Rules:

Give your page rule a name to identify it by:

Choose “Block Request” as the action and leave the redirect/header field blank:

Choose a condition to filter by:

Enter the pattern to filter by below:

The use of wildcard (*) or multiple filters (,) are supported.

For example, blocking requests to https://domain.com/api/* will block https://domain.com/api/page1, https://domain.com/api/page2, and https://domain.com/api/page3. It will not block requests to http://domain.com/api/page1.

Or, blocking requests to https://domain.com/api/page1,https://domain.com/api/page2 will block requests to https://domain.com/api/page1 and https://domain.com/api/page2

To apply a block to both https and http, simply put *:// instead of the protocol.

The filter must match fully to be applied.

Using the filter “api” won’t work for https://domain.com/api/page1, but using the filter “*api*” will.

The supported HTTP Method are: GET, POST, DELETE, HEAD, PUT, PATCH, and OPTIONS (case sensitive).