<?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: Marat Y</title>
    <description>The latest articles on DEV Community by Marat Y (@maratyel).</description>
    <link>https://dev.to/maratyel</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%2F4264655%2F8ba92060-e602-499f-95b8-e7152cca2704.png</url>
      <title>DEV Community: Marat Y</title>
      <link>https://dev.to/maratyel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maratyel"/>
    <language>en</language>
    <item>
      <title>How to Check What GPTBot Sees on Your React Site with curl</title>
      <dc:creator>Marat Y</dc:creator>
      <pubDate>Wed, 25 Nov 2026 12:01:46 +0000</pubDate>
      <link>https://dev.to/maratyel/how-to-check-what-gptbot-sees-on-your-react-site-with-curl-3k5m</link>
      <guid>https://dev.to/maratyel/how-to-check-what-gptbot-sees-on-your-react-site-with-curl-3k5m</guid>
      <description>&lt;p&gt;Your React app looks good on a browser, but have you thought about how it appears to a crawler that doesn't use JavaScript? For a long time, most AI crawlers, like those from ChatGPT and Claude, didn't execute JavaScript - they would just fetch the files. &lt;a href="https://vercel.com/blog/the-rise-of-the-ai-crawler" rel="noopener noreferrer"&gt;Vercel &lt;/a&gt;found this out when they analyzed how these crawlers work. There are some reports that OpenAI's crawlers can render some sites, but this was only seen in a few cases last autumn, and we haven't heard anything official about it.&lt;br&gt;
You can easily test your website in just a few minutes using curl. The good thing is you don't need to install anything extra - it's likely already on your computer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: fetch the page as GPTBot&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -A &lt;span class="s2"&gt;"Mozilla/5.0 (compatible; GPTBot/1.0; +https://openai.com/gptbot)"&lt;/span&gt; \
  https://example.com/ -o gptbot.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;-A&lt;/code&gt;sets the User-Agent. If you check OpenAI's &lt;a href="https://developers.openai.com/api/docs/bots" rel="noopener noreferrer"&gt;crawler page&lt;/a&gt;, you'll see the exact strings they use for GPTBot, OAI-SearchBot, and ChatGPT-User. For our purposes, any string with "GPTBot" in it works the same, unless your server is checking the IP addresses of bots.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: look for your content&lt;/strong&gt;&lt;br&gt;
Choose a sentence that catches your eye on the page and then look it up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -c &lt;span class="s2"&gt;"Start your free trial"&lt;/span&gt; gptbot.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;0&lt;/code&gt; means a crawler that doesn't show anything will never see that sentence. So, take a look at the basics too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -o &lt;span class="s2"&gt;"&amp;lt;title&amp;gt;[^&amp;lt;]*&amp;lt;/title&amp;gt;"&lt;/span&gt; gptbot.html
grep -o &lt;span class="s1"&gt;'&amp;lt;meta name="description"[^&amp;gt;]*&amp;gt;'&lt;/span&gt; gptbot.html
grep -o &lt;span class="s1"&gt;'&amp;lt;meta property="og:[^&amp;gt;]*&amp;gt;'&lt;/span&gt; gptbot.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the title of every page is the same basic phrase, that means the meta tags are being updated in the user's browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: compare raw HTML with the rendered page&lt;/strong&gt;&lt;br&gt;
Count visible words in both versions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# what GPTBot gets&lt;/span&gt;
sed -e &lt;span class="s1"&gt;'s/&amp;lt;[^&amp;gt;]*&amp;gt;//g'&lt;/span&gt; gptbot.html &lt;span class="o"&gt;|&lt;/span&gt; wc -w

&lt;span class="c"&gt;# what a browser builds&lt;/span&gt;
google-chrome --headless --dump-dom https://example.com/ \
  &lt;span class="o"&gt;|&lt;/span&gt; sed -e &lt;span class="s1"&gt;'s/&amp;lt;[^&amp;gt;]*&amp;gt;//g'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; wc -w
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a Mac, you can usually find the Chrome app at &lt;code&gt;/Applications/Google Chrome.app/Contents/MacOS/Google Chrome&lt;/code&gt;. The way it removes tags is pretty basic, so the numbers won't be exact. But what's important is how they compare: if it's 50 versus 2,000, that means bots can barely see anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: run it across your important pages&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="nv"&gt;UA&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Mozilla/5.0 (compatible; GPTBot/1.0; +https://openai.com/gptbot)"&lt;/span&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; -r url&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="nv"&gt;words&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;curl -s -A &lt;span class="s2"&gt;"$UA"&lt;/span&gt; &lt;span class="s2"&gt;"$url"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sed -e &lt;span class="s1"&gt;'s/&amp;lt;[^&amp;gt;]*&amp;gt;//g'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; wc -w&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$words  $url"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; urls.txt &lt;span class="o"&gt;|&lt;/span&gt; sort -n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make a list of URLs in a file called &lt;code&gt;urls.txt&lt;/code&gt;, with each URL on a new line. The pages that show up at the top of the results are the ones that are hardest for crawlers to handle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What this test does and doesn't tell you&lt;/strong&gt;&lt;br&gt;
So, when a request comes in saying it's from GPTBot, your server and CDN will respond in a certain way - that's basically what a spoofed User-Agent tells you. But there's a bit more to it than that.&lt;br&gt;
Some websites check if a visitor is a bot by looking at its IP address, and they might think a fake GPTBot is a real person or block it completely. This means you could get different results than what the actual crawler would get. If you have a firewall or CDN with rules for bots, you should check its logs to see if the GPTBot has visited your site for real. OpenAI makes its crawler IP addresses public, so you can verify if a visit is actually from them and not just someone pretending to be GPTBot.&lt;br&gt;
The test doesn't tell you if the crawler actually visits your site. That's controlled by robots.txt and the settings on your content delivery network (CDN). Check your robots.txt file for lines that mention GPTBot, OAI-SearchBot, or ChatGPT-User. Make sure you're not accidentally blocking them - or that you're intentionally blocking them, if that's what you want. Blocking can be a good idea, but you should do it on purpose, not by mistake.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do with the results&lt;/strong&gt;&lt;br&gt;
If important pages don't have much on them, you've got a few options to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you're thinking of making a change, consider using server-side rendering or static generation for pages that are open to the public.&lt;/li&gt;
&lt;li&gt;So, prerendering is when we give bots a quick snapshot of our website in HTML, while users get the full app experience. We can either host the prerender server ourselves using open-source software or pay for a service to do it for us - I actually work for a company called &lt;a href="https://renderlix.com/" rel="noopener noreferrer"&gt;Renderlix&lt;/a&gt;, which deals with AI crawlers and offers this service with all its plans.&lt;/li&gt;
&lt;li&gt;You can get some quick results by adding a real title, description, and Open Graph tags right into your index.html file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After you make a choice, run the script again. This is a simple way to check for errors and it won't cost you much.&lt;/p&gt;

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