How to set Error / Maintenance page in Fastly CDN

The Fastly CDN will sometimes return a 503 error due to various issues that can occur. The generic text associated with a 503 error is “Service Unavailable” and it can mean variety of things. This default error response can be confusing to the customers and have a basic look and feel.

This guide will show you how to set friendly or prettier 503 custom error page through Fastly module which will be served when:

  • When origin returns a response status greater than 500
  • When origin is down (i.e unhealthy, timeout, etc)

To set custom Error page, go to:

Magento admin > Stores > Configuration > Advanced > System > Full Page Cache > Fastly Configuration

Under the Fastly Configuration, click on the Error/Maintenance page:

The modal window will pop up. Paste your custom HTML code into the HTML textarea and press the Upload button to save changes.

Now when Fastly returns 503 error, instead of default error page which looks something like this:

You will serve your custom error page:

That’s it! Check our blog for more Fastly articles, or contact us if you are in need of it’s integration.


About Hrvoje Ivancic

Backend Developer

Hrvoje is a Backend Developer with love for the code and old cars.

Read more posts by Hrvoje / Visit Hrvoje's profile

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.