Custom page for WAF Block, get the 500

Hi,
I set a page to display when the WAF is blocking a page (403).
But oddly, it’s not this page, but the 500 page, which is displayed.
However, the custom page are corrects (previews work, they are pure HTML page, etc.)

Example : https://www.homair.com/wp-login.php
I get a 403 status code, but the displayed page is my 500 template, not my 403.

500 template : Homair Vacances - Erreur 500
403 template : Homair Vacances - Erreur 403

Thanks for your help

It sounds like you’ve set it up correctly. How did you test the WAF page?

You may just have to open a Support Ticket. Be sure to post the ticket number here for more attention.

To contact Cloudflare Customer Support, login & go to https://dash.cloudflare.com/?account=support and select get more help. If you receive an automatic response that does not help you, please reply and indicate you need more help.

Thanks a lot, I created a ticket, we will see :slight_smile:

1 Like

Hi, to follow up the issue, and give some feedbacks :

I found something interesting !
The HTTP status returned by the blocked page is 403, BUT… the page used the one for 1000x errors, and indeed, the code is 1020 !
I didn’t know that a blocked page obtains a 1020 (https://support.cloudflare.com/hc/en-us/articles/360029779472-Troubleshooting-Cloudflare-1XXX-errors#error1020)

If I understand, the 1020 code has nothing to do with the HTTP status, it’s an error code, not an HTTP code, isn’t it ?

The block page returns an HTTP 403 status code, but the error that’s presented is a bit more specific to the Cloudflare service that issued the block. In your case it’s a 1020, which is generated from Firewall Rules as explained in the document you linked.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.