<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: i-afaqrashid</title>
    <description>The latest articles on DEV Community by i-afaqrashid (@iafaqrashid).</description>
    <link>https://dev.to/iafaqrashid</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3958358%2F4a7eabfb-61d4-4456-a9b1-f4dcf6021b69.png</url>
      <title>DEV Community: i-afaqrashid</title>
      <link>https://dev.to/iafaqrashid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iafaqrashid"/>
    <language>en</language>
    <item>
      <title>Next.js Open Graph Image Missing? Your Page Replaced It</title>
      <dc:creator>i-afaqrashid</dc:creator>
      <pubDate>Mon, 02 Nov 2026 14:53:22 +0000</pubDate>
      <link>https://dev.to/iafaqrashid/nextjs-open-graph-image-missing-your-page-replaced-it-5h80</link>
      <guid>https://dev.to/iafaqrashid/nextjs-open-graph-image-missing-your-page-replaced-it-5h80</guid>
      <description>&lt;p&gt;My homepage had a share image. Fourteen other pages on my site didn't, and nothing told me.&lt;/p&gt;

&lt;p&gt;I only found out when I ran my own pages through a metadata checker I'd just built. Lighthouse hadn't flagged it: pages with no &lt;code&gt;og:image&lt;/code&gt; still scored 100 for SEO.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cause
&lt;/h2&gt;

&lt;p&gt;Here's the setup almost every Next.js site starts with. The layout holds the shared tags, and each page adds its own title.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/layout.tsx&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Metadata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;metadataBase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://example.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;openGraph&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;website&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;siteName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Example&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/og-image.jpg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// app/pricing/page.tsx&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Metadata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Pricing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;openGraph&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Pricing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/pricing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It reads as if the page adds to the layout's Open Graph tags. It doesn't. Next.js merges metadata shallowly, so nested fields like &lt;code&gt;openGraph&lt;/code&gt; are "overwritten by the last segment to define them". The page's object replaces the layout's whole object.&lt;/p&gt;

&lt;p&gt;That pricing page ships with no &lt;code&gt;og:image&lt;/code&gt;, no &lt;code&gt;og:type&lt;/code&gt; and no site name. The homepage usually looks fine because it never sets its own &lt;code&gt;openGraph&lt;/code&gt;, which is why this is so easy to miss.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it stays hidden
&lt;/h2&gt;

&lt;p&gt;Nothing fails. An &lt;code&gt;openGraph&lt;/code&gt; object without images is valid, so my build gave no error or warning. The page renders and can rank as normal.&lt;/p&gt;

&lt;p&gt;The only symptom is in a shared link, which appears without an image in chat apps and social feeds. And you probably test sharing with your homepage, the one page that works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Keep the shared fields in one object and spread it into every &lt;code&gt;openGraph&lt;/code&gt;. The Next.js docs suggest the same pattern.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// lib/metadata.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;OG_DEFAULTS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;website&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="kd"&gt;as const&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;en_US&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;siteName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Example&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/og-image.jpg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;630&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Example&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// app/pricing/page.tsx&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Metadata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Pricing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;openGraph&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;OG_DEFAULTS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Pricing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/pricing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Put page-specific values after the spread, such as &lt;code&gt;type: "article"&lt;/code&gt; on a blog post or a different image on a case study.&lt;/p&gt;

&lt;p&gt;If one page deserves its own image, add an &lt;code&gt;opengraph-image.jpg&lt;/code&gt; file to that page's folder. Next.js generates the tags for you, and file-based metadata takes priority over the metadata object.&lt;/p&gt;

&lt;h2&gt;
  
  
  X cards have a related trap
&lt;/h2&gt;

&lt;p&gt;My layout also set &lt;code&gt;twitter.title&lt;/code&gt; and &lt;code&gt;twitter.description&lt;/code&gt;. Pages that didn't set their own &lt;code&gt;twitter&lt;/code&gt; object inherited those, so every X card carried the homepage's title.&lt;/p&gt;

&lt;p&gt;The fix was to keep only the card type in the layout. On Next.js 16, each page's X tags then took their title, description and image from that page's &lt;code&gt;openGraph&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/layout.tsx&lt;/span&gt;
&lt;span class="nx"&gt;twitter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;card&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;summary_large_image&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Check your own site
&lt;/h2&gt;

&lt;p&gt;Open a page, view its source and search for &lt;code&gt;og:image&lt;/code&gt;. Don't stop at the homepage. Check one page from each route, because those are where the tag goes missing.&lt;/p&gt;

&lt;p&gt;For a quicker check, paste the HTML into this &lt;a href="https://www.afaqrashid.com/tools/nextjs-metadata-checker" rel="noopener noreferrer"&gt;free Next.js metadata checker&lt;/a&gt;. It lists what's missing and gives the Next.js fix for each tag.&lt;/p&gt;

