### Discussed in https://github.com/quarto-dev/quarto-cli/discussions/5276

<div type='discussions-op-text'>

<sup>Originally posted by **royfrancis** April 22, 2023</sup>
I have a quarto website which renders correctly except for the 404 page.

When previewing, the 404 page looks fine.

`quarto preview`

[![enter image description here][1]][1]

When rendered, the 404 page is missing css styling and image path is broken too. 

`quarto render`

[![enter image description here][2]][2]

This is the only page on the entire website that is misbehaving. And I don't think I am treating this page in any special way. I have uploaded the rendered files to github pages and it's broken there too. The same image path when on another page seems to work fine.

My directory structure looks like:

```
.
├── 404.qmd
├── assets
│   └── 404.png
├── index.qmd
├── _quarto.yml
└── _site
    ├── 404.html
    ├── assets
    │   └── 404.png
    ├── index.html
    ├── search.json
    └── site_libs
```

**_quarto.yml**

```
project:
  type: website

website:
  title: "Website"
  navbar:
    left:
      - text: Home
        href: "index.html"

format: html
```

**404.qmd**

```
---
pagetitle: "404: Page not found"
format: html
---

![](assets/404.png)

# 404: Page not found
```

**index.qmd**

```
---
format: html
---

# Hello

This is the index page.
```

`quarto 1.2.335`

  [1]: https://i.stack.imgur.com/jCCBV.png
  [2]: https://i.stack.imgur.com/xPnXE.png</div>
dragonstyle
2023-04-24T07:39:01Z
allenmanning
needs-repro websites
v1.4
closed
404 page not rendering correctly
https://github.com/quarto-dev/quarto-cli/issues/5284