diff --git a/src/pages/404.astro b/src/pages/404.astro index edd7cffb57d01d2..662e6c63e2fce3f 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -10,6 +10,7 @@ const props = { template: "splash", editUrl: false, feedback: false, + noindex: true, }, hideTitle: true, hideBreadcrumbs: true, diff --git a/src/pages/[product]/404.astro b/src/pages/[product]/404.astro index 2409196f7aefc34..edb402c320355a2 100644 --- a/src/pages/[product]/404.astro +++ b/src/pages/[product]/404.astro @@ -27,6 +27,7 @@ const props = { tableOfContents: false, editUrl: false, feedback: false, + noindex: true, }, hideTitle: true, hideBreadcrumbs: true, diff --git a/worker/index.ts b/worker/index.ts index 79122d669ad544e..728b316593dd2c7 100644 --- a/worker/index.ts +++ b/worker/index.ts @@ -105,7 +105,14 @@ export default class extends WorkerEntrypoint { if (!section) return response; - return this.env.ASSETS.fetch(`http://fakehost/${section}/404/`); + const notFoundResponse = await this.env.ASSETS.fetch( + `http://fakehost/${section}/404/`, + ); + + return new Response(notFoundResponse.body, { + status: 404, + headers: notFoundResponse.headers, + }); } return response;