The 404 page is cached for the whole site
-
What you'll see
A 404 template (
404.html,#/404.hash) shows something from the address that was requested: the address incanonicalorog:url, a search box filled with the last part of the address, the active section in the menu, or a link back after logging in. Common shapes:<input id="Search" value="#getlast(split(request.rawurl,'/'))#"> <link rel="canonical" href="#request.completeUrl#"> <small>#request.url#</small>On the 404 page these show
/404, not the address the visitor asked for. -
What's actually happening
Every address that does not exist used to render the whole 404 template. A crawler that asks for a new address every time then cost a full rendering per request, and neither the limit per IP address nor the flagged URL patterns stop that.
The 404 page is one page for the whole site. It is rendered the first time an unknown address is requested, stored in the site's disk cache and served for every address that does not exist. It follows the same rule as the rest of the cache: when something in the site is saved, the next 404 renders it once more. Requests that arrive while it renders wait for that one rendering.
It never sees the requested address. Otherwise the first visitor after a save - often a crawler - would decide what everyone gets. The 404 template sees fixed values:
url,request.urlandrequest.rawurlare/404.request.completeUrl,request.encodedUrland thebackurlinrequest.opendocare the site's own address followed by/404- the same on every domain the site is published on.request.folderpath,request.foldernameand the other folder fields are the site root.request.folderNotFoundisfalse.request.is404istrue, as before.
The response is still a 404, it is still logged as one, and probes for flagged addresses are still counted against the IP address. The site router still sees the real address: it decides from it and is never cached.
-
What to do
Keep the 404 page static. Do whatever depends on the missing address in the browser, from
location.pathname:var parts = location.pathname.split("/").filter(function (s) { return s.length > 0; }); var missing = parts.length ? parts[parts.length - 1] : ""; try { missing = decodeURIComponent(missing); } catch (e) { } document.getElementById("Search").value = missing;If the site's content security policy does not allow inline scripts, put the code in a script file and let the 404 page mark itself with an element the script looks for.
A site published under a path (
/EN/) has that path inlocation.pathname.request.sitepathis the same for every address, so the 404 page can write it into the script and the script can strip it.To send an old address somewhere else, redirect it - do not handle it on the 404 page.
Last reviewed 23 Nov 2026