diff --git a/client/src/document/organisms/article-footer/index.tsx b/client/src/document/organisms/article-footer/index.tsx index b7531ab834f8..e8e4a909080a 100644 --- a/client/src/document/organisms/article-footer/index.tsx +++ b/client/src/document/organisms/article-footer/index.tsx @@ -29,7 +29,11 @@ export function LastModified({ value, locale }) { } export function Authors({ url }) { - return MDN contributors; + return ( + + MDN contributors + + ); } enum ArticleFooterView { diff --git a/cloud-function/src/headers.ts b/cloud-function/src/headers.ts index 79c9fe6b250a..7cbf203662c7 100644 --- a/cloud-function/src/headers.ts +++ b/cloud-function/src/headers.ts @@ -38,6 +38,10 @@ export function withContentResponseHeaders( xFrame: !isLiveSample, }); + if (req.url?.endsWith("/contributors.txt")) { + res.setHeader("X-Robots-Tag", "noindex, nofollow"); + } + if (req.url?.endsWith("/sitemap.xml.gz")) { res.setHeader("Content-Type", "application/xml"); res.setHeader("Content-Encoding", "gzip"); diff --git a/tool/build-robots-txt.ts b/tool/build-robots-txt.ts index 94d17874fe4e..ab6d4f0d46b3 100644 --- a/tool/build-robots-txt.ts +++ b/tool/build-robots-txt.ts @@ -13,6 +13,7 @@ User-agent: * Sitemap: https://developer.mozilla.org/sitemap.xml Disallow: /api/ +Disallow: /*/contributors.txt Disallow: /*/files/ Disallow: /media `;