Custom error page - How to insert error tokens on Wordpress


On a Wordpress installation how to apply the tokens described here :

I’ve seen :


But… how to do it properly in WP ?

Is it directly in the template page ? Or simply in the content of the post (page).

I just need to custom 500 and 1000 error pages.

For the moment, the result of the preview looks KO (in this test, " ::CLOUDFLARE_ERROR_500S_BOX:: " is inserted) :

# Custom error preview failed

Status code 500 received while fetching template from

* **target** : one of
  * [cf-error:1000s](
  * [block:ip-ban](
  * [block:rate-limit](
  * [block:client-auth](
  * [block:basic-sec-captcha](
  * [block:country-captcha](
  * [block:adv-sec-captcha](
  * [block:waf](
  * [block:iuam-basic](
  * [cf-error:500s](
  * [always-online:no-copy](
  * [phishing:warn](
  * [regulation:block](
* **url** : custom template URL to fetch (optional, uses default template when omitted)


I created a WordPress page that looks like this. It’s my standard Header/Footer, plus an H1 and and H4 block:

And it Previews like this in Custom Error Pages:


Thank you for your proposition / test.

I’ve tested by putting the default page and as a title :


I still have : Custom error preview failed

Would you have any other idea ? Or another setting to change ?

Trying to use WordPress to layout a custom error page is going to be a challenge. It took me a while to weed out all the fluff to get that custom error page to work. The page size has to be relatively small, <1.5 megs, I think. And any number of syntax oddities may throw off Cloudflare’s use of that page.

The Chrome console says there’s only one error with the favicon.
In the “Network” tab, a 200 line for the Cloudflare page, and a 403 line for the favicon.

Would there be any way to exclude the favicon from the Cloudflare dashboard ?


Custom Error pages disregard the favicon from your template page.


The preview is still KO. Now I test to publish directly and I get this message :

“Your custom page must be larger than 100 characters (Code: 1203)”

But it does have more than 100 char.

Would you see a link between that message at publishing and the error when trying a preview ?

I also faced that same error, even though I had more than 100 characters. WordPress is not a good way to try to generate a custom error page…unless you want to comb through every bit of the generated page to simplify it for Cloudflare.

ok I give up :slight_smile:

At least I postpone the project…

Thanks again.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.