Next.js Discord

Discord Forum

<meta name="robots" content="noindex"/> getting added to all pages of my site

Unanswered
Saltwater Crocodile posted this in #help-forum
Open in Discord
Saltwater CrocodileOP
This website merinobond.com, is built using NextJS version 14. I've encountered an issue where all pages on my site contain the meta tag <meta name="robots" content="noindex"/>, preventing Google from indexing the site. Strangely, I haven't explicitly set this robots meta tag anywhere in the source code. What's even more puzzling is that this tag only appears in the production build (when I run npm run build and npm start), not in development mode (npm run dev). I'd greatly appreciate any assistance in resolving this matter.

4 Replies

it looks like you assigned your custom domain to preview environment in that case so far
please check if your custom domain is assigned to default (example: main or master) branch
Saltwater CrocodileOP
Thanks for answering. I have deployed on AWS amplify and it is pointing to the main branch
Saltwater CrocodileOP
This is actually a bug and being tracked at https://github.com/vercel/next.js/issues/58615. I solved using the solution mentioned there