Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 461b778

Browse files
committed
Override meta robots
1 parent 0b583dd commit 461b778

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pages/404.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ const postType = 'page'
1717
export default function Custom404({post}) {
1818
const {seo, ...postData} = post
1919

20+
// Update robots SEO meta.
21+
seo.metaRobotsNofollow = 'noindex'
22+
seo.metaRobotsNoindex = 'nofollow'
23+
2024
// Display dynamic page data if 404 page retrieved from WP.
2125
if (postData && Object.keys(postData).length > 0) {
2226
return <Page post={post} />

0 commit comments

Comments
 (0)