Skip to main content

Styles not loading for 404 pages

If you manage a 404 page in the CMS and it doesn't display properly on your live site in certain cases, the cause is usually how its CSS files are referenced.

Links within Page assets are relative by default. For a 404 page specifically, that breaks: browsing to a non-existent page deep in the directory structure means the relative CSS links resolve against that depth and point at nothing.

To fix it:

  1. Edit the 404 page in your CMS. It may not literally be named 404, though that's the common practice.
  2. Click the Configure tab.
  3. Check Override the current Site's asset link rewriting behavior for this asset.
  4. In the link rewriting options that appear, select Absolute.
  5. Submit the page.
  6. Publish the page.

The CSS resources now load regardless of the location the 404 page is requested from.