<meta name="robots" content="noindex"/> being inserted which is hurting SEO
Answered
White-crowned Sparrow posted this in #help-forum
White-crowned SparrowOP
I don't know where and how this line is being inserted into the final HTML page:
https://www.jumpcomedy.com/
I have done this in my pages (using the app router):
Yet I see both this:
and
in the rendered HTML page. However, SemRush can't crawl this site because of the "noindex". I'm on the latest version 14 of NextJS. Any ideas on what might be causing this?
https://www.jumpcomedy.com/
I have done this in my pages (using the app router):
export const metadata: Metadata = {
title: '...',
description: '...',
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
}
}
};Yet I see both this:
<meta name="robots" content="index, follow"/>and
<meta name="robots" content="noindex"/>in the rendered HTML page. However, SemRush can't crawl this site because of the "noindex". I'm on the latest version 14 of NextJS. Any ideas on what might be causing this?
Answered by White-crowned Sparrow
Thank you for the tip. It was the useSearchParams() not being wrapped in a <Suspense> that was causing it. Once I did that, it was OK.
7 Replies
@White-crowned Sparrow I don't know where and how this line is being inserted into the final HTML page:
https://www.jumpcomedy.com/
I have done this in my pages (using the app router):
export const metadata: Metadata = {
title: '...',
description: '...',
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
}
}
};
Yet I see both this:
`<meta name="robots" content="index, follow"/>`
and
`<meta name="robots" content="noindex"/> `
in the rendered HTML page. However, SemRush can't crawl this site because of the "noindex". I'm on the latest version 14 of NextJS. Any ideas on what might be causing this?
I got 500 error when visiting your site but it still show the page. seem like it is rendering on client so the bot is not able to crawl it
do you have any error when building or do you see any error on the server?
@Ray I got 500 error when visiting your site but it still show the page. seem like it is rendering on client so the bot is not able to crawl it
White-crowned SparrowOP
Hi there - Thank you for the reply. I don't see a 500. The site loads fine for me. Where are you seeing that? I opened up console as well and all is good there.
if you disable javascript, your site doesn't load
White-crowned SparrowOP
Thank you for the tip. It was the useSearchParams() not being wrapped in a <Suspense> that was causing it. Once I did that, it was OK.
Answer
@White-crowned Sparrow Thank you for the tip. It was the useSearchParams() not being wrapped in a <Suspense> that was causing it. Once I did that, it was OK.
yeah, no error now and the
<meta name="robots" content="noindex"/> is gone