quarto-dev / quarto-dev/quarto-cli

Re-direct to 404 page not working when deployed to Posit Connect

Open
#12,940 5 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Jun 14, 2025.

bug publishing-connect
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

I have:
  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide
Bug description

I'm developing a Quarto-website. When webpage rendered in local sessions (eg. Posit Workbench session or desktop Rstudio), clicking on broken links correctly re-direct to a custom 404 page. However when deployed on to Posit Connect as website (regardless as static or source code), the custom 404 page does not appear, it's just go to a blank page with tiny text 404 page not found.

I tried adding the Posit Connect Content URL link into site-url and site-path, didn't work either.

Steps to reproduce

All scripts below are in the project base directory.

_quarto.yml

project:
  type: website

website:
  title: "quarto_testing"
  navbar:
    left:
      - href: index.qmd
        text: Home
      - about.qmd

format:
  html:
    toc: true

index.qmd

---
title: "quarto_testing"
---

This is a Quarto website.

- Link to working page: [About Page](about.qmd)
- Link to broken page: [Broken page](broken.qmd)

404.qmd

---
title: "My 404 test"
---

404 Testing page

![Wiki](https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svg)

about.qmd

---
title: "About"
---

About this site

```{r}
1 + 1
```
Actual behavior

When clicking on the "broken page", custom 404 page does not appear, it's just go to a blank page with tiny text 404 page not found.
But if I type 404.html into the URL address bar, the page do appear.

Expected behavior

When clicking on the "broken page", re-directs to 404.html page

Your environment
  • IDE: RStudio Pro 2024.04.0 Build 735.pro3
  • OS: Mac Sonoma 14.7.5
Quarto check output

Quarto 1.4.553
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.553
Path: /usr/lib/rstudio-server/bin/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/local/bin
Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.9.14
Path: /opt/python/3.9.14/bin/python3
Jupyter: 5.7.2
Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
Version: 4.4.0
Path: /usr/lib/R
LibPaths:
- /mnt/home/[username lib path]/4.4
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.50
rmarkdown: 2.29

[✓] Checking Knitr engine render......OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.