diff --git a/.github/workflows/404.html b/.github/workflows/404.html
new file mode 100644
index 000000000000000..eb1805252fa03ab
--- /dev/null
+++ b/.github/workflows/404.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<html>
+  <head>
+    <title>404 Page Not Found</title>
+    <script src="/en-US/404/index.js"></script>
+  </head>
+  <body>
+    <h1>404 Page Not Found</h1>
+    <p><strong>Note:</strong> This is a GitHub pull request preview, and this page is not a part of the pull request.</p>
+  </body>
+</html>
diff --git a/.github/workflows/404.js b/.github/workflows/404.js
new file mode 100644
index 000000000000000..427b1de2810e269
--- /dev/null
+++ b/.github/workflows/404.js
@@ -0,0 +1,13 @@
+function getContentsAfterHost() {
+  const full = location.href;
+  const path = location.pathname;
+
+  return full.substring(full.indexOf(path));
+}
+
+window.addEventListener("DOMContentLoaded", () => {
+  const link = document.createElement("a");
+  link.href = `https://developer.mozilla.org${getContentsAfterHost()}`;
+  link.textContent = "View on MDN production server";
+  document.body.appendChild(link);
+});
diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml
index c4082cc0a483e00..a467d74b2d87d07 100644
--- a/.github/workflows/pr-test.yml
+++ b/.github/workflows/pr-test.yml
@@ -123,6 +123,11 @@ jobs:
         run: |
           # Exclude the .map files, as they're used for debugging JS and CSS.
           rsync -a --exclude "*.map" node_modules/@mdn/yari/client/build/ $BUILD_OUT_ROOT
+
+          # Add the custom 404 page to provide production links to the unbuilt documents
+          cp -v ./.github/workflows/404.html ${BUILD_OUT_ROOT}/en-us/404/index.html
+          cp -v ./.github/workflows/404.js ${BUILD_OUT_ROOT}/en-us/404/index.js
+
           # Show the final disk usage size of the build.
           du -sh $BUILD_OUT_ROOT