Custom page preview not working

I’m getting “Status code 500 received while fetching template” when previewing a custom page, but it’s directly accessible. Here is its content:

    <!DOCTYPE html>
    <html lang="pt-BR">
    <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Dummy content">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>My site - 404 page not found</title>
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
    <style>
          a,a:focus,a:hover{color:#4D838C}.btn-primary,.btn-primary:focus,.btn-primary:hover{color:#FFF;text-shadow:none;background-color:#de9e1f;border:none;border-radius:30px}body,html{height:100%;background-color:#FFF}body{color:#4b4841;text-align:center;}.site-wrapper{display:table;width:100%;height:100%;min-height:100%;}.site-wrapper-inner{display:table-cell;vertical-align:top}.cover-container{margin-right:auto;margin-left:auto}.inner{padding:30px}.cover{padding:0 20px}.cover .btn-lg{padding:15px 30px;font-weight:700;text-transform: uppercase;}@media (min-width:768px){.site-wrapper-inner{vertical-align:middle}.cover-container{width:100%}}@media (min-width:992px){.cover-container{width:700px}}
        </style>
    </head>
    <body>
    <div class="site-wrapper">
    <div class="site-wrapper-inner">
    <div class="cover-container">
    <div class="inner cover">
    <img alt="My logo" src="/logo.png" width="200" />
    <h1 class="cover-heading">The page you're visiting<br> does not exist.</h1>
    <p>::CLOUDFLARE_ERROR_1000S_BOX::</p>
    <p class="lead">Sorry about that!</p>
    <p class="lead">
    <a href="/" class="btn btn-lg btn-primary">Get to know us</a>
    </p>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>

Any clues?

You do that in a worker and make request to another website?

No, this is the preview feature from https://dash.cloudflare.com/123/mysite.com/custom-pages

:wave: @ney

Try using a fully qualified URL for logo.png.

-OG

It worked! Thanks!!!

1 Like

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