Custom page for ip block not publishing

I am trying to publish my own custom page for ip block, but there is no way to make it work.

This a sample of the page i want to publish:

> <!DOCTYPE html>
> <html lang="en">
> <head>
>     <meta charset="UTF-8">
>     <meta name="viewport" content="width=device-width, initial-scale=1.0">
>     <meta http-equiv="X-UA-Compatible" content="ie=edge">
>     <title>my title</title>
> </head>
> <body>
>     <div style="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);">
>         <h1 style="text-align:center;">Header main</h1>
>         <h1 style="color:#F2635D;margin: 0;text-align:center;width:100%"> 
>             ::CLIENT_IP:: ACCESS DENIED
>         </h1>
>         <div style="text-align: center;display: flex;flex-direction: column;align-items: center;">
>             <h3 style="text-align:center;">You are seeing this message because you don't have the necessary authorization to access this web site.</h3>
>             
>         </div>
>     </div>
> </body>
> </html>

The account has a Pro plan.

Any advise?

Can you edit your post and try to format all of your HTML code with the “code” tool in the editor? It’s the < / > icon. Or a screenshot of the HTML itself.

Solved. I forgot to turn off the actual rules first.

Thanks anyway.

1 Like

Ok now the problem is that when i activate the rule the custom page does not show, only the default error message. Is there any way to allow everythin from cloudflare?

I expect that the Preview of the page worked, and you published it. So now it should show when you Preview from the Custom Page popup for that error.

Can you post a screenshot of the Firewall Rule you’re using for IP address block?

http.host eq “subdomain.example.com” and (ip.src ne 124.0.0.68 and ip.src ne 168.0.0.20 and ip.src ne 190.0.0.21)

That’s the rule. Any other ip address that is not into that list will be blocked.

I’m getting closer…that IP/Country block custom page is if you set a “Block” from Firewall -> Tools.

I’m checking the 1000 class errors now.

Ok, that seemed to do it. Even though the 1000 class errors talk about DNS, the custom page still applies. But you need to use a different token text -> ::CLOUDFLARE_ERROR_1000S_BOX::

You are awesome Mr. It works that way.

Thanks a lot.

1 Like

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