&lt;p&gt;The Open Graph protocol lists &lt;code&gt;og:title&lt;/code&gt;, &lt;code&gt;og:type&lt;/code&gt;, &lt;code&gt;og:image&lt;/code&gt; and &lt;code&gt;og:url&lt;/code&gt; as required. For the image, Meta recommends at least 1200 x 630 pixels. It also caches images by URL, so links shared before your fix may keep their old preview until they're refreshed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata#merging" rel="noopener noreferrer"&gt;Next.js: Metadata merging&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" rel="noopener noreferrer"&gt;Next.js: opengraph-image and twitter-image&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ogp.me/" rel="noopener noreferrer"&gt;The Open Graph protocol&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.facebook.com/docs/sharing/webmasters/images/" rel="noopener noreferrer"&gt;Meta: Images in link shares&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>seo</category>
      <category>react</category>
    </item>
    <item>
      <title>Next.js robots.txt: Why You Shouldn't Block /_next/</title>
      <dc:creator>i-afaqrashid</dc:creator>
      <pubDate>Mon, 02 Nov 2026 14:01:49 +0000</pubDate>
      <link>https://dev.to/iafaqrashid/nextjs-robotstxt-why-you-shouldnt-block-next-1cec</link>
      <guid>https://dev.to/iafaqrashid/nextjs-robotstxt-why-you-shouldnt-block-next-1cec</guid>
      <description>&lt;p&gt;Plenty of Next.js sites have this in their robots.txt. Mine did.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User-agent: *
Allow: /
Disallow: /_next/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks tidy. &lt;code&gt;/_next/&lt;/code&gt; sounds like build output, and build output sounds like something a search engine has no reason to read. But that folder is how your pages reach a browser, and Google renders pages in a browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  What lives under /_next/
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/_next/static/&lt;/code&gt; holds your compiled JavaScript and CSS, plus fonts and imported media. The folders inside it can change between Next.js versions and hosts, so don't write rules for them.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/_next/image&lt;/code&gt; is the default image optimization route. Every &lt;code&gt;next/image&lt;/code&gt; on your site loads through it, unless you've set a custom loader or turned optimization off.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is private. Anyone who opens your site downloads these files, so blocking them hides nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the rule does to Google
&lt;/h2&gt;

&lt;p&gt;Google crawls a URL, renders the page in headless Chromium, then indexes the rendered HTML. It reads robots.txt first and skips any URL you've disallowed.&lt;/p&gt;

&lt;p&gt;So with &lt;code&gt;/_next/&lt;/code&gt; blocked, Google gets your HTML and not much else. Its JavaScript docs are direct: "Google Search won't render JavaScript from blocked files or on blocked pages." Its robots.txt docs warn that if you block resources a page needs, Google "won't do a good job of analyzing pages that depend on those resources."&lt;/p&gt;

&lt;p&gt;Images take a hit too. A &lt;code&gt;next/image&lt;/code&gt; points to a URL under &lt;code&gt;/_next/image&lt;/code&gt;, and robots.txt is one of the methods Google documents for keeping images out of search results. A blanket rule does that to every optimized image on the site.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why nobody notices
&lt;/h2&gt;

&lt;p&gt;Next.js sends real HTML from the server, so your text and links are in the first response. The page still gets indexed and can still rank for your name.&lt;/p&gt;

&lt;p&gt;Your scores won't warn you either. My site scored 100 on all four Lighthouse categories with this rule in place.&lt;/p&gt;

&lt;p&gt;The damage shows up elsewhere. Google analyzes a page without its styles, and anything that only appears after JavaScript runs is at risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Delete the line. If you have routes that crawlers shouldn't request, block those by name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;MetadataRoute&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;next&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;robots&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nx"&gt;MetadataRoute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Robots&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;userAgent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;allow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;disallow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/private/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;sitemap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://example.com/sitemap.xml&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Be careful with &lt;code&gt;/api/&lt;/code&gt; as well. If a page loads its content from an API route in the browser, blocking that route keeps the content from Google for the same reason.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check your own site
&lt;/h2&gt;

&lt;p&gt;In Search Console, open URL Inspection, run a live test and open the tested page. You get a screenshot of what Google rendered and a list of the resources it loaded. Google's help page says visual differences there "might be the result of resources that are blocked".&lt;/p&gt;

&lt;p&gt;For a quicker check, paste your robots.txt into this &lt;a href="https://www.afaqrashid.com/tools/nextjs-robots-txt-checker" rel="noopener noreferrer"&gt;free Next.js robots.txt checker&lt;/a&gt;. It runs in your browser and shows which Next.js paths are blocked and which line is doing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  robots.txt isn't a privacy tool
&lt;/h2&gt;

&lt;p&gt;If the goal was to hide something, this rule was never going to do it. Google says robots.txt "is not a mechanism for keeping a web page out of Google", and a blocked URL can still appear in results without a description.&lt;/p&gt;

&lt;p&gt;To keep a page out of search, use noindex or a password. Don't block that page in robots.txt as well, because Google has to crawl it to see the noindex.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics" rel="noopener noreferrer"&gt;Google: JavaScript SEO basics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs/crawling-indexing/robots/intro" rel="noopener noreferrer"&gt;Google: Introduction to robots.txt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs/crawling-indexing/prevent-images-on-your-page" rel="noopener noreferrer"&gt;Google: Remove images from search results&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://support.google.com/webmasters/answer/9012289" rel="noopener noreferrer"&gt;Google: URL Inspection tool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" rel="noopener noreferrer"&gt;Next.js: robots.txt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nextjs.org/docs/app/api-reference/components/image" rel="noopener noreferrer"&gt;Next.js: Image component&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>nextjs</category>
      <category>seo</category>
      <category>webdev</category>
      <category>react</category>
    </item>
  </channel>
</rss>
