Fixes

How to fix “Indexed, though blocked by robots.txt” on Next.js

If Search Console shows “Indexed, though blocked by robots.txt” on your Next.js site, you are in the right place. The URL is blocked by robots.txt yet still in the index. This page covers the causes and a step-by-step fix for Next.js. A React framework. Server-side and static generation hand Googlebot ready-made HTML; metadata is managed with the Metadata API.

Updated: 05.11.2026 · 2 min read · Türkçe

Contents
  1. What does this status mean?
  2. Likely causes on Next.js
  3. Step-by-step fix on Next.js
  4. Extra checks for Next.js
  5. After fixing
  6. More information

What does this status mean?

Google did not crawl the URL because robots.txt forbids it, but it knows the address from links on other pages and indexed it without content. The result usually shows "No information is available for this page".

Likely causes on Next.js

  • Only robots.txt was used to hide the page.
  • External and internal links announced the address to Google.
  • The page was indexed first and blocked in robots.txt later.
  • The sitemap still lists the URL.
  • Next.js note: Check app/robots.ts or public/robots.txt. If you disallow preview environments, confirm the same rule does not ship to production.

Step-by-step fix on Next.js

  1. In your Next.js admin go to: The metadata object in app/layout.tsx and page files, app/robots.ts, app/sitemap.ts and next.config.js.
  2. Check app/robots.ts or public/robots.txt. If you disallow preview environments, confirm the same rule does not ship to production.
  3. Look for robots: { index: false } in metadata; a condition tied to an environment variable can output noindex in production by mistake. Also check that no X-Robots-Tag response header is added.
  4. If you do not want it indexed, remove the robots block and add noindex; allow crawling so Google can see the noindex.
  5. Protect content that must stay private with a password or login; do not rely on robots.txt alone.
  6. For urgent removal use the Removals tool in Search Console temporarily.
  7. If you want it indexed, remove the robots block and send the URL.
  8. Take blocked URLs out of the sitemap.

Extra checks for Next.js

  • sitemap: Generate a dynamic sitemap with app/sitemap.ts; split large sites with generateSitemaps. List only canonical URLs that return 200.
  • speed and crawling: Render pages statically or with ISR where possible, split heavy client bundles and use next/image. Slow server responses reduce crawl rate.

After fixing

In Search Console start "Validate fix" for this status and resubmit the page with URL inspection. First confirm the blocker is gone with the free Free indexability checker tool; for many URLs follow Bulk URL indexing: how to send thousands of pages to Google. Google makes the indexing decision itself and timing ranges from days to weeks.

More information

Frequently asked questions

Why noindex first, then robots?

Google must be able to crawl the page to see noindex. Let noindex take it out of the index first, then close it with robots.txt if you like.

Is this an error?

It is a warning; a content-less listing may be undesirable for your brand.

Where are these settings on Next.js?

The metadata object in app/layout.tsx and page files, app/robots.ts, app/sitemap.ts and next.config.js.

Related pages