Error pages
Choose what visitors see when a site is in maintenance or answers with an error, and write your own pages.
On this page
Before you start
- You can open the site in Managed Websites. Anyone who can open a site can change its error pages.
- Each environment has its own error pages: choose Production or Staging in the site header first.
See what visitors see
Open the site's error pages
Go to Managed Websites, choose the site, then Error pages under Site settings. The table lists the six pages and what each shows now.
Preview a page
Choose Preview, then a page along the top. Nothing on the site changes.
| Visitors see | Meaning |
|---|---|
| Platform page | Corefinity's page for that status. |
| Your page | The page you wrote. |
| Your app's page | Exactly what your application sends. |
Write your own page
Choose what each page shows
Choose Edit. For Maintenance page and for each status from 503 to 404, choose Platform page or Your page; a status also offers Show your app's page.
Write the page
Choose Write your own: the editor starts from the platform's page. Change the HTML, enter a Message, choose a tag such as
{{site_name}}to insert it, then choose Done.Review and save
Choose Review changes, check the list, then Save and apply.
The change applies straight away and the card reads Applied. If it cannot be applied, the site keeps the pages it had and the card says why.
A page is plain HTML and CSS of up to 64 KB, and all pages together up to 256 KB. Scripts and forms are taken out when you save.
When visitors see the maintenance page
The maintenance page always blocks visitors while maintenance mode is on. Deployments and platform maintenance show it only while 503 is set to Show the error page.
Go back to earlier pages
Every save is a revision. Open the card's … menu for both ways back:
- History, then Revert to this on a revision, brings back that save.
- Reset to platform defaults puts every page back as on a new site.
Automate this
Saves the whole configuration at the version you read: the setting of every code, every page and the support email.
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/error-pages \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"config": {
"codes": {
"404": "app",
"500": "page",
"502": "page",
"503": "app",
"504": "page"
},
"pages": {
"404": {
"message": null,
"source": null
},
"500": {
"message": null,
"source": null
},
"502": {
"message": null,
"source": null
},
"503": {
"message": null,
"source": null
},
"504": {
"message": null,
"source": null
},
"maintenance": {
"message": "Back at 10:00 UTC",
"source": null
}
},
"support_email": "[email protected]"
},
"note": "Our app shows its own holding page",
"version": 2
}'Your assistant calls corestack_error_pages_update.
{
"name": "corestack_error_pages_update",
"arguments": {
"site_id": 4211,
"version": 3,
"codes": {
"503": "app"
},
"note": "Show the shop's own holding page"
}
}