reactjs - In NextJS project I used app router for my web application. I got no-index in meta tag in page source I am not aware w

enter image description hereno-index I get in robot meta tagI want index instead of no-index.I’m usi

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 I'm 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>
  );
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745163877a4614528.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信