Skip to content

Commit

Permalink
[SEO] Don't let bot crawl front-edge/front-qa (duplicate content bad …
Browse files Browse the repository at this point in the history
…for SEO) (#7443)

* [SEO] Don't let bot crawl test pages (duplicate content bad for SEO)

Description
---
Fixes dust-tt/tasks#1280 (go there for
context)

Risks
---
Not that I can see

Deploy
---
Front

* fix
  • Loading branch information
philipperolet authored Sep 17, 2024
1 parent 3d3280a commit 4514032
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions front/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Document, { Head, Html, Main, NextScript } from "next/document";

const { ENABLE_BOT_CRAWLING } = process.env;

class MyDocument extends Document {
render() {
return (
Expand All @@ -11,6 +13,9 @@ class MyDocument extends Document {
href="https://fonts.gstatic.com"
crossOrigin="anonymous"
/>
{ENABLE_BOT_CRAWLING !== "true" && (
<meta name="robots" content="noindex" />
)}
<link href="https://use.typekit.net/jnb2umy.css" rel="stylesheet" />
</Head>
<body>
Expand Down
1 change: 1 addition & 0 deletions k8s/configmaps/front-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ data:
DD_LOGS_INJECTION: "true"
DD_RUNTIME_METRICS_ENABLED: "true"
NODE_ENV: "production"
ENABLE_BOT_CRAWLING: "true"

0 comments on commit 4514032

Please sign in to comment.