not_found for unmatched paths and the four custom HTML slots for third-party tags that must appear at an exact document position.
Site-wide settings at a glance
Source-backed settings follow head and published versions. Current-resource settings such as the favicon apply immediately and are not restored by source rollback.
Create a custom not-found page
Thenot_found singleton is a page module with the reserved route literal not_found:
not_found
{ "type": "not_found" }; it has no name. The special route is not a public URL pattern and must be exactly not_found, without a leading slash.
When no page or redirect matches, Cactal renders this page with the originally requested path, the request’s query map, and an empty route-parameter map. The HTTP response remains 404, so crawlers and clients receive the correct status.
Without a not_found file, Cactal returns its standard platform 404 response.
Use CMS data on the 404 page
The not-found page supports the samequeries, metadata, and render props as other pages. For example, it can retrieve published navigation links:
not_found
A
get query that finds no published item on a regular page falls through to not_found with HTTP 404, so a deleted or unpublished item serves this page instead of an error.Add custom document HTML
Four singleton types insert raw HTML into every server-rendered page:
The effective document order is:
Add a head integration
Set custom head HTML
Add a tag-manager fallback
Set custom body-start HTML
DELETE /v1/websiteSourceCode/files and the same { websiteId, file, leaseToken } shape.
Raw HTML and security
Custom slot content is inserted without escaping, sanitization, templating, or React processing. It can run scripts, load remote resources, modify the DOM, collect visitor data, or break page markup. Additional rules:- Slots apply to every rendered page, including the custom 404 page.
- Slots cannot vary by route or use CMS/request template values.
- Prefer the structured metadata configuration for title, description, robots, canonical, Open Graph, Twitter, alternate links, and JSON-LD. Hand-authored duplicates can produce conflicting tags.
- Use
defer,async, or module scripts when appropriate so a third-party script does not block document parsing. - A syntactically valid source write can still contain broken HTML. Inspect the draft’s rendered document before publishing.
- Third-party integrations may have consent, privacy, and data-processing requirements outside Cactal.
Site favicon
Favicons are a current website setting, not a source file. Set a ready PNG, SVG, or ICO asset withPUT /v1/websites/{websiteId}/favicon:
<link rel="icon"> tags for it: a PNG is linked once and doubles as the Apple touch icon, an ICO is linked as is, and an SVG is linked after its rasterized PNG preview so browsers that ignore SVG icons still show one. /favicon.ico redirects to the asset for clients that never read the tags. Send { "assetId": null } to restore the Cactal fallback. A page or redirect explicitly handling /favicon.ico wins over the setting. The dashboard offers the same choice under the site’s Settings.
See Upload assets for allowed formats and upload steps.
Validate and publish
Fornot_found and custom HTML changes:
- Read the current head snapshot.
- Acquire an edit lease and upsert the singleton.
- Wait for the draft preview to become ready.
- Inspect a normal page and an unmatched URL on the draft host.
- Run
POST /v1/websiteSourceCode/head/check. - Publish after the draft behaves correctly.
Troubleshooting
Next steps
- Style a website for
global_cssand Tailwind CSS - Configure SEO metadata for structured head tags
- Configure routes and redirects for URL behavior
- Preview drafts and versions before publishing third-party code