Kaumil Patel
Kaumil Patel

Reputation: 1

In next js project I used app router for my web application. I got no-index in meta tag in page source I am not aware why its arrived

enter image description here

no-index i get in robot meta tag

I want index instead of no-index.

I’m using the Next.js App Router and trying to add a robots meta tag to allow search engines to index my page. However, despite setting index: true in the metadata object, the rendered HTML always shows <meta name="robots" content="noindex"/>.

Here’s my configuration:

export const metadata = {
  robots: {
    index: true, // Allow search engines to index this page
    follow: true, // Allow search engines to follow links on this page
    nocache: false, // Allow caching of this page
    googleBot: {
      index: true,
      follow: true,
      noimageindex: false, // Allow Google to index images on this page
      'max-video-preview': -1,
      'max-image-preview': 'large',
      'max-snippet': -1,
    },
  },
};

export default function Page() {
  return (
    <div>
      <h1>Welcome to My Next.js App</h1>
      <p>This page is indexable by search engines.</p>
    </div>
  );
}

Upvotes: 0

Views: 16

Answers (0)

Related Questions