<?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: Marc Mulvaney</title>
    <description>The latest articles on DEV Community by Marc Mulvaney (@freewebsite247).</description>
    <link>https://dev.to/freewebsite247</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%2F4215691%2F59a857f7-dde1-4f66-9ad0-6fdb7d180301.png</url>
      <title>DEV Community: Marc Mulvaney</title>
      <link>https://dev.to/freewebsite247</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/freewebsite247"/>
    <language>en</language>
    <item>
      <title>A Brand Name Alone Doesn't Count in ChatGPT's Business Hub. Here's the JSON-LD and DNS Fix</title>
      <dc:creator>Marc Mulvaney</dc:creator>
      <pubDate>Tue, 17 Nov 2026 09:03:40 +0000</pubDate>
      <link>https://dev.to/freewebsite247/a-brand-name-alone-doesnt-count-in-chatgpts-business-hub-heres-the-json-ld-and-dns-fix-1d60</link>
      <guid>https://dev.to/freewebsite247/a-brand-name-alone-doesnt-count-in-chatgpts-business-hub-heres-the-json-ld-and-dns-fix-1d60</guid>
      <description>&lt;p&gt;OpenAI's ChatGPT Business Hub lets a business claim its listing. The Insights panel shows mentions and website clicks for the past 28 days. OpenAI defines a mention narrowly. For an online business, a mention counts only when ChatGPT references the business's website. The brand name alone does not count. For a local business, a mention counts when ChatGPT shows a result for that location.&lt;/p&gt;

&lt;p&gt;The developer's job follows from that definition. Every crawler and every model must see one name tied to one URL. This post covers three tasks: pick one canonical name and URL, publish Organization or LocalBusiness JSON-LD, and claim the domain with a DNS TXT record. The checks and the common mistakes come after.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Pick one name and one URL
&lt;/h2&gt;

&lt;p&gt;Write down two strings before you touch code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The exact name. "Example Corporation" goes everywhere. "Example Corp." on LinkedIn and "ExampleCorp" on GitHub are two extra entities to a parser.&lt;/li&gt;
&lt;li&gt;The exact home URL. Choose https. Choose www or non-&lt;a href="http://www" rel="noopener noreferrer"&gt;www&lt;/a&gt;. Choose a trailing slash or none. Example: &lt;code&gt;https://www.example.com/&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The name string goes in five places: the JSON-LD &lt;code&gt;name&lt;/code&gt;, the home page &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt;, &lt;code&gt;og:site_name&lt;/code&gt;, the footer, and the name field of every profile you control. The URL goes in the website field of every profile. Every other host and scheme redirects to the canonical URL with a 301.&lt;/p&gt;

&lt;p&gt;Check the redirects from a terminal:&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="k"&gt;for&lt;/span&gt; u &lt;span class="k"&gt;in&lt;/span&gt; http://example.com/ https://example.com/ http://www.example.com/&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$u"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; curl -sI &lt;span class="s2"&gt;"$u"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -i -E &lt;span class="s2"&gt;"^(HTTP|location)"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each non-canonical variant returns &lt;code&gt;HTTP/1.1 301&lt;/code&gt; and a &lt;code&gt;location:&lt;/code&gt; header that points at the canonical URL. A 302 or a 200 on a variant means the redirect is missing or temporary.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Organization JSON-LD on the home page
&lt;/h2&gt;

&lt;p&gt;Google's Organization documentation places the markup on the home page, or on one page that describes the organisation. Google lists no required properties for Organization. Google recommends &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;url&lt;/code&gt;, &lt;code&gt;logo&lt;/code&gt;, &lt;code&gt;sameAs&lt;/code&gt;, &lt;code&gt;address&lt;/code&gt;, &lt;code&gt;telephone&lt;/code&gt;, &lt;code&gt;email&lt;/code&gt; and &lt;code&gt;description&lt;/code&gt;. Google uses &lt;code&gt;url&lt;/code&gt; to identify the organisation, so &lt;code&gt;url&lt;/code&gt; holds the canonical URL from step 1.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"application/ld+json"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"@context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://schema.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Organization"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.example.com/#organization"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Example Corporation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"legalName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Example Corporation Inc."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.example.com/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"logo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.example.com/images/logo.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Example Corporation makes replacement parts for small manufacturers."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"contact@example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"telephone"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"+1-555-0100"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"sameAs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s2"&gt;"https://www.linkedin.com/company/example-corporation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"https://www.youtube.com/@examplecorp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"https://github.com/examplecorp"&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"address"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"PostalAddress"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"streetAddress"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"100 Main St"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"addressLocality"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Springfield"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"addressRegion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"IL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"postalCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"62701"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"addressCountry"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"US"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Field rules from Google's documentation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sameAs&lt;/code&gt; lists pages on other sites about the same organisation. List only profiles that show the exact same name and link to the exact same URL.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;logo&lt;/code&gt; must be at least 112x112 px. The image URL must be crawlable and indexable. The file format must be one Google Images supports. The logo must look right on a purely white background.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;legalName&lt;/code&gt; holds the registered name when it differs from the trading name. The trading name stays in &lt;code&gt;name&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@id&lt;/code&gt; gives the node a stable identifier. A &lt;code&gt;WebSite&lt;/code&gt; or &lt;code&gt;WebPage&lt;/code&gt; node on another page references &lt;code&gt;"publisher": {"@id": "https://www.example.com/#organization"}&lt;/code&gt; instead of repeating the block.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Local business: use the most specific LocalBusiness subtype
&lt;/h2&gt;

&lt;p&gt;Google's local business documentation requires &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;address&lt;/code&gt;. Google recommends &lt;code&gt;geo&lt;/code&gt;, &lt;code&gt;openingHoursSpecification&lt;/code&gt;, &lt;code&gt;priceRange&lt;/code&gt;, &lt;code&gt;telephone&lt;/code&gt; and &lt;code&gt;url&lt;/code&gt;. Pick the most specific schema.org subtype: &lt;code&gt;Plumber&lt;/code&gt;, &lt;code&gt;Electrician&lt;/code&gt;, &lt;code&gt;Dentist&lt;/code&gt;, &lt;code&gt;HairSalon&lt;/code&gt;, &lt;code&gt;Restaurant&lt;/code&gt;. A business with several trades lists them as an array, for example &lt;code&gt;"@type": ["Electrician", "Plumber", "Locksmith"]&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"application/ld+json"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"@context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://schema.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Plumber"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.example.com/#business"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Example Plumbing"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.example.com/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"image"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.example.com/images/van.jpg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"telephone"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"+1-555-0101"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"priceRange"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"$$"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"address"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"PostalAddress"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"streetAddress"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"100 Main St"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"addressLocality"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Springfield"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"addressRegion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"IL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"postalCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"62701"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"addressCountry"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"US"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"geo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"GeoCoordinates"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"latitude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;39.78173&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"longitude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;89.65015&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"openingHoursSpecification"&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="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"OpeningHoursSpecification"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s2"&gt;"dayOfWeek"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Monday"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Tuesday"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Wednesday"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Thursday"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Friday"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s2"&gt;"opens"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"08:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s2"&gt;"closes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"17:00"&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="s2"&gt;"sameAs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s2"&gt;"https://www.yelp.com/biz/example-plumbing-springfield"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"https://www.facebook.com/exampleplumbing"&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rules for this block:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One entity gets one block. A local business publishes the subtype block, not a second Organization block with different data for the same business.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;geo.latitude&lt;/code&gt; and &lt;code&gt;geo.longitude&lt;/code&gt; need at least five decimal places.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;opens&lt;/code&gt; and &lt;code&gt;closes&lt;/code&gt; use 24-hour &lt;code&gt;HH:MM&lt;/code&gt; times. A business open 24 hours sets &lt;code&gt;opens&lt;/code&gt; to &lt;code&gt;"00:00"&lt;/code&gt; and &lt;code&gt;closes&lt;/code&gt; to &lt;code&gt;"23:59"&lt;/code&gt;. A closed day sets both to &lt;code&gt;"00:00"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;telephone&lt;/code&gt; includes the country code and the area code.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;priceRange&lt;/code&gt; takes a currency-symbol string such as &lt;code&gt;"$$"&lt;/code&gt; or a specific range such as &lt;code&gt;"$100-$300"&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Claim the domain with a DNS TXT record
&lt;/h2&gt;

&lt;p&gt;The Business Hub offers the verification methods available for your business, such as business phone, business email, website domain via a DNS TXT record, or Shopify. After that step, OpenAI runs an identity check through Persona before the account can publish changes or view insights. The DNS route proves control of the domain itself and does not depend on anyone's inbox.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the hub, choose the website domain option. Copy the token.&lt;/li&gt;
&lt;li&gt;In your DNS provider (Cloudflare, Route 53, your registrar), add a TXT record. Use the exact record name the hub shows. Paste the token as the value. Set the TTL to 300.&lt;/li&gt;
&lt;li&gt;Wait five minutes. Query a public resolver from outside your network:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# use the exact record name the hub gave you&lt;/span&gt;
dig +short TXT example.com @1.1.1.1

&lt;span class="c"&gt;# Windows&lt;/span&gt;
nslookup -type=TXT example.com 1.1.1.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;The output shows the token in quotes. Click verify in the hub.&lt;/li&gt;
&lt;li&gt;Leave the record in place. OpenAI does not say whether it rechecks the record, so keeping it costs nothing and keeps proof of control.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  5. Check it worked
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Rich Results Test at &lt;a href="https://search.google.com/test/rich-results" rel="noopener noreferrer"&gt;https://search.google.com/test/rich-results&lt;/a&gt; . Paste the home URL. The result lists one Organization or LocalBusiness item with zero errors.&lt;/li&gt;
&lt;li&gt;Schema Markup Validator at &lt;a href="https://validator.schema.org/" rel="noopener noreferrer"&gt;https://validator.schema.org/&lt;/a&gt; . It validates every schema.org type, including types Google shows no rich result for.&lt;/li&gt;
&lt;li&gt;A script for a list of client sites. It pulls every JSON-LD block from a page and prints type, name, url and the sameAs count:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;

&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;req&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"User-Agent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"jsonld-check/1.0"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;urlopen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&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="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ignore"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;pattern&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;'&amp;lt;script[^&amp;gt;]+type=["\']application/ld\+json["\'][^&amp;gt;]*&amp;gt;(.*?)&amp;lt;/script&amp;gt;'&lt;/span&gt;
&lt;span class="n"&gt;blocks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;I&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{len(blocks)} JSON-LD block(s) found"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;blocks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;nodes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"@graph"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"|"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"|"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"|"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"sameAs"&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="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"sameAs"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it as &lt;code&gt;python3 check_jsonld.py https://www.example.com/&lt;/code&gt;. A correct page prints exactly one organisation-type node, the exact name string and the exact canonical URL. A &lt;code&gt;json.loads&lt;/code&gt; exception means the block has a syntax error and no parser reads it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the hub, Insights covers the past 28 days. Read the trend after a full month.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Six mistakes and their fixes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Name without URL. Directory listings, podcast show notes, conference bios and "our partners" pages show the name and omit the link. Fix: add the canonical URL next to the name, then add those pages to &lt;code&gt;sameAs&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Mismatched names. The legal entity appears in one place and the trading name in another. Fix: &lt;code&gt;name&lt;/code&gt; holds the trading name, &lt;code&gt;legalName&lt;/code&gt; holds the legal one.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;url&lt;/code&gt; that differs from the live page. http instead of https, or the non-www host. Fix: copy the canonical URL from the browser address bar after the redirects settle.&lt;/li&gt;
&lt;li&gt;A logo nobody can fetch. robots.txt blocks it, a data URI holds it, or a login protects it. Fix: a plain public image URL.&lt;/li&gt;
&lt;li&gt;Two blocks that disagree. A theme or plugin injects an Organization block with the site title and you add another by hand. Fix: run the script above and remove one block when it prints two organisation nodes.&lt;/li&gt;
&lt;li&gt;A TXT record deleted after verification. Fix: leave the record and document it in the DNS change log.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A prompt to audit your profiles
&lt;/h2&gt;

&lt;p&gt;Copy the name and website fields from each profile into a list. Paste this into the AI assistant you use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;My company's exact name is "[Example Corporation]" and its canonical website URL is "[https://www.example.com/]". Below is a list of my public profiles, each with the name and website value I copied from that profile:

[profile URL 1] | name shown: [...] | website shown: [...]
[profile URL 2] | name shown: [...] | website shown: [...]

For each line, output a table with: profile URL, name matches exactly (yes/no), website matches exactly (yes/no), the exact text I should change it to. Then list which profile URLs are safe to add to my sameAs array.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Expectations
&lt;/h2&gt;

&lt;p&gt;OpenAI states that claiming a business does not guarantee increased visibility. OpenAI states that advertising does not influence its independent answers. Local stores and restaurants can currently claim only an existing U.S. listing. The markup above removes the ambiguity between a name and a URL. OpenAI does not say that structured data affects mentions. The markup gives every parser the same name and URL pair to read.&lt;/p&gt;

&lt;p&gt;Sources: OpenAI Help, "Setting up your business on ChatGPT" (&lt;a href="https://help.openai.com/en/articles/20001635-setting-up-your-business-on-chatgpt" rel="noopener noreferrer"&gt;https://help.openai.com/en/articles/20001635-setting-up-your-business-on-chatgpt&lt;/a&gt;). Google Search Central, Organization structured data (&lt;a href="https://developers.google.com/search/docs/appearance/structured-data/organization" rel="noopener noreferrer"&gt;https://developers.google.com/search/docs/appearance/structured-data/organization&lt;/a&gt;) and Local business structured data (&lt;a href="https://developers.google.com/search/docs/appearance/structured-data/local-business" rel="noopener noreferrer"&gt;https://developers.google.com/search/docs/appearance/structured-data/local-business&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Marc Mulvaney, founder of freewebsite247, has built websites and done SEO since 1997. freewebsite247 builds websites for US local businesses with this markup included. Every site is built by humans, assisted with AI. The website is free, you just pay for the hosting.&lt;/p&gt;

&lt;p&gt;If that's too much work, contact us and we'll make you a free website.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>ai</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The SEO launch checklist for a new website, with a prompt that runs it for you</title>
      <dc:creator>Marc Mulvaney</dc:creator>
      <pubDate>Fri, 13 Nov 2026 14:00:00 +0000</pubDate>
      <link>https://dev.to/freewebsite247/the-seo-launch-checklist-for-a-new-website-with-a-prompt-that-runs-it-for-you-5hcn</link>
      <guid>https://dev.to/freewebsite247/the-seo-launch-checklist-for-a-new-website-with-a-prompt-that-runs-it-for-you-5hcn</guid>
      <description>&lt;p&gt;New sites rarely fail in search because of strategy. They fail because the staging &lt;code&gt;noindex&lt;/code&gt; shipped to production, the canonicals point at the preview domain, or the sitemap lists URLs that redirect. And the checklist everyone followed had nothing you could actually run.&lt;/p&gt;

&lt;p&gt;Below, a popular launch checklist becomes commands: checks on the build before launch, then on the live domain after. The examples use an Astro &lt;code&gt;dist/&lt;/code&gt; folder and &lt;code&gt;https://www.example.com&lt;/code&gt;; swap in your own. At the end is a prompt that has a coding agent run the lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Check the build for leftover noindex and bad canonicals
&lt;/h2&gt;

&lt;p&gt;After &lt;code&gt;npm run build&lt;/code&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;# Pages still carrying noindex&lt;/span&gt;
grep -rli &lt;span class="s1"&gt;'noindex'&lt;/span&gt; dist --include=&lt;span class="s1"&gt;'*.html'&lt;/span&gt;

&lt;span class="c"&gt;# Pages with no canonical tag&lt;/span&gt;
grep -rL &lt;span class="s1"&gt;'rel="canonical"'&lt;/span&gt; dist --include=&lt;span class="s1"&gt;'*.html'&lt;/span&gt;

&lt;span class="c"&gt;# Canonicals that don't point at production&lt;/span&gt;
grep -rhoE &lt;span class="s1"&gt;'rel="canonical" href="[^"]+"'&lt;/span&gt; dist --include=&lt;span class="s1"&gt;'*.html'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -v &lt;span class="s1"&gt;'href="https://www.example.com'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All three should print nothing. The last pattern assumes &lt;code&gt;rel&lt;/code&gt; comes before &lt;code&gt;href&lt;/code&gt;, the usual order in layouts.&lt;/p&gt;

&lt;p&gt;Then open &lt;code&gt;dist/robots.txt&lt;/code&gt;. A &lt;code&gt;Disallow: /&lt;/code&gt; left over from staging blocks the whole site. Add a &lt;code&gt;Sitemap:&lt;/code&gt; line with the full URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Check titles, descriptions, H1s and alt text
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Duplicate titles&lt;/span&gt;
grep -rhoE &lt;span class="s1"&gt;'&amp;lt;title&amp;gt;[^&amp;lt;]*&amp;lt;/title&amp;gt;'&lt;/span&gt; dist --include=&lt;span class="s1"&gt;'*.html'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sort &lt;span class="o"&gt;|&lt;/span&gt; uniq -d

&lt;span class="c"&gt;# Pages with no meta description&lt;/span&gt;
grep -rL &lt;span class="s1"&gt;'name="description"'&lt;/span&gt; dist --include=&lt;span class="s1"&gt;'*.html'&lt;/span&gt;

&lt;span class="c"&gt;# Pages without exactly one H1&lt;/span&gt;
find dist -name &lt;span class="s1"&gt;'*.html'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; -r f&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="nv"&gt;n&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;grep -o &lt;span class="s1"&gt;'&amp;lt;h1'&lt;/span&gt; &lt;span class="s2"&gt;"$f"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; wc -l&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"$n"&lt;/span&gt; -ne 1 &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$n $f"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;

&lt;span class="c"&gt;# &amp;lt;img&amp;gt; tags with no alt attribute at all&lt;/span&gt;
grep -rhoE &lt;span class="s1"&gt;'&amp;lt;img[^&amp;gt;]*&amp;gt;'&lt;/span&gt; dist --include=&lt;span class="s1"&gt;'*.html'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -v &lt;span class="s1"&gt;'alt='&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;alt=""&lt;/code&gt; is correct for decorative images, so the last check only flags missing attributes. One H1 is a good convention, but Google has said several won't hurt, so treat those hits as review items.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Find broken links and orphan pages
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;npx linkinator ./dist --recurse&lt;/code&gt; serves the folder and follows every link. Each 404 is a broken link or a page that didn't build.&lt;/p&gt;

&lt;p&gt;For orphans (pages nothing links to), crawl the local preview with Screaming Frog (free up to 500 URLs) with sitemap crawling on. It flags sitemap URLs it never reached through links and shows click depth. The original's "within 3 clicks" is a rule of thumb, not a Google rule.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Validate schema with the right tool
&lt;/h2&gt;

&lt;p&gt;Pull the JSON-LD out of a page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -oE &lt;span class="s1"&gt;'&amp;lt;script type="application/ld\+json"&amp;gt;[^&amp;lt;]+'&lt;/span&gt; dist/index.html \
  &lt;span class="o"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;'s/^&amp;lt;script[^&amp;gt;]*&amp;gt;//'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste it into the &lt;a href="https://validator.schema.org/" rel="noopener noreferrer"&gt;Schema Markup Validator&lt;/a&gt;, which checks any schema.org type, and the code tab of Google's &lt;a href="https://search.google.com/test/rich-results" rel="noopener noreferrer"&gt;Rich Results Test&lt;/a&gt;, which only reports types Google turns into rich results.&lt;/p&gt;

&lt;p&gt;Valid markup doesn't guarantee a rich result. Since August 2023, Google shows &lt;a href="https://developers.google.com/search/blog/2023/08/howto-faq-changes" rel="noopener noreferrer"&gt;FAQ rich results only for well-known government and health sites&lt;/a&gt;, so &lt;code&gt;FAQPage&lt;/code&gt; on a dentist's site changes nothing in search.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Run Lighthouse CI on the build
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// lighthouserc.js&lt;/span&gt;
&lt;span class="kd"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;ci&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;collect&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;staticDistDir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'./dist'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'http://localhost/'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'http://localhost/contact/'&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="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;assert&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;assertions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s1"&gt;'categories:seo'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'error'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;minScore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.9&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="s1"&gt;'categories:performance'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'warn'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;minScore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.9&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="p"&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="p"&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;Run &lt;code&gt;npx @lhci/cli autorun&lt;/code&gt;. Without a &lt;code&gt;url&lt;/code&gt; list, &lt;a href="https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/configuration.md" rel="noopener noreferrer"&gt;Lighthouse CI&lt;/a&gt; audits only five auto-discovered pages, so list one per template.&lt;/p&gt;

&lt;p&gt;Lighthouse emulates a phone by default. That's your "mobile usability" check now, since Search Console's Mobile Usability report and the Mobile-Friendly Test were retired in December 2023. Then tap through the menu, forms and phone links on a real phone.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. After deploy: redirects and headers
&lt;/h2&gt;

&lt;p&gt;On the live domain, every variant should reach the same URL in one hop:&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="k"&gt;for&lt;/span&gt; u &lt;span class="k"&gt;in&lt;/span&gt; http://example.com http://www.example.com https://example.com https://www.example.com&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  curl -sIL -o /dev/null \
    -w &lt;span class="s2"&gt;"$u -&amp;gt; %{url_effective} (%{http_code}, %{num_redirects} redirects)\n"&lt;/span&gt; &lt;span class="s2"&gt;"$u"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want &lt;code&gt;200&lt;/code&gt; and at most one redirect each. Then check headers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sI https://www.example.com/ &lt;span class="o"&gt;|&lt;/span&gt; grep -iE &lt;span class="s1"&gt;'^(HTTP|x-robots-tag)'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An &lt;code&gt;X-Robots-Tag: noindex&lt;/code&gt; header &lt;a href="https://developers.google.com/search/docs/crawling-indexing/block-indexing" rel="noopener noreferrer"&gt;works like the meta tag&lt;/a&gt;, and grepping &lt;code&gt;dist/&lt;/code&gt; will never find it. Cloudflare Pages &lt;a href="https://developers.cloudflare.com/pages/configuration/preview-deployments/" rel="noopener noreferrer"&gt;adds it to every preview deployment&lt;/a&gt; by default, so confirm production doesn't send it. Run the loop over any old site's URLs too.&lt;/p&gt;

&lt;p&gt;If robots.txt blocks a URL, Google never sees its &lt;code&gt;noindex&lt;/code&gt;, so protect staging with a password, not &lt;code&gt;Disallow&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. After deploy: every sitemap URL returns 200
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://www.example.com/sitemap-0.xml \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -oE &lt;span class="s1"&gt;'&amp;lt;loc&amp;gt;[^&amp;lt;]+&amp;lt;/loc&amp;gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sed -E &lt;span class="s1"&gt;'s#&amp;lt;/?loc&amp;gt;##g'&lt;/span&gt; \
  &lt;span class="o"&gt;|&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;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;curl -s -o /dev/null -w &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; &lt;span class="s2"&gt;"$url"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"$code"&lt;/span&gt; != &lt;span class="s2"&gt;"200"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$code $url"&lt;/span&gt;
    &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No output is a pass. The loop doesn't follow redirects on purpose: a sitemap should list only canonical URLs, so a 301 is a fail. Google &lt;a href="https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap" rel="noopener noreferrer"&gt;ignores &lt;code&gt;priority&lt;/code&gt; and &lt;code&gt;changefreq&lt;/code&gt;&lt;/a&gt;, so skip them.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. After deploy: Search Console and PageSpeed
&lt;/h2&gt;

&lt;p&gt;URL Inspection only works on a verified property Google can reach, so "test key URLs in GSC" is a post-launch job for most staging setups. Add a Domain property through DNS, submit the sitemap, and run "Test live URL" on one page per template. Under "View tested page", check the rendered HTML has your main content and nav links.&lt;/p&gt;

&lt;p&gt;The PageSpeed Insights API &lt;a href="https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed" rel="noopener noreferrer"&gt;defaults to desktop&lt;/a&gt;, so set the strategy:&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 &lt;span class="s2"&gt;"https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://www.example.com/&amp;amp;strategy=MOBILE&amp;amp;category=PERFORMANCE&amp;amp;category=SEO"&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; jq &lt;span class="s1"&gt;'.lighthouseResult.categories | map_values(.score)'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A new site has no Core Web Vitals field data until enough Chrome users visit, so at launch you're reading lab numbers. The metrics are LCP, INP (which replaced FID in March 2024) and CLS.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Test conversions in GA4 DebugView
&lt;/h2&gt;

&lt;p&gt;Open the live site through &lt;a href="https://tagassistant.google.com/" rel="noopener noreferrer"&gt;Tag Assistant&lt;/a&gt; or GTM preview, then GA4's Admin &amp;gt; Data display &amp;gt; DebugView. Submit a test form and tap the phone link. Each event should appear once, with the right name. Mark it as a key event (GA4's current name for conversions).&lt;/p&gt;

&lt;p&gt;Events &lt;a href="https://support.google.com/analytics/answer/7201382" rel="noopener noreferrer"&gt;don't show in DebugView&lt;/a&gt; if consent mode is on and you haven't accepted analytics cookies. And a form that submits with GET puts the visitor's email in the URL, which GA4 collects in &lt;code&gt;page_location&lt;/code&gt;. Use POST, and check event parameters for names, emails or phone numbers.&lt;/p&gt;

&lt;p&gt;For two weeks after launch, watch the Pages report and Crawl stats in Search Console for 404s and 5xx errors.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt
&lt;/h2&gt;

&lt;p&gt;For Claude Code, Codex or Cursor in agent mode, from the project root after a build and deploy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are auditing a static website before and after launch. Run every check yourself with shell commands. Do not guess results and do not edit any files.

Build folder: [dist]
Production URL: [https://www.example.com]
Staging or preview host to flag: [project.pages.dev]
Sitemap URL: [https://www.example.com/sitemap-index.xml]
Key pages, one per template: [/, /services/example/, /contact/]
Old URLs that must redirect: [paste list, or "none"]

Part A, the build folder:
1. HTML files containing "noindex".
2. Missing rel="canonical", canonicals not starting with the production URL, and any link or canonical using the staging host.
3. robots.txt: any Disallow covering a key page, or no Sitemap line.
4. Duplicate or missing &amp;lt;title&amp;gt; and meta description, pages without exactly one &amp;lt;h1&amp;gt;, &amp;lt;img&amp;gt; with no alt attribute.
5. Run npx linkinator [dist] --recurse; list broken internal links and pages no other page links to.
6. JSON-LD on key pages: parses as JSON? Flag FAQPage and any self-written review markup.

Part B, the live site:
7. http, https, www and non-www each reach the production URL in at most one redirect.
8. X-Robots-Tag header on the homepage and key pages.
9. Every URL in the sitemap (and its child sitemaps), fetched without following redirects; list anything not 200.
10. Each old URL 301s to a relevant live page, not all to the homepage.
11. PageSpeed Insights API with strategy=MOBILE per key page: performance and SEO scores.

Output one table: check | part | result (PASS / FAIL / REVIEW) | evidence (file, URL or command output) | fix. After the table, list anything you could not check and why.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before trusting a PASS, run two of the commands yourself and compare. Any row whose evidence paraphrases instead of showing real output gets rerun.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;p&gt;Short on time? Run the noindex grep on &lt;code&gt;dist/&lt;/code&gt;, then the redirect loop and &lt;code&gt;X-Robots-Tag&lt;/code&gt; check the moment the site is live. Those catch the mistakes that keep a whole site out of Google. Everything else fixes one page at a time.&lt;/p&gt;

&lt;p&gt;Based on a post by Bint E Jamil (@seo_bint_ejamil) on X: &lt;a href="https://x.com/seo_bint_ejamil/status/2108812272839864362" rel="noopener noreferrer"&gt;https://x.com/seo_bint_ejamil/status/2108812272839864362&lt;/a&gt;, with corrections and extra steps.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>ai</category>
    </item>
    <item>
      <title>How to set up English and Spanish pages with hreflang on an Astro site</title>
      <dc:creator>Marc Mulvaney</dc:creator>
      <pubDate>Wed, 11 Nov 2026 14:00:00 +0000</pubDate>
      <link>https://dev.to/freewebsite247/how-to-set-up-english-and-spanish-pages-with-hreflang-on-an-astro-site-4mgc</link>
      <guid>https://dev.to/freewebsite247/how-to-set-up-english-and-spanish-pages-with-hreflang-on-an-astro-site-4mgc</guid>
      <description>&lt;p&gt;Many bilingual small business sites keep both languages in one HTML file and hide one with CSS or a JavaScript toggle. A visitor sees one language. Googlebot sees both on the same URL. &lt;a href="https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites" rel="noopener noreferrer"&gt;Google's documentation on multilingual sites&lt;/a&gt; is direct about this: Google "recommends using different URLs for each language version of a page rather than using cookies or browser settings to adjust the content language on the page".&lt;/p&gt;

&lt;p&gt;The fix is one language per URL, English at &lt;code&gt;/&lt;/code&gt; and Spanish at &lt;code&gt;/es/&lt;/code&gt;, with hreflang tags linking each pair. Everything below was built and checked on 12 November 2026 with &lt;a href="https://github.com/withastro/astro/releases/tag/astro%407.4.11" rel="noopener noreferrer"&gt;Astro 7.4.11&lt;/a&gt; and &lt;a href="https://github.com/withastro/astro/releases/tag/%40astrojs%2Fsitemap%403.7.4" rel="noopener noreferrer"&gt;&lt;code&gt;@astrojs/sitemap&lt;/code&gt; 3.7.4&lt;/a&gt;, the current npm releases on that date. Every rule is quoted from &lt;a href="https://developers.google.com/search/docs" rel="noopener noreferrer"&gt;Google Search Central&lt;/a&gt; or the &lt;a href="https://docs.astro.build/" rel="noopener noreferrer"&gt;Astro documentation&lt;/a&gt;, and the build output shown in step 7 is copied from a real &lt;code&gt;npm run build&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;hreflang is now mainstream. The HTTP Archive's &lt;a href="https://almanac.httparchive.org/en/2025/seo#internationalization" rel="noopener noreferrer"&gt;2025 Web Almanac SEO chapter&lt;/a&gt;, published 15 January 2026, found it on about 20% of pages, roughly double the 9 to 10% of 2024. On home pages the most common values are &lt;code&gt;en&lt;/code&gt; (7.4% of mobile home pages), &lt;code&gt;x-default&lt;/code&gt; (6.9%) and &lt;code&gt;es&lt;/code&gt; (3.0%). The same chapter reports that hreflang pointing at &lt;code&gt;http://&lt;/code&gt; URLs is down to 0.1% of mobile pages, so an &lt;code&gt;https://&lt;/code&gt; URL in every tag is the baseline, not an extra.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Check whether you have the problem
&lt;/h2&gt;

&lt;p&gt;Open View Source on an English page and search for a Spanish word from your copy. Or do it from the terminal:&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 https://example.com/contact/ &lt;span class="o"&gt;|&lt;/span&gt; grep -c &lt;span class="s2"&gt;"Contáctenos"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anything above &lt;code&gt;0&lt;/code&gt; means the Spanish text ships inside the English page. The other symptom is a language switcher that only changes a cookie or a &lt;code&gt;localStorage&lt;/code&gt; value while the URL stays the same. Either one means you need the refactor below.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Turn on Astro's i18n routing
&lt;/h2&gt;

&lt;p&gt;In &lt;code&gt;astro.config.mjs&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"astro/config"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sitemap&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"@astrojs/sitemap"&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="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;trailingSlash&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"always"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;i18n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;locales&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"es"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;defaultLocale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;routing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;prefixDefaultLocale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&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="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;integrations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;sitemap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;i18n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;defaultLocale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;locales&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;en&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;es&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"es"&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="p"&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="p"&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="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;prefixDefaultLocale: false&lt;/code&gt; is the default. Writing it out documents that English stays at the root, so existing URLs keep working with no redirects. &lt;code&gt;site&lt;/code&gt; is required because the sitemap integration and &lt;code&gt;getAbsoluteLocaleUrl()&lt;/code&gt; need it to build full URLs. The &lt;a href="https://docs.astro.build/en/reference/modules/astro-i18n/#getabsolutelocaleurl" rel="noopener noreferrer"&gt;Astro i18n reference&lt;/a&gt; says that if &lt;code&gt;site&lt;/code&gt; isn't configured "the function returns a relative URL", and Google requires absolute ones.&lt;/p&gt;

&lt;p&gt;English pages stay in &lt;code&gt;src/pages/&lt;/code&gt;. Spanish pages go in &lt;code&gt;src/pages/es/&lt;/code&gt;. The &lt;a href="https://docs.astro.build/en/guides/internationalization/#create-localized-folders" rel="noopener noreferrer"&gt;Astro i18n guide&lt;/a&gt; states two rules for the folders: "Your folder names must match the items in &lt;code&gt;locales&lt;/code&gt; exactly", and you include a folder for the default locale "only if you configure &lt;code&gt;prefixDefaultLocale: true&lt;/code&gt;".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/pages/
  index.astro
  contact.astro
  services/water-heaters.astro
  es/
    index.astro
    contact.astro
    servicios/calentadores.astro
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Move copy into &lt;code&gt;src/i18n/en.ts&lt;/code&gt; and &lt;code&gt;src/i18n/es.ts&lt;/code&gt; and pick the right file with &lt;code&gt;Astro.currentLocale&lt;/code&gt;. The &lt;a href="https://docs.astro.build/en/reference/api-reference/#currentlocale" rel="noopener noreferrer"&gt;Astro API reference&lt;/a&gt; defines it as "the locale computed from the current URL", falling back to &lt;code&gt;i18n.defaultLocale&lt;/code&gt; when the URL has no locale prefix. It works on static pages, unlike &lt;code&gt;Astro.preferredLocale&lt;/code&gt;, which "is only available for routes rendered on demand and cannot be used on prerendered, static pages".&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Pick the right language code
&lt;/h2&gt;

&lt;p&gt;For a US business with one Spanish version, use plain &lt;code&gt;es&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;es&lt;/code&gt; matches every Spanish-speaking searcher, whatever country their browser reports.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;es-US&lt;/code&gt; targets Spanish speakers in the United States only. That's worth it only if you also publish a separate &lt;code&gt;es-MX&lt;/code&gt; or &lt;code&gt;es-ES&lt;/code&gt; version.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;es-ES&lt;/code&gt; means Spain. The &lt;a href="https://docs.astro.build/en/guides/integrations-guide/sitemap/#i18n" rel="noopener noreferrer"&gt;Astro sitemap documentation&lt;/a&gt; uses &lt;code&gt;es: 'es-ES'&lt;/code&gt; in its example config, so it gets copied onto American sites by accident.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/search/docs/specialty/international/localized-versions#language-codes" rel="noopener noreferrer"&gt;Google's hreflang documentation&lt;/a&gt;, last updated 21 September 2026, sets the format: a language code in ISO 639-1, optionally followed by a region code in ISO 3166-1 Alpha 2. It adds that "other codes that aren't listed in those standards, such as &lt;code&gt;es-419&lt;/code&gt;, aren't supported". The value is case-insensitive, but uppercase regions like &lt;code&gt;en-US&lt;/code&gt; follow the ISO convention. A region on its own, such as &lt;code&gt;US&lt;/code&gt;, is invalid: "Specifying the region alone is not valid."&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Add a reusable hreflang component
&lt;/h2&gt;

&lt;p&gt;Google's rules, from the &lt;a href="https://developers.google.com/search/docs/specialty/international/localized-versions#all-method-guidelines" rel="noopener noreferrer"&gt;guidelines section of the same page&lt;/a&gt;: "Each language version must list itself as well as all other language versions", alternate URLs "must be fully-qualified, including the transport method (http/https)", and "if two pages don't both point to each other, the tags will be ignored". Google's &lt;a href="https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls" rel="noopener noreferrer"&gt;canonicalization documentation&lt;/a&gt; adds that when you use hreflang you should "specify a canonical page in the same language". This component does all four things and adds &lt;code&gt;x-default&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
// src/components/HreflangLinks.astro
import { getAbsoluteLocaleUrl } from "astro:i18n";

interface Props {
  // Only needed when slugs differ by language, e.g.
  // { en: "/services/water-heaters/", es: "/es/servicios/calentadores/" }
  // Leave a locale out when that page has no translation.
  paths?: Record&amp;lt;string, string&amp;gt;;
}

// Locale folder -&amp;gt; hreflang value
const HREFLANG: Record&amp;lt;string, string&amp;gt; = { en: "en", es: "es" };
const DEFAULT_LOCALE = "en";

const { paths } = Astro.props;
const current = Astro.currentLocale ?? DEFAULT_LOCALE;

// "/es/contact/" -&amp;gt; "contact", "/contact/" -&amp;gt; "contact", "/es/" -&amp;gt; ""
const bare = Astro.url.pathname
  .replace(/^\/es(?=\/|$)/, "")
  .replace(/^\/|\/$/g, "");

const alternates = paths
  ? Object.entries(paths).map(([locale, path]) =&amp;gt; ({
      locale,
      href: new URL(path, Astro.site).href,
    }))
  : Object.keys(HREFLANG).map((locale) =&amp;gt; ({
      locale,
      href: getAbsoluteLocaleUrl(locale, bare),
    }));

const self = alternates.find((a) =&amp;gt; a.locale === current);
const fallback = alternates.find((a) =&amp;gt; a.locale === DEFAULT_LOCALE);
---
{self &amp;amp;&amp;amp; &amp;lt;link rel="canonical" href={self.href} /&amp;gt;}
{alternates.length &amp;gt; 1 &amp;amp;&amp;amp; alternates.map((a) =&amp;gt; (
  &amp;lt;link rel="alternate" hreflang={HREFLANG[a.locale]} href={a.href} /&amp;gt;
))}
{alternates.length &amp;gt; 1 &amp;amp;&amp;amp; fallback &amp;amp;&amp;amp; (
  &amp;lt;link rel="alternate" hreflang="x-default" href={fallback.href} /&amp;gt;
)}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;getAbsoluteLocaleUrl()&lt;/code&gt; respects the &lt;code&gt;trailingSlash: "always"&lt;/code&gt; setting, so &lt;code&gt;getAbsoluteLocaleUrl("es", "contact")&lt;/code&gt; returns &lt;code&gt;https://example.com/es/contact/&lt;/code&gt; and &lt;code&gt;getAbsoluteLocaleUrl("en", "")&lt;/code&gt; returns &lt;code&gt;https://example.com/&lt;/code&gt;. That's why the component strips the slashes from &lt;code&gt;bare&lt;/code&gt; instead of keeping them.&lt;/p&gt;

&lt;p&gt;Use it in the base layout and set &lt;code&gt;lang&lt;/code&gt; on &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; from the same value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
// src/layouts/Base.astro
import HreflangLinks from "../components/HreflangLinks.astro";
const { title, description, paths } = Astro.props;
const lang = Astro.currentLocale ?? "en";
---
&amp;lt;html lang={lang}&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;title&amp;gt;{title}&amp;lt;/title&amp;gt;
    &amp;lt;meta name="description" content={description} /&amp;gt;
    &amp;lt;HreflangLinks paths={paths} /&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;&amp;lt;slot /&amp;gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google states it "doesn't use hreflang or the HTML &lt;code&gt;lang&lt;/code&gt; attribute to detect the language of a page". Set &lt;code&gt;lang&lt;/code&gt; anyway. &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/lang" rel="noopener noreferrer"&gt;MDN's documentation for the attribute&lt;/a&gt; says its purpose "is primarily to allow assistive technologies such as screen readers to invoke the correct pronunciation".&lt;/p&gt;

&lt;p&gt;For an English-only page, pass &lt;code&gt;paths={{ en: "/careers/" }}&lt;/code&gt;. The component then prints only the canonical, so you never point Google at a Spanish URL that returns 404.&lt;/p&gt;

&lt;p&gt;On &lt;code&gt;x-default&lt;/code&gt;: &lt;a href="https://developers.google.com/search/docs/specialty/international/localized-versions#xdefault" rel="noopener noreferrer"&gt;Google describes it&lt;/a&gt; as "the fallback page for users whose language settings don't match any of your site's localized versions", adds that "you can use the x-default value for any page", and notes it was designed for language selector pages. For a two-language site with no selector page, pointing &lt;code&gt;x-default&lt;/code&gt; at the English version is the common choice. The Astro docs site does exactly this, as step 7 shows.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Decide on slugs: translate or mirror
&lt;/h2&gt;

&lt;p&gt;Google's multilingual documentation says "it's fine to use localized words in the URL" as long as you use UTF-8 and escape the URLs when linking. So you have two options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mirror the slugs (&lt;code&gt;/es/contact/&lt;/code&gt;). No &lt;code&gt;paths&lt;/code&gt; prop needed, and the sitemap integration pairs the pages for you.&lt;/li&gt;
&lt;li&gt;Translate them (&lt;code&gt;/es/servicios/calentadores/&lt;/code&gt;). Reads naturally to Spanish speakers, but you pass &lt;code&gt;paths&lt;/code&gt; on both pages of the pair.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Translate the service pages people find in search. Mirror contact, privacy and the like.&lt;/p&gt;

&lt;p&gt;Now the catch, visible in the integration's source file &lt;a href="https://github.com/withastro/astro/blob/main/packages/integrations/sitemap/src/generate-sitemap.ts" rel="noopener noreferrer"&gt;&lt;code&gt;generate-sitemap.ts&lt;/code&gt;&lt;/a&gt;. The code comment says it will "find all URLs with the same path (without the locale part), e.g. /en/foo and /es/foo", and when it finds only the page itself it returns no links at all. Translated slugs never match, so those URLs get no &lt;code&gt;xhtml:link&lt;/code&gt; alternates in the sitemap. The source also pushes only the configured locales, so the sitemap never contains an &lt;code&gt;x-default&lt;/code&gt; entry. This is what &lt;code&gt;dist/sitemap-0.xml&lt;/code&gt; contained after the test build for this article (line breaks added):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;url&amp;gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example.com/contact/&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;xhtml:link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/contact/"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;xhtml:link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"es"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/es/contact/"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;url&amp;gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example.com/es/servicios/calentadores/&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;url&amp;gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example.com/services/water-heaters/&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The mirrored contact pair gets &lt;code&gt;en&lt;/code&gt; and &lt;code&gt;es&lt;/code&gt; alternates and no &lt;code&gt;x-default&lt;/code&gt;. The translated water heater pair gets nothing. Google reads hreflang from the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; as well as from sitemaps, and a page's head tags are the complete set here, so the sitemap gap doesn't break anything. Just don't treat the sitemap as proof that the pairing is right.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Make the language switcher a real link
&lt;/h2&gt;

&lt;p&gt;The switcher is an &lt;code&gt;&amp;lt;a href&amp;gt;&lt;/code&gt; to the same page in the other language, not a button that sets a cookie and not a link to &lt;code&gt;/es/&lt;/code&gt; from every page. Build the href from the same &lt;code&gt;paths&lt;/code&gt; data, or from &lt;code&gt;getRelativeLocaleUrl("es", bare)&lt;/code&gt; for mirrored slugs, so it can't disagree with the hreflang tags.&lt;/p&gt;

&lt;p&gt;Don't redirect by IP address or &lt;code&gt;Accept-Language&lt;/code&gt;. Google's multilingual documentation says to "avoid automatically redirecting users from one language version of a site to a different language version", because such redirects "could prevent users (and search engines) from viewing all the versions of your site". It also explains why the crawler would miss &lt;code&gt;/es/&lt;/code&gt; entirely: "the Googlebot crawler usually originates from the USA" and "sends HTTP requests without setting Accept-Language in the request header". Google's suggestion is to add hyperlinks to the other language version so users can choose. A dismissible banner linking to the Spanish page does that. On a static Astro site you couldn't read &lt;code&gt;Accept-Language&lt;/code&gt; at build time anyway, which is why &lt;code&gt;Astro.preferredLocale&lt;/code&gt; only exists on routes rendered on demand.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Verify the build
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
grep -o &lt;span class="s1"&gt;'&amp;lt;html[^&amp;gt;]*&amp;gt;\|&amp;lt;link rel="\(canonical\|alternate\)"[^&amp;gt;]*&amp;gt;'&lt;/span&gt; dist/es/contact/index.html
grep -c &lt;span class="s2"&gt;"Contáctenos"&lt;/span&gt; dist/contact/index.html   &lt;span class="c"&gt;# must print 0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is what the first grep printed for the Spanish contact page of a seven-page test project built with the config, component and layout above on Astro 7.4.11:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html lang="es"&amp;gt;
&amp;lt;link rel="canonical" href="https://example.com/es/contact/"&amp;gt;
&amp;lt;link rel="alternate" hreflang="en" href="https://example.com/contact/"&amp;gt;
&amp;lt;link rel="alternate" hreflang="es" href="https://example.com/es/contact/"&amp;gt;
&amp;lt;link rel="alternate" hreflang="x-default" href="https://example.com/contact/"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same grep on &lt;code&gt;dist/contact/index.html&lt;/code&gt; printed &lt;code&gt;&amp;lt;html lang="en"&amp;gt;&lt;/code&gt;, a canonical of &lt;code&gt;https://example.com/contact/&lt;/code&gt;, and the same three &lt;code&gt;alternate&lt;/code&gt; lines. That identical set on both sides is the bidirectional rule in practice. The translated pair behaved the same way: &lt;code&gt;dist/es/servicios/calentadores/index.html&lt;/code&gt; carried a Spanish canonical plus &lt;code&gt;en&lt;/code&gt;, &lt;code&gt;es&lt;/code&gt; and &lt;code&gt;x-default&lt;/code&gt; links built from the &lt;code&gt;paths&lt;/code&gt; prop, and &lt;code&gt;dist/careers/index.html&lt;/code&gt; carried one canonical and no &lt;code&gt;alternate&lt;/code&gt; tags at all. The second grep printed &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.astro.build/es/guides/internationalization/" rel="noopener noreferrer"&gt;Astro documentation site&lt;/a&gt; is a live example of the same pattern at a larger scale. These are real lines from &lt;code&gt;curl -s https://docs.astro.build/es/guides/internationalization/&lt;/code&gt; on 12 November 2026, with the twelve other languages it lists cut out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html lang="es" dir="ltr" ...&amp;gt;
&amp;lt;link rel="canonical" href="https://docs.astro.build/es/guides/internationalization/"/&amp;gt;
&amp;lt;link rel="alternate" hreflang="en" href="https://docs.astro.build/en/guides/internationalization/"/&amp;gt;
&amp;lt;link rel="alternate" hreflang="es" href="https://docs.astro.build/es/guides/internationalization/"/&amp;gt;
&amp;lt;link rel="alternate" hreflang="x-default" href="https://docs.astro.build/en/guides/internationalization/"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Spanish page carries a Spanish canonical, lists itself and English, and &lt;code&gt;x-default&lt;/code&gt; points at English. Its &lt;code&gt;sitemap-0.xml&lt;/code&gt; has &lt;code&gt;xhtml:link&lt;/code&gt; alternates per URL and no &lt;code&gt;x-default&lt;/code&gt;, the same behaviour the integration source predicts.&lt;/p&gt;

&lt;p&gt;After deploy, submit &lt;code&gt;sitemap-index.xml&lt;/code&gt; in Search Console. Then wait. The &lt;a href="https://support.google.com/webmasters/answer/7440203" rel="noopener noreferrer"&gt;Page indexing report documentation&lt;/a&gt; states that "alternate language pages are not detected by Search Console", so there is no report that confirms your pairs. The check that works is URL Inspection on a Spanish page a few weeks after launch: the "Google-selected canonical" field should show the Spanish URL. The &lt;a href="https://support.google.com/webmasters/answer/9012289" rel="noopener noreferrer"&gt;URL Inspection documentation&lt;/a&gt; says you can determine the canonical "only in the indexed data; the live test cannot predict" it, so the live test won't answer this question on day one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two mistakes that silently undo the work
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Canonicals that cross languages. Pointing &lt;code&gt;/es/contact/&lt;/code&gt; at &lt;code&gt;/contact/&lt;/code&gt; tells Google the Spanish page is a duplicate of the English one, and Google's canonicalization documentation says to pick "a canonical page in the same language". The component above can't produce a cross-language canonical, which is the point of generating both tags from one source.&lt;/li&gt;
&lt;li&gt;An English template string leaking into Spanish pages, usually a shared header, footer or form label. Google's multilingual guidance says to use "a single language for content and navigation on each page" and to avoid "side-by-side translations". The &lt;code&gt;grep -c&lt;/code&gt; check in step 7 catches body copy. Add one grep per shared component string.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Illustrative example
&lt;/h2&gt;

&lt;p&gt;A heating and air conditioning company in Texas has twelve English pages. It wants Spanish for the six service pages and the contact page, and nothing else. The plan that follows from the rules above:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Page&lt;/th&gt;
&lt;th&gt;English URL&lt;/th&gt;
&lt;th&gt;Spanish URL&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;paths&lt;/code&gt; prop&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Home&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/es/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;none, mirrored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Contact&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/contact/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/es/contact/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;none, mirrored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AC repair&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/services/ac-repair/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/es/servicios/reparacion-de-aire-acondicionado/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;both pages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Careers&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/careers/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;no translation&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{ en: "/careers/" }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two mirrored pairs need no props and get sitemap alternates for free. Six translated service pairs pass &lt;code&gt;paths&lt;/code&gt; on both sides and rely on head tags only. Careers prints a canonical and nothing else. Every hreflang value is &lt;code&gt;es&lt;/code&gt; or &lt;code&gt;en&lt;/code&gt;, and every &lt;code&gt;x-default&lt;/code&gt; points at the English page in the pair. The whole set is checked with the three grep commands before the Spanish copy for the remaining pages is even written.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt
&lt;/h2&gt;

&lt;p&gt;Paste this into your coding tool from the repository root and fill in the brackets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;My Astro site needs separate English and Spanish pages with correct hreflang. [Describe the current setup: both languages in one HTML file hidden with CSS / no Spanish yet.]

Site URL: [https://example.com] | Default: English at / | Spanish at /es/ | Astro version: [version]
Pages to translate: [list of paths]
Slug rule: [translate slugs for these pages: ... / mirror all slugs]

1. In astro.config.mjs set site, i18n.locales ["en","es"], defaultLocale "en", routing.prefixDefaultLocale false. Add @astrojs/sitemap with i18n locales { en: "en", es: "es" }.
2. Put Spanish pages in src/pages/es/. Move all copy into src/i18n/en.ts and es.ts. One language per rendered page. Delete any CSS or JavaScript language toggle and any stored language preference.
3. Create src/components/HreflangLinks.astro: self-referencing canonical, absolute https hreflang links for every language version including itself, and x-default pointing to English. Accept an optional paths prop for translated slugs. Emit no hreflang on pages with no translation.
4. Set &amp;lt;html lang&amp;gt; from Astro.currentLocale. Translate title, meta description and Open Graph tags.
5. Language switcher: a plain &amp;lt;a&amp;gt; to the same page in the other language, built from the same paths data.
6. Never point a canonical across languages. No redirects based on IP or Accept-Language.
7. Use hreflang "es", not "es-ES" or "es-US".

Before finishing: run the build, grep dist/ to show the canonical and hreflang tags on [two English pages] and their Spanish pairs, confirm the alternate sets are identical on both sides, and confirm no English body text appears in dist/es/.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the output by comparing the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tags of two paired pages in &lt;code&gt;dist/&lt;/code&gt; line by line. If the sets differ, Google ignores the pair.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;p&gt;Do the homepage and your most-searched service page in both languages and run the three grep commands before translating anything else. Once those two pairs print identical alternate sets, the rest is copy work.&lt;/p&gt;

&lt;p&gt;This article was written with AI assistance and checked by a person.&lt;/p&gt;

&lt;p&gt;If that's too much work, contact us and we'll make you a free website.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>astro</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to get new pages into Bing (and ChatGPT search) the day you publish with IndexNow</title>
      <dc:creator>Marc Mulvaney</dc:creator>
      <pubDate>Mon, 09 Nov 2026 14:00:00 +0000</pubDate>
      <link>https://dev.to/freewebsite247/how-to-get-new-pages-into-bing-and-chatgpt-search-the-day-you-publish-with-indexnow-15kg</link>
      <guid>https://dev.to/freewebsite247/how-to-get-new-pages-into-bing-and-chatgpt-search-the-day-you-publish-with-indexnow-15kg</guid>
      <description>&lt;p&gt;You publish a page, then wait for a crawler to notice. IndexNow replaces the wait with a ping: you tell one participating search engine which URLs were added, changed or deleted, and the &lt;a href="https://www.indexnow.org/documentation" rel="noopener noreferrer"&gt;IndexNow protocol documentation&lt;/a&gt; says "submitted URLs will be automatically shared with all other participating search engines".&lt;/p&gt;

&lt;p&gt;Bing published the scale in a &lt;a href="https://blogs.bing.com/webmaster/December-2024/Look-How-Far-We-ve-Come-IIndexNow-Expands-Adoption-Across-Industries" rel="noopener noreferrer"&gt;Bing Webmaster Blog post of 12 December 2024&lt;/a&gt;: "over 3.5 billion URLs submitted per day, with 18% of all new URLs clicked in web search results". The &lt;a href="https://blogs.bing.com/webmaster/august-2022/IndexNow-adoption-gains-momentum" rel="noopener noreferrer"&gt;same blog on 12 August 2022&lt;/a&gt; reported "more than 16 million web sites" publishing "over 1.2 billion URLs per day" and 7% of new clicked URLs. Between August 2022 and December 2024 the share of newly clicked Bing URLs that arrived through IndexNow went from 7% to 18%.&lt;/p&gt;

&lt;p&gt;This is the setup for a static Astro site on Cloudflare, with a tested script that submits only what changed. Every protocol detail below was checked against indexnow.org and Bing's documentation on 12 November 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  What IndexNow does and doesn't do
&lt;/h2&gt;

&lt;p&gt;Who participates. The live list at &lt;a href="https://www.indexnow.org/searchengines.json" rel="noopener noreferrer"&gt;indexnow.org/searchengines.json&lt;/a&gt; on 12 November 2026:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"bing"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.bing.com/indexnow/meta.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"yandex"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.yandex.com/indexnow/meta.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"seznam"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://search.seznam.cz/indexnow/meta.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"naver"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://searchadvisor.naver.com/indexnow/meta.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"yep"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://indexnow.yep.com/indexnow/meta.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"internetarchive"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://web-static.archive.org/indexnow/meta.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"amazonbot"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://indexnow.amazonbot.amazon/indexnow/meta.json"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google is not on it. For Google you still rely on sitemaps, internal links and Search Console.&lt;/p&gt;

&lt;p&gt;What about ChatGPT? &lt;a href="https://developers.openai.com/api/docs/bots" rel="noopener noreferrer"&gt;OpenAI's crawler documentation&lt;/a&gt; says the &lt;code&gt;OAI-SearchBot&lt;/code&gt; robots.txt token decides whether a site appears in ChatGPT search answers, and it does not name Bing or any other index as the source. Microsoft's AI Performance report in Bing Webmaster Tools, &lt;a href="https://blogs.bing.com/webmaster/February-2026/Introducing-AI-Performance-in-Bing-Webmaster-Tools-Public-Preview" rel="noopener noreferrer"&gt;announced as a public preview on 10 February 2026&lt;/a&gt;, counts citations across "Microsoft Copilot, AI-generated summaries in Bing, and select partner integrations", and does not name ChatGPT. The &lt;a href="https://blogs.bing.com/webmaster/June-2026/New-AI-Visibility-Insights-in-Bing-Webmaster-Tools-Intents-Topics-Citation-Share-Compare" rel="noopener noreferrer"&gt;16 June 2026 follow-up&lt;/a&gt; that added Intents, Topics, Citation Share and Compare to that report still says "select partner AI experiences" without naming them. Fast Bing indexing is a bet on the surfaces that run on Bing; no vendor publishes a guarantee for ChatGPT. Keep &lt;code&gt;OAI-SearchBot&lt;/code&gt; allowed in robots.txt either way.&lt;/p&gt;

&lt;p&gt;Two more lines from the &lt;a href="https://www.indexnow.org/faq" rel="noopener noreferrer"&gt;IndexNow FAQ&lt;/a&gt; to keep in mind: "Submitting a URL does not guarantee immediate indexing", and the protocol "is not designed for submitting every URL on your site at once" (a migration or redesign is the stated exception). Keep your sitemap; IndexNow covers the recent changes, the sitemap covers the inventory.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Add the site to Bing Webmaster Tools
&lt;/h2&gt;

&lt;p&gt;IndexNow works without an account, but Bing Webmaster Tools is the only place you can see what happened to a submission. The fastest route skips DNS and meta-tag verification. From &lt;a href="https://blogs.bing.com/webmaster/september-2019/Import-sites-from-Search-Console-to-Bing-Webmaster-Tools" rel="noopener noreferrer"&gt;Bing's blog post on importing sites from Google Search Console&lt;/a&gt; (first published 13 September 2019, marked "Updated June, 2025"):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;"Sign-in to your Bing Webmaster Tools account or create a new one"&lt;/li&gt;
&lt;li&gt;"Navigate to My Sites page on Bing Webmaster Tools and click Import."&lt;/li&gt;
&lt;li&gt;"Sign-in with your Google Search Console account and click Allow"&lt;/li&gt;
&lt;li&gt;"Select the sites which you want to add to Bing Webmaster Tools and click Import."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;"Up to 100 websites can be imported at once", and "The limit of 1000 sites addition per Bing Webmaster Tools account still applies." Bing "will periodically validate your site ownership status by syncing with your Google Search Console account", so if you later remove that Search Console access, re-verify with a meta tag or DNS record.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Decide: Crawler Hints or your own script
&lt;/h2&gt;

&lt;p&gt;If the site is proxied through Cloudflare, you can turn on &lt;strong&gt;Crawler Hints&lt;/strong&gt; under &lt;strong&gt;Caching &amp;gt; Configuration&lt;/strong&gt; (the "Go to Configuration" button in &lt;a href="https://developers.cloudflare.com/cache/advanced-configuration/crawler-hints/" rel="noopener noreferrer"&gt;Cloudflare's Crawler Hints docs&lt;/a&gt; deep-links to &lt;code&gt;/caching/configuration&lt;/code&gt; for your zone). The availability table on that page lists Free, Pro, Business and Enterprise, all "Yes". The docs say Crawler Hints "uses Cloudflare cache signals to tell search engines when your content has likely changed", that it "uses cache-status MISS to determine when content has likely been updated and sends it to IndexNow's crawler", and that "If an asset's response has an HTTP status code greater than 4xx, the Crawler hints will not report that to IndexNow".&lt;/p&gt;

&lt;p&gt;That is a guess based on cache misses, it covers the whole zone, and you don't choose the URLs. It suits WordPress behind Cloudflare. On a static site you deploy yourself, you already know which pages changed. &lt;a href="https://www.bing.com/indexnow/getstarted" rel="noopener noreferrer"&gt;Bing's IndexNow getting-started page&lt;/a&gt; lists platforms where IndexNow is built in with "No setup needed. You're already using IndexNow." (the logos shown are Wix Studio, Duda, GoDaddy, XenForo, Milestone and Shopify) and WordPress plugins (IndexNow plugin, Yoast, RankMath, AIOSEO, SEOPress), plus plugins for Joomla!, Bitrix24, Drupal, PrestaShop, MODX, Shopware, OpenCart, TYPO3 and Umbraco. If you're on one of those, you're done after step 1. The rest of this post is for the Astro build.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Create the key file
&lt;/h2&gt;

&lt;p&gt;The key proves you control the host. From the &lt;a href="https://www.indexnow.org/documentation" rel="noopener noreferrer"&gt;IndexNow documentation&lt;/a&gt;: "a minimum of 8 and a maximum of 128" characters, using only "lowercase characters (a-z), uppercase characters (A-Z), numbers (0-9), and dashes (-)". You "must host a UTF-8 encoded text key file {your-key}.txt" at the root of the site, or elsewhere on the same host and point to it with &lt;code&gt;keyLocation&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.astro.build/en/basics/project-structure/" rel="noopener noreferrer"&gt;Astro copies everything in &lt;code&gt;public/&lt;/code&gt;&lt;/a&gt; into the build folder "untouched", so:&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="nv"&gt;KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;openssl rand -hex 16&lt;span class="o"&gt;)&lt;/span&gt;      &lt;span class="c"&gt;# 32 hex characters, e.g. e8e113c7221370d4e2158949e30ea899&lt;/span&gt;
&lt;span class="nb"&gt;printf&lt;/span&gt; %s &lt;span class="s2"&gt;"$KEY"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"public/$KEY.txt"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$KEY"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key isn't a secret; anyone can read the file. After the next deploy, this must print the key and nothing else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -i &lt;span class="s2"&gt;"https://www.example.com/$KEY.txt"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/2 200
content-type: text/plain; charset=utf-8
...

e8e113c7221370d4e2158949e30ea899
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;404&lt;/code&gt; here is the most common reason for a &lt;code&gt;403&lt;/code&gt; from IndexNow later, because the engine fetches the key file to validate your submission. Section 7 shows the exact &lt;code&gt;403&lt;/code&gt; body you get.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Make sure the sitemap has real &lt;code&gt;lastmod&lt;/code&gt; values
&lt;/h2&gt;

&lt;p&gt;The script below compares the sitemap you just built with the one that is live. Install the &lt;a href="https://docs.astro.build/en/guides/integrations-guide/sitemap/" rel="noopener noreferrer"&gt;Astro sitemap integration&lt;/a&gt; (&lt;code&gt;@astrojs/sitemap&lt;/code&gt; 3.7.4 on npm on 12 November 2026) and set &lt;code&gt;site&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx astro add sitemap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// astro.config.mjs&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"astro/config"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sitemap&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"@astrojs/sitemap"&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="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// must begin with http:// or https://&lt;/span&gt;
  &lt;span class="n"&gt;integrations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;sitemap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;serialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// set a real per-page date here, e.g. from frontmatter you expose at build time&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;item&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="p"&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="p"&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;The build writes &lt;code&gt;dist/sitemap-index.xml&lt;/code&gt; and &lt;code&gt;dist/sitemap-0.xml&lt;/code&gt;. The Astro docs describe &lt;code&gt;serialize()&lt;/code&gt; as a function "called for each sitemap entry just before writing to disk" that returns "either a SitemapItem or undefined to remove it from the sitemap", and the example in the docs edits &lt;code&gt;item.changefreq&lt;/code&gt;, &lt;code&gt;item.lastmod&lt;/code&gt; and &lt;code&gt;item.priority&lt;/code&gt;. The docs also note that the integration "can't analyze a given page's source code", so a per-page &lt;code&gt;lastmod&lt;/code&gt; has to come from you. If you use the &lt;code&gt;chunks&lt;/code&gt; option added in &lt;code&gt;@astrojs/sitemap&lt;/code&gt; 3.7.0, the files are named &lt;code&gt;sitemap-blog-0.xml&lt;/code&gt;, &lt;code&gt;sitemap-pages-0.xml&lt;/code&gt; and so on; the script below reads every &lt;code&gt;sitemap-*.xml&lt;/code&gt; except the index, so both layouts work.&lt;/p&gt;

&lt;p&gt;Why &lt;code&gt;lastmod&lt;/code&gt; matters: new URLs always show up in a diff, but an edited page only shows up if its &lt;code&gt;lastmod&lt;/code&gt; changes. Running the script against the live Astro documentation sitemap (5,992 URLs, no &lt;code&gt;lastmod&lt;/code&gt; on any of them, fetched 12 November 2026) shows the limit: only additions and removals are detected. Never set &lt;code&gt;lastmod&lt;/code&gt; to the build time either, because then every URL changes on every deploy, and the FAQ asks for recently "added, updated, or deleted URLs" only. Use a per-page &lt;code&gt;updatedDate&lt;/code&gt; from frontmatter.&lt;/p&gt;

&lt;p&gt;Use the exact production host in &lt;code&gt;site&lt;/code&gt;. The IndexNow spec returns &lt;code&gt;422&lt;/code&gt; for "URLs which don't belong to the host".&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The script
&lt;/h2&gt;

&lt;p&gt;Node built-ins only. &lt;code&gt;diff&lt;/code&gt; runs after the build and before the deploy, while the old sitemap is still live. &lt;code&gt;submit&lt;/code&gt; runs after the deploy, once the key file and new pages are reachable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// scripts/indexnow.mjs  usage: diff | submit | submit &amp;lt;url&amp;gt;...&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;writeFile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;readdir&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"node:fs/promises"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SITE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://www.example.com"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// must match the URLs in your sitemap&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;INDEXNOW_KEY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;QUEUE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;".indexnow-queue.json"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;xml&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&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="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;xml&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;\&lt;span class="no"&gt;S&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;*?&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;/&lt;/span&gt;&lt;span class="n"&gt;g&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;loc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*?&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;lastmod&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*?&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lastmod&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s2"&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="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;live&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`${SITE}/sitemap-index.xml`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&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;// first deploy: every URL counts as new&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`live sitemap HTTP ${res.status}`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&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="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&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="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*?&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;/&lt;/span&gt;&lt;span class="n"&gt;g&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&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="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&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="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;built&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&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="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;readdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"dist"&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;// sitemap-0.xml, or sitemap-blog-0.xml when the chunks option is used; never the index&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"sitemap-"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;".xml"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s2"&gt;"sitemap-index.xml"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`dist/${file}`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"utf8"&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="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&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="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;cmd&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="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"diff"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;before&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;before&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;live&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="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`IndexNow: live sitemap unreachable (${err.message}), nothing queued`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;writeFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;QUEUE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"[]"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;after&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;built&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;changed&lt;/span&gt; &lt;span class="o"&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="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;after&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&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="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;before&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&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="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;removed&lt;/span&gt; &lt;span class="o"&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="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;before&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;keys&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="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;after&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&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;// deleted pages count too&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;writeFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;QUEUE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&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="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;changed&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="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;removed&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="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`IndexNow: ${changed.length} new/changed, ${removed.length} removed`&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="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"submit"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="no"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"IndexNow: INDEXNOW_KEY is not set"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;urlList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;QUEUE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"utf8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&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="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;urlList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;urlList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;batch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;urlList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"https://api.indexnow.org/indexnow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"POST"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"application/json; charset=utf-8"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;SITE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;keyLocation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sb"&gt;`${SITE}/${KEY}.txt`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;urlList&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;batch&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="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`IndexNow: HTTP ${res.status} for ${batch.length} URLs`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="mi"&gt;202&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exitCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&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;What the &lt;a href="https://www.indexnow.org/documentation" rel="noopener noreferrer"&gt;spec&lt;/a&gt; says about that request: POST to &lt;code&gt;/indexnow&lt;/code&gt; with &lt;code&gt;Content-Type: application/json; charset=utf-8&lt;/code&gt;, a JSON body with &lt;code&gt;host&lt;/code&gt;, &lt;code&gt;key&lt;/code&gt;, optional &lt;code&gt;keyLocation&lt;/code&gt; and &lt;code&gt;urlList&lt;/code&gt;, and "You can submit up to 10,000 URLs per post, mixing http and https URLs if needed". The &lt;a href="https://www.indexnow.org/faq" rel="noopener noreferrer"&gt;FAQ&lt;/a&gt; calls &lt;code&gt;https://api.indexnow.org/indexnow&lt;/code&gt; the "IndexNow global endpoint" and lists one endpoint per engine next to it (Bing's is &lt;code&gt;https://www.bing.com/indexnow&lt;/code&gt;); &lt;a href="https://www.bing.com/indexnow/getstarted" rel="noopener noreferrer"&gt;Bing's getting-started page&lt;/a&gt; uses &lt;code&gt;Host: api.indexnow.org&lt;/code&gt; in its sample request. Either route shares the URLs with the other engines.&lt;/p&gt;

&lt;p&gt;Tested on 12 November 2026 with Node v24.22.1: &lt;code&gt;node --check&lt;/code&gt; passes, and a &lt;code&gt;diff&lt;/code&gt; run against a copy of the live Astro docs sitemap with one URL removed and one added printed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IndexNow: 1 new/changed, 1 removed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and wrote the two URLs to &lt;code&gt;.indexnow-queue.json&lt;/code&gt;. Add that file to &lt;code&gt;.gitignore&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For a one-off edit, skip the queue: &lt;code&gt;node scripts/indexnow.mjs submit https://www.example.com/pricing/&lt;/code&gt;. The FAQ asks you to "wait at least 5 minutes between updates before resubmitting" the same URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Wire it into the deploy
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"astro build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"deploy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"node scripts/indexnow.mjs diff &amp;amp;&amp;amp; wrangler deploy &amp;amp;&amp;amp; node scripts/indexnow.mjs submit"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Cloudflare Workers Builds connected to your repository, open the Worker's &lt;strong&gt;Settings &amp;gt; Build&lt;/strong&gt; (&lt;a href="https://developers.cloudflare.com/workers/ci-cd/builds/configuration/" rel="noopener noreferrer"&gt;Cloudflare's Workers Builds configuration docs&lt;/a&gt;: "Build settings can be found by navigating to Settings &amp;gt; Build within your Worker"). Set the build command to &lt;code&gt;npm run build&lt;/code&gt;. The docs say "Your deploy command will default to &lt;code&gt;npx wrangler deploy&lt;/code&gt; but you may customize this command" and give &lt;code&gt;npm run deploy&lt;/code&gt; as the example of running a package.json script; set that. Add &lt;code&gt;INDEXNOW_KEY&lt;/code&gt; under &lt;strong&gt;Build variables and secrets&lt;/strong&gt;, which the docs describe as "accessible only to your build", all the script needs. Locally it's &lt;code&gt;npm run build &amp;amp;&amp;amp; npm run deploy&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Illustrative example.&lt;/strong&gt; A landscaping company's site has 14 pages. On Tuesday the owner adds &lt;code&gt;/fall-cleanup/&lt;/code&gt; and fixes a price on &lt;code&gt;/lawn-care/&lt;/code&gt;, whose &lt;code&gt;updatedDate&lt;/code&gt; moves to today. The pre-deploy &lt;code&gt;diff&lt;/code&gt; finds two URLs. After &lt;code&gt;wrangler deploy&lt;/code&gt; finishes, &lt;code&gt;submit&lt;/code&gt; posts those two to IndexNow and logs &lt;code&gt;HTTP 200 for 2 URLs&lt;/code&gt;. The other twelve pages aren't resubmitted, which is what the FAQ asks for.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Read the response
&lt;/h2&gt;

&lt;p&gt;From the &lt;a href="https://www.indexnow.org/documentation" rel="noopener noreferrer"&gt;IndexNow documentation&lt;/a&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;"URL submitted successfully"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;202&lt;/td&gt;
&lt;td&gt;"URL received. IndexNow key validation pending." (normal on a first submission)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;"Invalid format"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;403&lt;/td&gt;
&lt;td&gt;"In case of key not valid (e.g. key not found, file found but key not in the file)"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;422&lt;/td&gt;
&lt;td&gt;"In case of URLs which don't belong to the host or the key is not matching the schema in the protocol"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;429&lt;/td&gt;
&lt;td&gt;"Too Many Requests (potential Spam)"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A real &lt;code&gt;403&lt;/code&gt; from &lt;code&gt;api.indexnow.org&lt;/code&gt; on 12 November 2026, from a GET and a POST with a key that has no key file behind it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/2 403
content-type: application/json; charset=utf-8

{"errorCode":"UserForbiddedToAccessSite","message":"User is unauthorized to access the site. Please verify the site using the key and try again","details":null}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The spelling "Forbidded" is in the live response. If you see this, run the &lt;code&gt;curl -sS -i&lt;/code&gt; check from step 3 against the key file first. Earlier the same day, the same request from the same shared IP returned &lt;code&gt;HTTP/2 429&lt;/code&gt; with the body &lt;code&gt;{"errorCode":"TooManyRequests","message":"We're sorry, but you have sent too many requests to us recently.","details":null}&lt;/code&gt;, so a CI runner on a shared IP can hit the limit before you have sent anything of your own. Back off and retry from the deploy step rather than hammering the endpoint. The FAQ says "IndexNow does not publicly disclose exact rate limits, as each participating search engine sets its own daily submission thresholds per site."&lt;/p&gt;

&lt;p&gt;Then open &lt;strong&gt;IndexNow&lt;/strong&gt; in the Bing Webmaster Tools sidebar. The IndexNow Insights report there, &lt;a href="https://blogs.bing.com/webmaster/March-2024/Optimize-your-Impact-with-IndexNow-Insights" rel="noopener noreferrer"&gt;announced on 3 March 2024&lt;/a&gt;, lets you "Learn about your latest 1000 submitted URLs, including their index status, first indexed date, and whether they were submitted late", and shows "the source of your URL submissions, whether through Cloudflare, WordPress, manual submission, or other means". The tooltips in the tool count "The number of URLs submitted to IndexNow", "submitted to IndexNow and crawled by Bing" and "submitted to IndexNow and indexed in Bing". URL Inspection in the same tool checks a single page.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt
&lt;/h2&gt;

&lt;p&gt;Paste this into your AI coding tool inside the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Add IndexNow to this Astro site. It deploys to Cloudflare via [Workers Builds / wrangler locally / GitHub Actions].
Production URL: [https://www.example.com] (use exactly this host everywhere)
IndexNow key: [key, or generate with openssl rand -hex 16]

1. Create public/[key].txt containing only the key, no newline.
2. Make sure @astrojs/sitemap is installed and `site` is set in astro.config. Use the sitemap `serialize` option to set lastmod from each page's [updatedDate] frontmatter. Never use the build time.
3. Create scripts/indexnow.mjs with two commands. "diff" (after build, before deploy) compares &amp;lt;loc&amp;gt; and &amp;lt;lastmod&amp;gt; in the live sitemap-index.xml and its child sitemaps against every dist/sitemap-*.xml except sitemap-index.xml and writes new, changed and removed URLs to .indexnow-queue.json. Live sitemap 404 = all URLs new; any other failure = queue nothing and exit 0. "submit" (after deploy) POSTs the queue, or URLs given as arguments, to https://api.indexnow.org/indexnow as JSON with host, key, keyLocation and urlList, in batches of 10,000, prints the HTTP status, and exits non-zero on anything but 200 or 202.
4. Add a package.json "deploy" script that runs diff, the deploy, then submit. Gitignore the queue file.
5. Tell me exactly what to change in Cloudflare Workers Builds (Settings &amp;gt; Build) and how to test with one URL.
Node built-ins only, no new dependencies.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To check the result, run &lt;code&gt;node scripts/indexnow.mjs diff&lt;/code&gt; right after a build. The queue should list only pages you added or changed. If it lists every page, &lt;code&gt;lastmod&lt;/code&gt; is being set to the build time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;p&gt;Import the site into Bing Webmaster Tools today, deploy the key file, confirm it with &lt;code&gt;curl -i&lt;/code&gt;, and send this month's new or changed pages by hand with the &lt;code&gt;submit&lt;/code&gt; command. When they appear in IndexNow Insights, wire the script into the deploy.&lt;/p&gt;

&lt;p&gt;This article was written with AI assistance and checked by a person.&lt;/p&gt;

&lt;p&gt;If that's too much work, contact us and we'll make you a free website.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>astro</category>
      <category>cloudflare</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to use Search Console data to add internal links to page-2 pages</title>
      <dc:creator>Marc Mulvaney</dc:creator>
      <pubDate>Fri, 06 Nov 2026 14:00:00 +0000</pubDate>
      <link>https://dev.to/freewebsite247/how-to-use-search-console-and-an-ai-agent-to-add-internal-links-that-move-page-2-pages-up-3dn4</link>
      <guid>https://dev.to/freewebsite247/how-to-use-search-console-and-an-ai-agent-to-add-internal-links-that-move-page-2-pages-up-3dn4</guid>
      <description>&lt;p&gt;Most content sites have pages that sit at average positions 11 to 20 for queries Google already associates with them. Many of those pages have few or no links from the rest of the site, because nobody went back to add them after publishing.&lt;/p&gt;

&lt;p&gt;Google's documentation is specific about what links do, and it gives no number for how much. The &lt;a href="https://developers.google.com/search/docs/crawling-indexing/links-crawlable" rel="noopener noreferrer"&gt;link best practices page&lt;/a&gt; opens with: "Google uses links as a signal when determining the relevancy of pages and to find new pages to crawl." The same page says anchor text "tells people and Google something about the page you're linking to". The &lt;a href="https://developers.google.com/search/docs/fundamentals/seo-starter-guide" rel="noopener noreferrer"&gt;SEO starter guide&lt;/a&gt; states that "the vast majority of the new pages Google finds every day are through links". The &lt;a href="https://developers.google.com/search/docs/crawling-indexing/sitemaps/overview" rel="noopener noreferrer"&gt;sitemaps overview&lt;/a&gt; says that if "your site's pages are properly linked, Google can usually discover most of your site". None of these pages promises a position change, and this article won't either. Adding descriptive links to pages that lack them is maintenance, with Search Console telling you where to look first.&lt;/p&gt;

&lt;p&gt;Search Console reports which page appears for which query and at what position. A script can pull that, a coding tool can read your Markdown files and propose links where the existing text already uses the right phrase, and Git gives you a branch, a diff and a pull request as the review step and the changelog.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Get page and query data in the same row
&lt;/h2&gt;

&lt;p&gt;This is where the workflow usually breaks. The Performance report in Search Console shows a Queries table and a Pages table, but the export doesn't tell you which query belongs to which page. The export is also small. Google's &lt;a href="https://support.google.com/webmasters/answer/12919797" rel="noopener noreferrer"&gt;export documentation&lt;/a&gt; says report data is "truncated to 1,000 rows of representative examples of your data". To say "page X ranks 12th for query Y" you need both dimensions in one row, and the Search Console API returns that.&lt;/p&gt;

&lt;p&gt;Four more facts about the data, all from Google:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some queries never appear. The Search Central blog post &lt;a href="https://developers.google.com/search/blog/2022/10/performance-data-deep-dive" rel="noopener noreferrer"&gt;A deep dive into Search Console performance data filtering and limits&lt;/a&gt; defines anonymized queries as those "that aren't issued by more than a few dozen users over a two-to-three month period", and they "are always omitted from the tables". On a small site that is a large share of the long tail. The queries you want for this job are the ones with real impressions, so the loss doesn't matter here. The same post caps the API at "50,000 rows per day per site per search type", so a site with more page-and-query pairs than that gets the top rows, not all of them.&lt;/li&gt;
&lt;li&gt;Position means the topmost result. The &lt;a href="https://support.google.com/webmasters/answer/7576553" rel="noopener noreferrer"&gt;Performance report documentation&lt;/a&gt; defines average position as "the average position of the topmost result from your site" for that row.&lt;/li&gt;
&lt;li&gt;The data lags. The &lt;a href="https://support.google.com/webmasters/answer/96568" rel="noopener noreferrer"&gt;About Search Console data&lt;/a&gt; page says collected data "should be available in 2-3 days", so the export below stops three days before today.&lt;/li&gt;
&lt;li&gt;AI Overviews and AI Mode impressions are in these rows. Google's &lt;a href="https://developers.google.com/search/docs/appearance/ai-features" rel="noopener noreferrer"&gt;AI features documentation&lt;/a&gt; says sites appearing in AI features "are included in the overall search traffic in Search Console" and are reported in the Performance report "within the 'Web' search type", which is the type the script below requests. Since 3 June 2026 there is also a separate &lt;a href="https://support.google.com/webmasters/answer/16984139" rel="noopener noreferrer"&gt;Generative AI performance report&lt;/a&gt;, rolled out to all sites on 31 August 2026 according to the &lt;a href="https://developers.google.com/search/blog/2026/06/gen-ai-performance-reports" rel="noopener noreferrer"&gt;launch post&lt;/a&gt;. It shows impressions only, grouped by pages, countries, devices and dates, with no query dimension, so it tells you which pages appeared in AI Overviews or AI Mode but not for which queries. Find it under Performance in the Search Console sidebar, or open it directly at search.google.com/search-console/performance/search-analytics/ai. If it isn't there, the help page says the site "hasn't received enough impressions in generative AI features".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One-time setup:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the Google Cloud console, create a project and enable the Google Search Console API. Then open the &lt;a href="https://cloud.google.com/iam/docs/service-accounts-create" rel="noopener noreferrer"&gt;Service accounts page&lt;/a&gt; and create a service account. Google's &lt;a href="https://cloud.google.com/iam/docs/keys-create-delete" rel="noopener noreferrer"&gt;key documentation&lt;/a&gt; gives the next clicks: open the service account, "Click the Keys tab", then "Click the Add key drop-down menu, then select Create new key", and "Select JSON as the Key type and click Create". The file downloads once.&lt;/li&gt;
&lt;li&gt;In Search Console, open Settings, then Users and permissions, and add the service account's email address as a Full user. The &lt;a href="https://support.google.com/webmasters/answer/7687615" rel="noopener noreferrer"&gt;permissions documentation&lt;/a&gt; says a Full user "has view rights to all data".&lt;/li&gt;
&lt;li&gt;Keep the key outside the repository, or add it to &lt;code&gt;.gitignore&lt;/code&gt;. Never commit it.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i -D googleapis
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;".gsc/"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; .gitignore
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"gsc-key.json"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; .gitignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add &lt;code&gt;scripts/gsc-export.mjs&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// scripts/gsc-export.mjs&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;google&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'googleapis'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;mkdirSync&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;writeFileSync&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'node:fs'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SITE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;GSC_SITE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 'sc-domain:example.com' or 'https://example.com/'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;864e5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toISOString&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="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;google&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;GoogleAuth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;keyFile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;GSC_KEY_FILE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;scopes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'https://www.googleapis.com/auth/webmasters.readonly'&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="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;gsc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;google&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;searchconsole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'v1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;auth&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&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="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;startRow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;startRow&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;25000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;gsc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;searchanalytics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;siteUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;SITE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;requestBody&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;startDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;day&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;93&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;endDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;day&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// the most recent days are still filling in&lt;/span&gt;
      &lt;span class="n"&gt;dimensions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'page'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'query'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'web'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;rowLimit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;startRow&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="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&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="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&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="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;25000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;mkdirSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.gsc'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;recursive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.gsc/page-query.json'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;clicks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;clicks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;impressions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;impressions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;10&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="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&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="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`Saved ${rows.length} rows`&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;Run it:&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="nv"&gt;GSC_SITE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"sc-domain:example.com"&lt;/span&gt; &lt;span class="nv"&gt;GSC_KEY_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$HOME/keys/gsc-key.json"&lt;/span&gt; node scripts/gsc-export.mjs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output, with your own row count:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Saved 1842 rows
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;a href="https://developers.google.com/webmaster-tools/v1/searchanalytics/query" rel="noopener noreferrer"&gt;Search Analytics query reference&lt;/a&gt; says the valid range for &lt;code&gt;rowLimit&lt;/code&gt; is 1 to 25,000 and the default is 1,000, so the loop pages with &lt;code&gt;startRow&lt;/code&gt;. It also defines &lt;code&gt;type: 'web'&lt;/code&gt; as the "combined ("All") tab in Google Search", which excludes Discover and Google News. The &lt;code&gt;webmasters.readonly&lt;/code&gt; scope is one of the two scopes on the API's &lt;a href="https://developers.google.com/webmaster-tools/v1/how-tos/authorizing" rel="noopener noreferrer"&gt;authorization page&lt;/a&gt;, listed there as "Read-only access", and it is all this script needs. Two quota notes from the API's &lt;a href="https://developers.google.com/webmaster-tools/limits" rel="noopener noreferrer"&gt;usage limits page&lt;/a&gt;: the per-site limit is 1,200 queries per minute, which a daily export never approaches, and queries "grouped/filtered by page AND query string are the most expensive" for the load quota, so don't run this in a loop over many date ranges at once. The &lt;a href="https://github.com/googleapis/google-api-nodejs-client" rel="noopener noreferrer"&gt;googleapis&lt;/a&gt; package was at version 189.0.0 on npm on 12 November 2026.&lt;/p&gt;

&lt;p&gt;If your coding tool already has a Search Console connector, you can skip the script. A JSON file in the repository is easier to rerun and diff, though.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Put numbers on "page 2" and "enough impressions"
&lt;/h2&gt;

&lt;p&gt;Vague instructions get interpreted however the model likes. Give it numbers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Position: target pairs where the page's average position is between 11 and 20. Those are the results on the second page of classic ten-result pages, and Search Console reports them even though searchers rarely see them. A wider band, 4 to 20, is defensible when the site is small and you want more rows.&lt;/li&gt;
&lt;li&gt;Impressions: for a small local business site over three months, 50 impressions for the page-and-query pair is a workable floor. A blog with real traffic might use 200. Pick the number that leaves you with 20 to 60 pairs you can actually review.&lt;/li&gt;
&lt;li&gt;One rule, not two. A common version of this workflow says to take queries ranking 1 to 10 as anchor sources, then prioritize targets ranking 4 to 15. Those two rules fight each other: a page sitting at 13 has no top-10 query, so it never becomes a target. Use the single position band above.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Work on a branch
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git switch -c internal-links-&lt;span class="nv"&gt;$(&lt;/span&gt;date +%F&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then give your coding tool the prompt at the end of this article. Tell it where content lives and how URLs map to files. For Astro, the &lt;a href="https://docs.astro.build/en/guides/content-collections/" rel="noopener noreferrer"&gt;content collections guide&lt;/a&gt; defines collections in &lt;code&gt;src/content.config.ts&lt;/code&gt;, and its example loads &lt;code&gt;./src/content/blog&lt;/code&gt; with a glob pattern of &lt;code&gt;**/*.{md,mdx}&lt;/code&gt;. Search Console reports full URLs like &lt;code&gt;https://example.com/blog/tankless-vs-tank/&lt;/code&gt;, and the tool has to turn that into &lt;code&gt;src/content/blog/tankless-vs-tank.md&lt;/code&gt;. Astro's &lt;a href="https://docs.astro.build/en/reference/configuration-reference/#trailingslash" rel="noopener noreferrer"&gt;configuration reference&lt;/a&gt; lists &lt;code&gt;trailingSlash&lt;/code&gt; as &lt;code&gt;'always'&lt;/code&gt;, &lt;code&gt;'never'&lt;/code&gt; or &lt;code&gt;'ignore'&lt;/code&gt;, default &lt;code&gt;'ignore'&lt;/code&gt;. If your config sets it, new links must match it, or every new link costs a redirect hop.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Review the plan before any edit
&lt;/h2&gt;

&lt;p&gt;The tool writes the plan to &lt;code&gt;.gsc/link-plan.md&lt;/code&gt; and stops. Go through every row. Reject a row if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the anchor doesn't make sense read on its own&lt;/li&gt;
&lt;li&gt;the source page has nothing to do with the target&lt;/li&gt;
&lt;li&gt;it's a self-link, or the target is already linked from that page&lt;/li&gt;
&lt;li&gt;the same exact anchor shows up on more than two or three source pages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Google's link best practices page covers each of those. "Good anchor text is descriptive, reasonably concise, and relevant to the page that it's on and to the page it links to." The test Google suggests: "Try reading only the anchor text (out of context) and check if it's specific enough to make sense by itself." On repetition: "resist the urge to cram every keyword" into anchors, because "keyword stuffing is a violation of our spam policies". And on placement: "Don't chain up links next to each other". Twenty posts all linking one page with the identical exact-match query reads as engineered, because it is. Use partial matches, the page's topic in your own words, or the query with a city name added.&lt;/p&gt;

&lt;p&gt;For scale, the &lt;a href="https://almanac.httparchive.org/en/2025/seo" rel="noopener noreferrer"&gt;2025 Web Almanac SEO chapter&lt;/a&gt; measured a median of 43 same-site links per desktop page and 39 per mobile page, and found that 93.45% of mobile inner pages pass Lighthouse's descriptive-link-text audit. Three contextual links added to a body paragraph are a small change on a normal page, not a restructuring.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Apply the edits as a pull request
&lt;/h2&gt;

&lt;p&gt;After you approve rows, the tool edits the Markdown and commits. Then build, check links, and open the PR:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
npx linkinator ./dist --recurse --skip &lt;span class="s2"&gt;"^https?://(?!localhost|127\.0\.0\.1)"&lt;/span&gt;
gh pr create --title &lt;span class="s2"&gt;"Internal links from Search Console, $(date +%F)"&lt;/span&gt; --body-file .gsc/link-plan.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The build catches broken MDX. &lt;a href="https://github.com/JustinBeckwith/linkinator" rel="noopener noreferrer"&gt;Linkinator&lt;/a&gt; (version 8.1.0 on npm on 12 November 2026) will, in its README's words, "stand up a static web server" for the &lt;code&gt;dist&lt;/code&gt; folder, follow links on the same root with &lt;code&gt;--recurse&lt;/code&gt;, and exit with code 1 when it detects a broken link. The &lt;code&gt;--skip&lt;/code&gt; flag takes "urls in regexy form to not include in the check". The pattern above matters: the local server runs on 127.0.0.1, so a pattern that skips every &lt;code&gt;http&lt;/code&gt; URL also skips the server itself and the run reports zero links scanned. Excluding localhost and 127.0.0.1 from the skip tests your own links and ignores every external host. Tested on 12 November 2026 against a four-link test build: one missing page gave "ERROR: Detected 1 broken links" and exit code 1. Write the new links root-relative, as the prompt says, so they are checked against the build and not against your live site. The PR body is the approved table, and the diff shows every changed sentence. Reverting a bad batch is one &lt;code&gt;git revert&lt;/code&gt;. The &lt;a href="https://cli.github.com/manual/gh_pr_create" rel="noopener noreferrer"&gt;gh pr create manual&lt;/a&gt; documents &lt;code&gt;--title&lt;/code&gt; and &lt;code&gt;--body-file&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Read the diff anyway. Look for rewritten sentences (the tool was told not to, and sometimes does), links inside headings or front matter, and links dropped into code blocks.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Measure with matching date ranges, and say less than you'd like
&lt;/h2&gt;

&lt;p&gt;Write down the merge date. New links only count once Google recrawls the source pages, the ones you edited, not the targets. For a handful of important source pages you can use URL Inspection and Request indexing. Google's &lt;a href="https://developers.google.com/search/docs/crawling-indexing/ask-google-to-recrawl" rel="noopener noreferrer"&gt;recrawl documentation&lt;/a&gt; warns that "requesting a recrawl multiple times for the same URL won't get it crawled any faster", and that "Crawling can take anywhere from a few days to a few weeks."&lt;/p&gt;

&lt;p&gt;Wait at least four weeks. Then compare two windows of equal length: the 28 days before the merge, and the 28 days starting a week after it. The Performance report does this in the date filter. Google's &lt;a href="https://support.google.com/webmasters/answer/17011165" rel="noopener noreferrer"&gt;advanced filtering and comparison&lt;/a&gt; page says to "Choose Compare in the filter properties dialog box", after which "the results table will display a Difference column", and it recommends weekly or monthly granularity for date comparisons because it "neutralizes the 'day-of-the-week' effect". Or run the export script twice with those date ranges and diff the two files for the target pairs only. Look at impressions and average position per page-and-query pair, not site totals.&lt;/p&gt;

&lt;p&gt;Then be careful about what the comparison proves. Average position moves week to week on its own. Seasonality, a core update, a competitor's new page or a new backlink can all land in the same window. Google's documentation calls links a relevancy signal and a discovery mechanism without saying how much either weighs, so an improvement after this work is consistent with the documentation but not proof of cause. What you can state with certainty is narrower and still useful: the target pages now have crawlable, descriptive links from related pages, which is what Google's guidance asks for, and the PR records exactly what changed and when.&lt;/p&gt;

&lt;p&gt;This is also why running the workflow weekly on overlapping pages makes results unreadable. Do one batch, wait, compare, then do the next batch on different targets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Illustrative example
&lt;/h2&gt;

&lt;p&gt;Illustrative example: a home services blog has 40 posts in Astro content collections. The export returns 1,842 page-and-query rows for 90 days. Filtering to positions 11 to 20 with at least 50 impressions leaves 14 target pairs. One is &lt;code&gt;/blog/tankless-vs-tank/&lt;/code&gt; at position 13.4 for "tankless water heater cost", 310 impressions and 4 clicks. The link plan finds three body sentences on other posts that already contain "tankless water heater" or "cost of a tankless unit", so three links go in with those existing words as anchors, no sentence rewritten. The plan also lists five targets with no natural spot, and those stay unlinked rather than forced. Merge date and the 14 pairs go in the PR body. The comparison happens five weeks later, pair by pair.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt
&lt;/h2&gt;

&lt;p&gt;Paste this into your coding tool and fill in the brackets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are working in a Git repo for [site name], built with [Astro / Eleventy / Hugo].
Content files: [src/content/blog/**/*.md and *.mdx]. URLs map to files like this: [https://example.com/blog/&amp;lt;slug&amp;gt;/ -&amp;gt; src/content/blog/&amp;lt;slug&amp;gt;.md]. Trailing slash setting: [always / never].
Search Console data (page, query, clicks, impressions, position, last 3 months): .gsc/page-query.json

Step 1, pick targets. A target is a page + query pair with position between 11 and 20 and at least [50] impressions. Ignore URLs you can't map to a file.

Step 2, find link spots. For each target, search the other content files for places where the existing text already says the query, a close variant or the same idea in other words. Only use sentences in body paragraphs. Never use headings, front matter, the first paragraph, image alt text, code blocks, MDX components or text that is already a link.

Rules:
- At most [3] new links per source file, and each target linked once per source file.
- No self-links. Skip a source file that already links to the target.
- The source page must be on a related topic. If it isn't, don't link.
- Do not rewrite or add sentences to fit an anchor. Wrap existing words only.
- Vary anchors. Don't use the identical exact-match anchor for the same target on more than [2] source files. Use partial matches and descriptive wording instead.
- Links are root-relative Markdown links, e.g. [anchor](/blog/slug/), matching the trailing slash setting.
- Prefer targets with the most impressions first.

Step 3, plan only. Write .gsc/link-plan.md as a table: source file | sentence (with the anchor in brackets) | target URL | target query | position | impressions. Below it, list targets you found no natural spot for. Do not edit any content file yet. Stop and wait for my approval.

Step 4, after I reply "approved" (or approve specific rows), apply only the approved rows, commit with the message "Add internal links from Search Console data", and show me git diff --stat.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the output by picking five rows from the plan and opening the source file yourself. The bracketed words should already be in the sentence, unchanged, and the sentence should still make sense if you read only the anchor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;p&gt;Run the export, filter to positions 11 to 20 with your impression floor, and do one batch of ten targets. Merge it, write the date in the PR, and leave those pages alone until the before-and-after comparison is done.&lt;/p&gt;

&lt;p&gt;This article was written with AI assistance and checked by a person.&lt;/p&gt;

&lt;p&gt;If that's too much work, contact us and we'll make you a free website.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>astro</category>
      <category>searchconsole</category>
    </item>
    <item>
      <title>How to check your robots.txt and Cloudflare aren't blocking ChatGPT, Perplexity and Anthropic's crawler</title>
      <dc:creator>Marc Mulvaney</dc:creator>
      <pubDate>Wed, 04 Nov 2026 14:00:00 +0000</pubDate>
      <link>https://dev.to/freewebsite247/how-to-check-your-robotstxt-and-cloudflare-arent-blocking-chatgpt-perplexity-and-claude-4aac</link>
      <guid>https://dev.to/freewebsite247/how-to-check-your-robotstxt-and-cloudflare-arent-blocking-chatgpt-perplexity-and-claude-4aac</guid>
      <description>&lt;p&gt;An AI assistant can't cite a page it can't fetch. If robots.txt tells the crawler to stay out, or Cloudflare answers it with a 403, the page never reaches the answer, however good it is. On small business sites the cause is usually dull: a robots.txt copied from staging, a WordPress security plugin, or a Cloudflare setting nobody remembers switching on.&lt;/p&gt;

&lt;p&gt;The hard part is that each vendor runs several bots with different jobs, and if you allow the wrong ones you can end up opted in to model training and still invisible in search. Every token, quote and menu path in this post was checked against the vendor's own page on 12 November 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Know which bot does what
&lt;/h2&gt;

&lt;p&gt;OpenAI, Anthropic and Perplexity each split their crawlers into training, search indexing, and fetches a user triggers in a chat. Google uses a different model. The quotes in the table come from &lt;a href="https://developers.openai.com/api/docs/bots" rel="noopener noreferrer"&gt;OpenAI's crawler page&lt;/a&gt;, &lt;a href="https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler" rel="noopener noreferrer"&gt;Anthropic's crawler article&lt;/a&gt;, &lt;a href="https://docs.perplexity.ai/guides/bots" rel="noopener noreferrer"&gt;Perplexity's crawler docs&lt;/a&gt; and &lt;a href="https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers" rel="noopener noreferrer"&gt;Google's crawler overview&lt;/a&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Vendor&lt;/th&gt;
&lt;th&gt;robots.txt token&lt;/th&gt;
&lt;th&gt;Job&lt;/th&gt;
&lt;th&gt;What the vendor says happens if you block it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;GPTBot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Crawls "content that may be used in training our generative AI foundation models"&lt;/td&gt;
&lt;td&gt;Content isn't used for training. No effect on search.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;OAI-SearchBot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"used to surface websites in search results in ChatGPT's search features"&lt;/td&gt;
&lt;td&gt;Sites "will not be shown in ChatGPT search answers, though can still appear as navigational links"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ChatGPT-User&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Visits a page when a user asks ChatGPT or a custom GPT a question&lt;/td&gt;
&lt;td&gt;"robots.txt rules may not apply". Also "not used to determine whether content may appear in Search"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;OAI-AdsBot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"validate the safety of web pages submitted as ads on ChatGPT"&lt;/td&gt;
&lt;td&gt;Only relevant if you advertise there&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ClaudeBot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Training crawler, "collecting web content that could potentially contribute to their training"&lt;/td&gt;
&lt;td&gt;"future materials should be excluded from our AI model training datasets"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Claude-SearchBot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"navigates the web to improve search result quality for users"&lt;/td&gt;
&lt;td&gt;"may reduce your site's visibility and accuracy in user search results"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Claude-User&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fetches a page when a user asks a question&lt;/td&gt;
&lt;td&gt;"prevents our system from retrieving your content in response to a user query"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Perplexity&lt;/td&gt;
&lt;td&gt;&lt;code&gt;PerplexityBot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"designed to surface and link websites in search results on Perplexity"; "not used to crawl content for AI foundation models"&lt;/td&gt;
&lt;td&gt;You drop out of Perplexity results&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Perplexity&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Perplexity-User&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"supports user actions within Perplexity"&lt;/td&gt;
&lt;td&gt;"this fetcher generally ignores robots.txt rules"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Google-Extended&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Control token for "training future generations of Gemini models" and grounding in Vertex AI&lt;/td&gt;
&lt;td&gt;"does not impact a site's inclusion in Google Search nor is it used as a ranking signal"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Five details from those pages matter for the fix:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google-Extended "doesn't have a separate HTTP request user agent string". It only exists in robots.txt. Google's AI Overviews and AI Mode use regular Googlebot, and Google's &lt;a href="https://developers.google.com/search/docs/appearance/ai-features" rel="noopener noreferrer"&gt;AI features page&lt;/a&gt; says a page only has to be indexed and "eligible to be shown in Google Search with a snippet" to appear. Blocking Google-Extended won't remove you from AI Overviews. Google also notes it "intends to support the AIPREF shared machine-readable training preference signal" in early 2027, with the token &lt;code&gt;__usage_ai-training&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;OpenAI says "it can take ~24 hours from a site's robots.txt update for our systems to adjust" for search. If you allow both &lt;code&gt;GPTBot&lt;/code&gt; and &lt;code&gt;OAI-SearchBot&lt;/code&gt;, OpenAI "may use the results from just one crawl for both use cases".&lt;/li&gt;
&lt;li&gt;As of 30 October 2026 Anthropic "has begun recognizing" a machine-readable "no AI training" preference signal that follows the IETF aipref draft. Rules that name &lt;code&gt;ClaudeBot&lt;/code&gt; directly count as "more specific than the general signal", so a robots.txt line for that token wins.&lt;/li&gt;
&lt;li&gt;Anthropic's hosted browser, which acts for a user inside its agent products, is not one of the three robots above. Its &lt;a href="https://support.claude.com/en/articles/18234133-how-do-anthropic-hosted-browsers-identify-themselves-when-they-browse-the-web-on-a-user-s-behalf" rel="noopener noreferrer"&gt;browser identification page&lt;/a&gt; says it identifies itself with a token that ends in &lt;code&gt;-Agent/1.0&lt;/code&gt; (the full string is on that page), warns that "anyone can send the same User-Agent header", and publishes its IPs at &lt;code&gt;https://claude.com/.well-known/sail&lt;/code&gt;. The page gives no robots.txt rule for it.&lt;/li&gt;
&lt;li&gt;OpenAI's &lt;code&gt;GPTBot&lt;/code&gt; and &lt;code&gt;OAI-SearchBot&lt;/code&gt; may append a &lt;code&gt;robots.txt&lt;/code&gt; marker to the user agent string when they fetch that file, so a log line reading &lt;code&gt;OAI-SearchBot/1.4; robots.txt;&lt;/code&gt; is normal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For scale, the &lt;a href="https://almanac.httparchive.org/en/2025/seo" rel="noopener noreferrer"&gt;HTTP Archive Web Almanac 2025 SEO chapter&lt;/a&gt; found &lt;code&gt;gptbot&lt;/code&gt; named in 4.5% of desktop robots.txt files, &lt;code&gt;claudebot&lt;/code&gt; in 3.6%, &lt;code&gt;google-extended&lt;/code&gt; in 3.4%, &lt;code&gt;perplexitybot&lt;/code&gt; in 2.8% and &lt;code&gt;chatgpt-user&lt;/code&gt; in 2.8%. The chapter counts how often a token is named, not whether the rule allows or blocks it. A file that names &lt;code&gt;gptbot&lt;/code&gt; but never mentions &lt;code&gt;oai-searchbot&lt;/code&gt; leaves the search bot on the &lt;code&gt;*&lt;/code&gt; rules, which is one of the three mistakes below.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The three mistakes behind most "AI can't see my site" problems
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Allowing the training bots and thinking that covers search.&lt;/strong&gt; &lt;code&gt;GPTBot&lt;/code&gt; and &lt;code&gt;ClaudeBot&lt;/code&gt; decide training. &lt;code&gt;OAI-SearchBot&lt;/code&gt;, &lt;code&gt;Claude-SearchBot&lt;/code&gt; and &lt;code&gt;PerplexityBot&lt;/code&gt; decide whether you can be cited. Each is a separate robots.txt decision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A named group that forgets the shared rules.&lt;/strong&gt; Google's &lt;a href="https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt" rel="noopener noreferrer"&gt;robots.txt specification page&lt;/a&gt; says "Only one group is valid for a particular crawler" and "User agent specific groups and global groups (&lt;em&gt;) are not combined." A crawler picks the group with the most specific matching user agent and ignores the rest, including &lt;code&gt;User-agent: *&lt;/code&gt;. Add &lt;code&gt;User-agent: OAI-SearchBot&lt;/code&gt; with only &lt;code&gt;Allow: /&lt;/code&gt;, and your &lt;code&gt;Disallow: /cart/&lt;/code&gt; under `&lt;/em&gt;&lt;code&gt; no longer applies to it. The reverse also bites: a &lt;/code&gt;Disallow: /` meant for one bot, pasted under the wrong token.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading Search Console in the wrong place.&lt;/strong&gt; Google's AI features page says AI Overviews and AI Mode traffic is "reported on in the Performance report, within the 'Web' search type", so the main report still counts it with ordinary web clicks. Since 3 June 2026 Google also offers a dedicated &lt;a href="https://developers.google.com/search/blog/2026/06/gen-ai-performance-reports" rel="noopener noreferrer"&gt;Generative AI performance report&lt;/a&gt;, rolled out "to all websites worldwide" as of 31 August 2026. It shows impressions only (no clicks) "within generative AI features on Search, such as AI Overviews and AI Mode", split by Pages, Countries, Devices and Dates, with a separate report for Discover. Find it under Performance in the Search Console sidebar, or open it directly at &lt;code&gt;https://search.google.com/search-console/performance/search-analytics/ai&lt;/code&gt;. The &lt;a href="https://support.google.com/webmasters/answer/16984139" rel="noopener noreferrer"&gt;help page&lt;/a&gt; adds that it "includes data from the Web search type in the Performance report", can be filtered by "Web: text-based" or "Web: multimodal", excludes Search Labs experiments, and is missing when the site "hasn't received enough impressions in generative AI features".&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  3. Read the live robots.txt
&lt;/h2&gt;

&lt;p&gt;Google's specification says robots.txt rules "apply only to the host, protocol, and port number where the robots.txt file is hosted", so check the bare domain, &lt;code&gt;www&lt;/code&gt; and every subdomain separately.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -o /dev/null -w &lt;span class="s1"&gt;'%{http_code} %{content_type}\n'&lt;/span&gt; https://example.com/robots.txt
curl -sS https://example.com/robots.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real output for a few public hosts on 12 November 2026:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ for h in developers.cloudflare.com docs.astro.build www.indexnow.org openai.com; do
    printf '%s  ' "$h"; curl -sS -o /dev/null -w '%{http_code} %{content_type}\n' "https://$h/robots.txt"; done
developers.cloudflare.com  200 text/plain; charset=utf-8
docs.astro.build  200 text/plain
www.indexnow.org  200 text/plain
openai.com  200 text/plain; charset=utf-8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want &lt;code&gt;200&lt;/code&gt; and &lt;code&gt;text/plain&lt;/code&gt;. A &lt;code&gt;403&lt;/code&gt; or an HTML challenge page means a firewall is blocking the file itself (step 6). Google treats "all 4xx errors, except 429, as if a valid robots.txt file didn't exist" and "assumes that there are no crawl restrictions", so a 404 means no restrictions, not a block. A 5xx is worse: "For the first 12 hours, Google stops crawling the site", and if it still can't fetch the file "for the next 30 days Google will use the last good version".&lt;/p&gt;

&lt;p&gt;Then look for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Disallow: /&lt;/code&gt; under &lt;code&gt;User-agent: *&lt;/code&gt; (the staging leftover)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Disallow: /&lt;/code&gt; under any search or user-fetch token from the table&lt;/li&gt;
&lt;li&gt;Named groups that don't repeat your shared disallows&lt;/li&gt;
&lt;li&gt;Lines you didn't write. If the file starts with &lt;code&gt;# BEGIN Cloudflare Managed content&lt;/code&gt;, see step 6.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To see how the file resolves per bot, download it and run it through Python's built-in parser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS https://example.com/robots.txt -o robots.txt
python3 - robots.txt &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s1"&gt;'EOF'&lt;/span&gt;
import sys
from urllib.robotparser import RobotFileParser
rp &lt;span class="o"&gt;=&lt;/span&gt; RobotFileParser&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
rp.parse&lt;span class="o"&gt;(&lt;/span&gt;open&lt;span class="o"&gt;(&lt;/span&gt;sys.argv&lt;span class="o"&gt;[&lt;/span&gt;1&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;.read&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;.splitlines&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; ua &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"GPTBot"&lt;/span&gt;, &lt;span class="s2"&gt;"OAI-SearchBot"&lt;/span&gt;, &lt;span class="s2"&gt;"ChatGPT-User"&lt;/span&gt;, &lt;span class="s2"&gt;"ClaudeBot"&lt;/span&gt;,
           &lt;span class="s2"&gt;"Claude-SearchBot"&lt;/span&gt;, &lt;span class="s2"&gt;"Claude-User"&lt;/span&gt;, &lt;span class="s2"&gt;"PerplexityBot"&lt;/span&gt;,
           &lt;span class="s2"&gt;"Perplexity-User"&lt;/span&gt;, &lt;span class="s2"&gt;"Google-Extended"&lt;/span&gt;, &lt;span class="s2"&gt;"Googlebot"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;:
    print&lt;span class="o"&gt;(&lt;/span&gt;f&lt;span class="s2"&gt;"{ua:18}"&lt;/span&gt;, rp.can_fetch&lt;span class="o"&gt;(&lt;/span&gt;ua, &lt;span class="s2"&gt;"https://example.com/"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run against the &lt;a href="https://www.nytimes.com/robots.txt" rel="noopener noreferrer"&gt;New York Times robots.txt&lt;/a&gt; on 12 November 2026 (a site that has chosen to block every AI token, which makes a clear demo):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPTBot             False
OAI-SearchBot      False
ChatGPT-User       False
ClaudeBot          False
Claude-SearchBot   False
Claude-User        False
PerplexityBot      False
Perplexity-User    False
Google-Extended    False
Googlebot          True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Download with curl first. If &lt;code&gt;RobotFileParser&lt;/code&gt; fetches the file itself and gets a 403, it reports every bot as blocked and sends you looking in the wrong place. The parser handles simple files well. For long Allow/Disallow mixes also open Search Console's &lt;a href="https://support.google.com/webmasters/answer/6062598?hl=en" rel="noopener noreferrer"&gt;robots.txt report&lt;/a&gt;, reached from the property's Settings page or from the "Open robots.txt report" link on that help page. It shows "which robots.txt files Google found for the top 20 hosts on your site, the last time they were crawled, and any warnings or errors encountered", lets you request a recrawl, and is "available only for properties at the domain level" (a Domain property, or a URL-prefix property without a path).&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Write the robots.txt you actually want
&lt;/h2&gt;

&lt;p&gt;For most business sites: allow search and user-fetch bots, and make the training decision separately.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# AI search and user-triggered fetches: allowed, with the same exclusions as everyone else
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
Disallow: /admin/
Disallow: /cart/

# Model training: delete this group to allow it
User-agent: GPTBot
User-agent: ClaudeBot
Disallow: /

User-agent: *
Disallow: /admin/
Disallow: /cart/

Sitemap: https://example.com/sitemap-index.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The search group repeats the &lt;code&gt;*&lt;/code&gt; disallows because of the one-group rule. Google-Extended is left out on purpose: add it to the training group only if you accept losing Gemini grounding as well as training. For a plumber or a dentist, allowing training costs little, since the content is a services page, not a paid archive. The decision is yours, and it is separate from search.&lt;/p&gt;

&lt;p&gt;In Astro the file lives at &lt;code&gt;public/robots.txt&lt;/code&gt;. The &lt;a href="https://docs.astro.build/en/basics/project-structure/" rel="noopener noreferrer"&gt;Astro project structure docs&lt;/a&gt; say files in that folder "will be copied into the build folder untouched".&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Test each user agent against your origin
&lt;/h2&gt;

&lt;p&gt;robots.txt is a request. Plugins, &lt;code&gt;.htaccess&lt;/code&gt;, nginx &lt;code&gt;map&lt;/code&gt; blocks and host firewalls can still refuse the bot. Send one request per user agent, using the version numbers from the vendor pages (OpenAI notes "the version number may change"):&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="nv"&gt;URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://example.com/"&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; bot &lt;span class="k"&gt;in&lt;/span&gt; GPTBot/1.4 OAI-SearchBot/1.4 ChatGPT-User/1.0 ClaudeBot/1.0 \
  Claude-SearchBot/1.0 Claude-User/1.0 PerplexityBot/1.0 Perplexity-User/1.0&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="nv"&gt;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;curl -s -o /dev/null -w &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; -A &lt;span class="s2"&gt;"Mozilla/5.0 (compatible; $bot)"&lt;/span&gt; &lt;span class="s2"&gt;"$URL"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$code  $bot"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output against &lt;code&gt;https://example.com/&lt;/code&gt; on 12 November 2026:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;200  GPTBot/1.4
200  OAI-SearchBot/1.4
200  ChatGPT-User/1.0
200  ClaudeBot/1.0
200  Claude-SearchBot/1.0
200  Claude-User/1.0
200  PerplexityBot/1.0
200  Perplexity-User/1.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;403&lt;/code&gt; or &lt;code&gt;503&lt;/code&gt; for a bot when a browser user agent gets &lt;code&gt;200&lt;/code&gt; means something filters by user agent string. Read Cloudflare results with care: it identifies the real crawlers by source IP as well as user agent, so a fake &lt;code&gt;GPTBot&lt;/code&gt; from your laptop can be blocked as an impostor or allowed when the real one wouldn't be. Use curl for the origin and the server, and use logs (step 7) for the edge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Illustrative example.&lt;/strong&gt; A dental clinic on WordPress, proxied by Cloudflare on the Free plan. robots.txt is clean, but the curl loop returns &lt;code&gt;403&lt;/code&gt; for every bot name. The cause turns out to be a security plugin's "block bad bots" list that matches any user agent containing "Bot". Removing &lt;code&gt;OAI-SearchBot&lt;/code&gt;, &lt;code&gt;Claude-SearchBot&lt;/code&gt; and &lt;code&gt;PerplexityBot&lt;/code&gt; from that list fixes the origin. The clinic then discovers Bot Fight Mode is challenging the same crawlers at the edge, which is the next step.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Check Cloudflare's AI settings
&lt;/h2&gt;

&lt;p&gt;Cloudflare renamed and reworked these controls in 2026. The facts below come from the docs page &lt;a href="https://developers.cloudflare.com/bots/additional-configurations/block-ai-bots/" rel="noopener noreferrer"&gt;AI Crawler and Agent access policies&lt;/a&gt; (last updated 2 November 2026) and the linked pages, all opened on 12 November 2026.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Where.&lt;/strong&gt; In the dashboard go to &lt;strong&gt;Security &amp;gt; Settings&lt;/strong&gt;, filter by &lt;strong&gt;Bot traffic&lt;/strong&gt;, then open &lt;strong&gt;AI Crawler and Agent access policies&lt;/strong&gt; (the page says it "was previously called Configure AI bot policies"). You set one action per behaviour: &lt;strong&gt;Search&lt;/strong&gt; ("crawlers that collect or index your content to answer questions about it later"), &lt;strong&gt;Agent&lt;/strong&gt; ("automated activity acting in real time on a person's behalf, such as chat fetch bots and browser-use agents") and &lt;strong&gt;Training&lt;/strong&gt; ("crawlers taking your content to train or fine-tune a model, including mixed-purpose crawlers that are used both for Training and for Search"). Actions are Block, Block on pages with ads, Allow (do not block), and for Training only, Disallow, which tells crawlers to stay out "through robots.txt". Each policy "applies to Verified bots with that behavior and matching unverified bots". Under Agents you can also set individual actions for the top Personal Agents, which Cloudflare recommends leaving on Allow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training: Disallow, not Block, if you want to stay in search.&lt;/strong&gt; The docs say "Training actions also apply to mixed-purpose crawlers used for both Search and Training." Cloudflare's &lt;a href="https://blog.cloudflare.com/accountable-mixed-use-ai-crawlers/" rel="noopener noreferrer"&gt;15 September 2026 announcement&lt;/a&gt; spells out what that means: "Block and Block on pages with ads now apply to mixed-use crawlers, including Applebot, Bingbot, and Googlebot, so either setting impacts search as well as training. To stop training and keep search, use Disallow AI Training." With Bot Preference Sync on, Disallow "also blocks AI training crawlers at Cloudflare's edge", and "Mixed-purpose crawlers used for both Search and Training are excluded from this edge block".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Defaults.&lt;/strong&gt; The docs say that for new domains "Search, Agents, and Training use Allow (do not block) by default." The same announcement adds that domains onboarded from 15 September 2026 are "offered one of two preset configurations": the non-ad preset keeps Search, Training and Agent on Allow with Preference Sync enabled; the ad-supported preset sets Training to Disallow AI Training and Agent to Block on pages with ads. If your zone was added after that date, check which preset was applied.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bot Preference Sync (managed robots.txt).&lt;/strong&gt; The &lt;a href="https://developers.cloudflare.com/bots/additional-configurations/managed-robots-txt/" rel="noopener noreferrer"&gt;managed robots.txt page&lt;/a&gt; (last updated 2 November 2026) says it is "available on all plans" and generates directives "when at least one policy is set to Block, Block on pages with ads, or, for Training, Disallow". Cloudflare then prepends a block that starts with &lt;code&gt;# BEGIN Cloudflare Managed content&lt;/code&gt;, contains &lt;code&gt;User-Agent: *&lt;/code&gt;, &lt;code&gt;Content-signal: search=yes, ai-train=no, use=reference&lt;/code&gt; and &lt;code&gt;Allow: /&lt;/code&gt;, then &lt;code&gt;Disallow: /&lt;/code&gt; for &lt;code&gt;Amazonbot&lt;/code&gt;, &lt;code&gt;Applebot-Extended&lt;/code&gt;, &lt;code&gt;Bytespider&lt;/code&gt;, &lt;code&gt;CCBot&lt;/code&gt;, &lt;code&gt;ClaudeBot&lt;/code&gt;, &lt;code&gt;Google-Extended&lt;/code&gt;, &lt;code&gt;GPTBot&lt;/code&gt; and &lt;code&gt;meta-externalagent&lt;/code&gt;, and ends with &lt;code&gt;# END Cloudflare Managed Content&lt;/code&gt;. If every policy is Allow, "your robots.txt is served unchanged". If you have no robots.txt at all, "Cloudflare creates a new file with managed Disallow rules for known AI crawlers and serves it for you". The Content-signal syntax comes from Cloudflare's &lt;a href="https://blog.cloudflare.com/content-signals-policy/" rel="noopener noreferrer"&gt;Content Signals Policy post&lt;/a&gt; of 24 September 2025, which also said the managed robots.txt feature was then on "for over 3.8 million domains". The September 2026 post adds that "Managed Robots.txt will be deprecated in favor of Bot Preference Sync" and existing users migrate. So if your robots.txt has lines you didn't write, this is where they came from.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Crawl Control&lt;/strong&gt; is &lt;a href="https://developers.cloudflare.com/ai-crawl-control/" rel="noopener noreferrer"&gt;available on all plans&lt;/a&gt;. Its &lt;a href="https://developers.cloudflare.com/ai-crawl-control/features/manage-ai-crawlers/" rel="noopener noreferrer"&gt;Crawlers tab&lt;/a&gt; lists each crawler with an Allow or Block action (a third option, Charge, is in private beta), plus a "Robots.txt violations" column. A Block "creates or updates a WAF custom rule on your zone", and on paid plans you can choose a 403 or 402 response. On the Free plan the docs say detection is "by user agent strings only". The &lt;a href="https://developers.cloudflare.com/ai-crawl-control/features/analyze-ai-traffic/" rel="noopener noreferrer"&gt;Metrics tab&lt;/a&gt; shows requests per crawler and a status-code distribution where 4xx means "Client errors (including 403 blocked and 402 payment required)".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bot Fight Mode&lt;/strong&gt; (Free plan) "Issues computationally expensive challenges" to requests matching bot patterns. Its &lt;a href="https://developers.cloudflare.com/bots/get-started/bot-fight-mode/" rel="noopener noreferrer"&gt;docs page&lt;/a&gt; (last updated 3 August 2026) says "You cannot bypass or skip Bot Fight Mode using WAF custom rules or Page Rules", that it "will not trigger if an IP Access rule matches the request first", and that for exceptions you should "use Super Bot Fight Mode instead". &lt;a href="https://developers.cloudflare.com/bots/get-started/super-bot-fight-mode/" rel="noopener noreferrer"&gt;Super Bot Fight Mode&lt;/a&gt; comes with Pro, Business and Enterprise, has three groups (Definitely automated traffic, Likely automated traffic, Verified bots) each with its own action, and accepts WAF custom rules with the Skip action as exceptions. Challenged requests show up in &lt;strong&gt;Security &amp;gt; Analytics &amp;gt; Events&lt;/strong&gt; with "Bot Fight Mode" or "Super Bot Fight Mode" in the Service field.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a site that wants to be cited: Search and Agent on Allow, Training on Allow or Disallow (never Block, unless you accept losing Googlebot and Bingbot too), Bot Fight Mode off or replaced by Super Bot Fight Mode with Verified bots on Allow, and no stale custom WAF rule that blocks on &lt;code&gt;cf.client.bot&lt;/code&gt; or on the string "Bot".&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Confirm with real traffic
&lt;/h2&gt;

&lt;p&gt;Logs show what the real crawlers got. On an nginx or Apache combined log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -iE &lt;span class="s1"&gt;'gptbot|oai-searchbot|chatgpt-user|claudebot|claude-searchbot|claude-user|perplexitybot|perplexity-user'&lt;/span&gt; \
  /var/log/nginx/access.log \
  &lt;span class="o"&gt;|&lt;/span&gt; awk -F&lt;span class="s1"&gt;'"'&lt;/span&gt; &lt;span class="s1"&gt;'{split($3, s, " "); match($6, /[A-Za-z-]+(Bot|User)\//); print substr($6, RSTART, RLENGTH-1), s[1]}'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; sort &lt;span class="o"&gt;|&lt;/span&gt; uniq -c &lt;span class="o"&gt;|&lt;/span&gt; sort -rn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output for a six-line sample log (user agent strings copied from the vendor docs):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      1 PerplexityBot 200
      1 OAI-SearchBot 403
      1 OAI-SearchBot 200
      1 GPTBot 200
      1 ClaudeBot 200
      1 Claude-SearchBot 200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That &lt;code&gt;OAI-SearchBot 403&lt;/code&gt; on one path is exactly the kind of line to chase. Requests Cloudflare blocks never reach your server, so also open &lt;strong&gt;Security &amp;gt; Analytics &amp;gt; Events&lt;/strong&gt; filtered by user agent, and &lt;strong&gt;AI Crawl Control &amp;gt; Metrics&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To prove a hit came from the vendor and not an impostor, compare the IP against the published lists. All six returned &lt;code&gt;200&lt;/code&gt; with JSON on 12 November 2026:&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 https://openai.com/searchbot.json &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.prefixes[].ipv4Prefix'&lt;/span&gt;
curl -s https://openai.com/gptbot.json &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.prefixes[].ipv4Prefix'&lt;/span&gt;
curl -s https://openai.com/chatgpt-user.json &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.prefixes[].ipv4Prefix'&lt;/span&gt;
curl -s https://claude.com/crawling/bots.json &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.prefixes[].ipv4Prefix'&lt;/span&gt;
curl -s https://www.perplexity.ai/perplexitybot.json &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.prefixes[].ipv4Prefix'&lt;/span&gt;
curl -s https://www.perplexity.ai/perplexity-user.json &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.prefixes[].ipv4Prefix'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First lines of &lt;code&gt;searchbot.json&lt;/code&gt; that day:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;104.210.140.128/28
13.66.216.176/28
135.234.64.0/24
172.182.193.224/28
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anthropic adds a warning worth repeating: blocking its IPs instead of using robots.txt "may not work correctly or persistently guarantee an opt-out, as doing so impedes our ability to read your robots.txt file".&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Why this is worth 20 minutes
&lt;/h2&gt;

&lt;p&gt;Cloudflare's &lt;a href="https://blog.cloudflare.com/content-independence-day-no-ai-crawl-without-compensation/" rel="noopener noreferrer"&gt;Content Independence Day post&lt;/a&gt; of 1 July 2025 says that compared with "the Google of old", getting traffic is "750 times more difficult" with OpenAI and "30,000 times more difficult" with Anthropic. Its &lt;a href="https://blog.cloudflare.com/ai-search-crawl-refer-ratio-on-radar/" rel="noopener noreferrer"&gt;Radar analysis&lt;/a&gt; the same day measured a crawl-to-refer ratio of 70,900:1 for Anthropic's crawler for 19 to 26 June 2025, with the caveat that "these calculations may overstate the respective ratios" because native apps send no Referer header. Citations are the only part of that traffic that sends a customer. Blocking the search tokens by accident gives up the citation while keeping the crawl cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a technical SEO checking AI crawler access for [domain] ([CMS or framework], hosted on [host], Cloudflare: [yes/no + plan]).

Goal: AI search and user-triggered fetch bots can reach every public page. Training bots: [allow / block].

Use only these tokens and meanings; do not invent others:
- OpenAI: GPTBot (training), OAI-SearchBot (ChatGPT search index), ChatGPT-User (user-triggered fetch, robots.txt may not apply)
- Anthropic: ClaudeBot (training), Claude-SearchBot (search index), Claude-User (user-triggered fetch)
- Perplexity: PerplexityBot (search index, not training), Perplexity-User (user-triggered fetch, generally ignores robots.txt)
- Google: Google-Extended (robots.txt-only token for Gemini training and Vertex AI grounding; no effect on Google Search, AI Overviews or AI Mode, which use Googlebot)

Inputs:
1. robots.txt for each hostname: [paste]
2. curl status code per user agent against the origin: [paste]
3. Bot lines from access logs or Cloudflare Security Events: [paste or "none"]
4. Cloudflare: AI Crawler and Agent access policies (Search/Agent/Training and the action on each), Bot Preference Sync on/off, AI Crawl Control crawler actions, Bot Fight Mode or Super Bot Fight Mode settings, custom WAF rules: [paste]

Tasks:
1. For each token, say whether robots.txt allows "/" and quote the group it matches. Only one group applies per crawler and a named group replaces the * group.
2. Flag anything at the origin or the edge that blocks a bot robots.txt allows, anything Cloudflare's managed block added, and a Training policy set to Block (it also blocks mixed-purpose search crawlers).
3. Write a corrected robots.txt that keeps every existing Disallow and Sitemap line and repeats shared Disallows inside named groups.
4. List the exact Cloudflare changes by menu path.

Output: a table (bot | robots.txt | origin | edge | verdict | fix), then the file, then the changes. If an input is missing, say what you need instead of guessing.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before you deploy the corrected file, run it through the Python check from step 3 and make sure every search and user-fetch token prints &lt;code&gt;True&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;p&gt;Run step 3 on your own site today. A &lt;code&gt;Disallow: /&lt;/code&gt; under &lt;code&gt;*&lt;/code&gt; or a 403 on robots.txt itself outranks every other problem here, so fix those first, then the Cloudflare policies, then the origin filters.&lt;/p&gt;

&lt;p&gt;This article was written with AI assistance and checked by a person.&lt;/p&gt;

&lt;p&gt;If that's too much work, contact us and we'll make you a free website.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>cloudflare</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to make an AI-built website show up on Google: a checklist you can run with curl</title>
      <dc:creator>Marc Mulvaney</dc:creator>
      <pubDate>Mon, 02 Nov 2026 14:00:00 +0000</pubDate>
      <link>https://dev.to/freewebsite247/how-to-make-an-ai-built-website-show-up-on-google-a-fixed-version-of-the-viral-claude-code-prompt-1b18</link>
      <guid>https://dev.to/freewebsite247/how-to-make-an-ai-built-website-show-up-on-google-a-fixed-version-of-the-viral-claude-code-prompt-1b18</guid>
      <description>&lt;p&gt;A website built with an AI coding tool can look finished and still be missing from Google. The causes are rarely exotic. The text only exists after JavaScript runs, a &lt;code&gt;noindex&lt;/code&gt; tag survived from staging, or every made-up URL returns 200.&lt;/p&gt;

&lt;p&gt;Google's &lt;a href="https://developers.google.com/search/docs/essentials/technical" rel="noopener noreferrer"&gt;Search Essentials&lt;/a&gt; list three technical requirements a page must meet to be eligible for indexing: Googlebot isn't blocked, the page returns an HTTP 200 status code, and the page has indexable content. Every check below tests one of those conditions from the outside, with curl, against the live site. The order matters, because a blocked site makes every later fix irrelevant.&lt;/p&gt;

&lt;p&gt;The HTTP Archive's &lt;a href="https://almanac.httparchive.org/en/2025/seo" rel="noopener noreferrer"&gt;2025 Web Almanac SEO chapter&lt;/a&gt; (published 15 January 2026) gives a sense of how common the basic mistakes are: 13% of sites return a 404 for robots.txt, 2.4% of mobile pages carry a &lt;code&gt;noindex&lt;/code&gt; rule, and only 67% of mobile pages declare a canonical URL. A new AI-built site is usually in the wrong group on at least one of those.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Check what the HTML contains before JavaScript runs
&lt;/h2&gt;

&lt;p&gt;Run this against the production URL, not the dev server:&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 https://example.com/services/ &lt;span class="o"&gt;|&lt;/span&gt; grep -io &lt;span class="s2"&gt;"&amp;lt;h1[^&amp;gt;]*&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a server-rendered or prerendered site you get the heading tag back. This is the real output for the Astro homepage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1 class="text-balance mb-4 text-center text-3xl/[1.1] font-bold font-heading ..."&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the browser shows a heading and curl prints nothing, the page is assembled in the browser. Google does render JavaScript. Its &lt;a href="https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics" rel="noopener noreferrer"&gt;JavaScript SEO documentation&lt;/a&gt; says every page with a 200 status goes into a rendering queue, that a page "may stay on this queue for a few seconds, but it can take longer than that", and that "not all bots can run JavaScript". Static HTML removes the wait and works for every crawler. Astro's &lt;a href="https://docs.astro.build/en/guides/on-demand-rendering/" rel="noopener noreferrer"&gt;on-demand rendering guide&lt;/a&gt; states the default: "your entire Astro site will be prerendered", and you opt out per route. A client-side React or Vue app needs a prerender step, or its marketing pages moved to a framework that outputs HTML.&lt;/p&gt;

&lt;p&gt;Count the links while you're there:&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 https://example.com/ &lt;span class="o"&gt;|&lt;/span&gt; grep -o &lt;span class="s1"&gt;'&amp;lt;a [^&amp;gt;]*href="[^"]*"'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; wc -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Astro homepage returns &lt;code&gt;136&lt;/code&gt;. If your homepage returns &lt;code&gt;0&lt;/code&gt;, the navigation is built by JavaScript or uses click handlers. The same JavaScript SEO documentation says Google "can only discover your links if they are &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; HTML elements with an &lt;code&gt;href&lt;/code&gt; attribute". A &lt;code&gt;&amp;lt;span onclick&amp;gt;&lt;/code&gt; or an &lt;code&gt;&amp;lt;a onclick&amp;gt;&lt;/code&gt; without &lt;code&gt;href&lt;/code&gt; is not a link to Googlebot.&lt;/p&gt;

&lt;p&gt;Then test a URL that should not exist:&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 -o /dev/null -w &lt;span class="s2"&gt;"%{http_code}\n"&lt;/span&gt; https://example.com/this-page-does-not-exist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The right answer is &lt;code&gt;404&lt;/code&gt;. A single-page app with a catch-all route usually answers &lt;code&gt;200&lt;/code&gt; and shows a "not found" message, which the Search Console &lt;a href="https://support.google.com/webmasters/answer/7440203" rel="noopener noreferrer"&gt;Page indexing report&lt;/a&gt; lists as a soft 404. Google's advice for client-side routing is to redirect to a URL where the server really returns 404, or to inject a &lt;code&gt;noindex&lt;/code&gt; meta tag on the error view with JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Find every rule that blocks indexing
&lt;/h2&gt;

&lt;p&gt;A block can hide in three places: robots.txt, an HTTP header, or a meta tag.&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 https://example.com/robots.txt
curl -sI https://example.com/ &lt;span class="o"&gt;|&lt;/span&gt; grep -i &lt;span class="s2"&gt;"x-robots-tag"&lt;/span&gt;
curl -s https://example.com/ &lt;span class="o"&gt;|&lt;/span&gt; grep -io &lt;span class="s1"&gt;'&amp;lt;meta name="robots"[^&amp;gt;]*&amp;gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A healthy robots.txt looks like the one developer.mozilla.org serves today:&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: *
Sitemap: https://developer.mozilla.org/sitemap.xml

Disallow: /api/
Disallow: /*/files/
Disallow: /media
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The two outputs you don't want are &lt;code&gt;Disallow: /&lt;/code&gt; under &lt;code&gt;User-agent: *&lt;/code&gt; and any &lt;code&gt;X-Robots-Tag: noindex&lt;/code&gt; or &lt;code&gt;&amp;lt;meta name="robots" content="noindex"&amp;gt;&lt;/code&gt; on a production page. Then search the repository, because the block often lives in code or in the host's header file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -rni &lt;span class="s2"&gt;"noindex"&lt;/span&gt; src/ public/ astro.config.* _headers vercel.json netlify.toml 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two rules from Google's documentation decide how to fix what you find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;robots.txt controls crawling, not indexing. Google's &lt;a href="https://developers.google.com/search/docs/crawling-indexing/robots/intro" rel="noopener noreferrer"&gt;robots.txt introduction&lt;/a&gt; says it "is not a mechanism for keeping a web page out of Google" and that a disallowed URL "can still be indexed if linked to from other sites".&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;noindex&lt;/code&gt; only works on a page Google can fetch. The documentation on &lt;a href="https://developers.google.com/search/docs/crawling-indexing/block-indexing" rel="noopener noreferrer"&gt;blocking indexing with noindex&lt;/a&gt; says that if the page is blocked by robots.txt "the crawler will never see the noindex rule, and the page can still appear in search results".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So production pages get no &lt;code&gt;Disallow&lt;/code&gt; and no &lt;code&gt;noindex&lt;/code&gt;. Pages that must stay out of Google, such as a thank-you page or a client portal, get &lt;code&gt;noindex&lt;/code&gt; in the server-sent HTML and stay crawlable. Don't rely on JavaScript to remove a &lt;code&gt;noindex&lt;/code&gt; that the server sent. Google's JavaScript documentation says that when Google encounters the tag "it may skip rendering and JavaScript execution", so "using JavaScript to change or remove the robots meta tag from noindex may not work as expected".&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Generate a sitemap and point robots.txt at it
&lt;/h2&gt;

&lt;p&gt;Google's &lt;a href="https://developers.google.com/search/docs/crawling-indexing/sitemaps/overview" rel="noopener noreferrer"&gt;sitemap overview&lt;/a&gt; says a site of about 500 pages or fewer that is "comprehensively linked internally" may not need one. It also says you might need one if "your site is new and has few external links to it", which describes every freshly launched site. In Astro the whole job is one command and two lines, documented in the &lt;a href="https://docs.astro.build/en/guides/integrations-guide/sitemap/" rel="noopener noreferrer"&gt;@astrojs/sitemap guide&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx astro add sitemap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// astro.config.mjs&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'astro/config'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sitemap&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@astrojs/sitemap'&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="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'https://example.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// required, the integration needs the deployed URL&lt;/span&gt;
  &lt;span class="n"&gt;trailingSlash&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'always'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;integrations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;sitemap&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="p"&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;The build writes &lt;code&gt;dist/sitemap-index.xml&lt;/code&gt; and &lt;code&gt;dist/sitemap-0.xml&lt;/code&gt;. The integration lists prerendered routes, including dynamic routes built with &lt;code&gt;getStaticPaths()&lt;/code&gt;, but the Astro documentation notes it "cannot generate sitemap entries for dynamic routes in SSR mode".&lt;/p&gt;

&lt;p&gt;Then add &lt;code&gt;public/robots.txt&lt;/code&gt;:&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: *
Disallow:

Sitemap: https://example.com/sitemap-index.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After deploy, confirm the index is live. This is the real response from docs.astro.build:&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 https://docs.astro.build/sitemap-index.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&amp;lt;sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&amp;gt;&amp;lt;sitemap&amp;gt;&amp;lt;loc&amp;gt;https://docs.astro.build/sitemap-0.xml&amp;lt;/loc&amp;gt;&amp;lt;/sitemap&amp;gt;&amp;lt;/sitemapindex&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three facts from Google's &lt;a href="https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap" rel="noopener noreferrer"&gt;build and submit a sitemap&lt;/a&gt; page stop the usual over-engineering. Google "ignores &lt;code&gt;&amp;lt;priority&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;changefreq&amp;gt;&lt;/code&gt; values". Google uses &lt;code&gt;&amp;lt;lastmod&amp;gt;&lt;/code&gt; only when it is "consistently and verifiably" accurate, so don't let a tool stamp today's date on every URL. And one sitemap file holds at most 50 MB or 50,000 URLs, so a small business site will never need more than the one file Astro writes.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Give every page exactly one URL
&lt;/h2&gt;

&lt;p&gt;Pick https, pick www or non-www, and pick one trailing-slash style. Astro's &lt;a href="https://docs.astro.build/en/reference/configuration-reference/#trailingslash" rel="noopener noreferrer"&gt;trailingSlash option&lt;/a&gt; takes &lt;code&gt;"always"&lt;/code&gt;, &lt;code&gt;"never"&lt;/code&gt; or &lt;code&gt;"ignore"&lt;/code&gt;. The reference says it sets route matching "in the dev server and on-demand rendered pages", so on a static deploy the redirect from &lt;code&gt;/about&lt;/code&gt; to &lt;code&gt;/about/&lt;/code&gt; is your host's job, not Astro's. Every other variant should reach the final URL in one redirect. Test with real hosts to see what good output looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sIL -o /dev/null -w &lt;span class="s2"&gt;"%{num_redirects} hops -&amp;gt; %{url_effective}\n"&lt;/span&gt; https://www.github.com/
curl -sIL https://docs.astro.build/en/guides/internationalization &lt;span class="o"&gt;|&lt;/span&gt; grep -i &lt;span class="s2"&gt;"^HTTP\|^location"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 hops -&amp;gt; https://github.com/
HTTP/2 307
location: /en/guides/internationalization/
HTTP/2 200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One hop is fine. Google's &lt;a href="https://developers.google.com/search/docs/crawling-indexing/http-network-errors" rel="noopener noreferrer"&gt;HTTP status code documentation&lt;/a&gt; says Googlebot "generally follows 10 redirect hops", so a chain won't stop indexing, but each hop is a wasted request, and your internal links should point straight at the final URL.&lt;/p&gt;

&lt;p&gt;Add one absolute, self-referencing canonical in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; of your layout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
// src/layouts/Base.astro
const canonical = new URL(Astro.url.pathname, Astro.site);
---
&amp;lt;link rel="canonical" href={canonical.href} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google's &lt;a href="https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls" rel="noopener noreferrer"&gt;canonicalization documentation&lt;/a&gt; ranks the signals: redirects and &lt;code&gt;rel="canonical"&lt;/code&gt; are "a strong signal", sitemap inclusion is "a weak signal", and the methods "can stack and thus become more effective when combined". It also says to link "to the canonical URL rather than a duplicate URL" inside your site. A canonical tag that disagrees with your redirects and sitemap is a tie-break Google may settle the other way.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Do the on-page basics, minus the myths
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Every page needs its own &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt;. Google's &lt;a href="https://developers.google.com/search/docs/appearance/title-link" rel="noopener noreferrer"&gt;title link documentation&lt;/a&gt; says to "write descriptive and concise text" and to avoid "vague descriptors like 'Home'".&lt;/li&gt;
&lt;li&gt;Write a meta description, but know its place. Google's &lt;a href="https://developers.google.com/search/docs/appearance/snippet" rel="noopener noreferrer"&gt;snippet documentation&lt;/a&gt; says snippets "are primarily created from the page content itself" and the meta description is used when "it might give users a more accurate description of the page".&lt;/li&gt;
&lt;li&gt;One H1 per page is good for screen readers. Google's &lt;a href="https://developers.google.com/search/docs/fundamentals/seo-starter-guide" rel="noopener noreferrer"&gt;SEO starter guide&lt;/a&gt; says that from a Search perspective "it doesn't matter if you're using them out of order", so don't expect heading changes to move anything.&lt;/li&gt;
&lt;li&gt;Alt text describes the image. Google's &lt;a href="https://developers.google.com/search/docs/appearance/google-images" rel="noopener noreferrer"&gt;image SEO documentation&lt;/a&gt; says Google "uses alt text along with computer vision algorithms and the contents of the page to understand the subject matter of the image". Decorative images get &lt;code&gt;alt=""&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Visible breadcrumbs with &lt;code&gt;BreadcrumbList&lt;/code&gt; JSON-LD are still worth adding. Google's &lt;a href="https://developers.google.com/search/docs/appearance/structured-data/breadcrumb" rel="noopener noreferrer"&gt;breadcrumb structured data documentation&lt;/a&gt; says a trail "may help users understand and explore a site effectively" and lists the rich result as "available on desktop". Google &lt;a href="https://developers.google.com/search/blog/2025/01/simplifying-breadcrumbs" rel="noopener noreferrer"&gt;announced on 23 January 2025&lt;/a&gt; that mobile results show the domain only.&lt;/li&gt;
&lt;li&gt;Skip &lt;code&gt;FAQPage&lt;/code&gt; schema. Google's &lt;a href="https://developers.google.com/search/blog/2023/08/howto-faq-changes" rel="noopener noreferrer"&gt;August 2023 announcement&lt;/a&gt; said FAQ rich results "will only be shown for well-known, authoritative government and health websites". Keep the questions and answers as plain content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check titles and descriptions in one command:&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 https://example.com/services/ &lt;span class="o"&gt;|&lt;/span&gt; grep -o &lt;span class="s2"&gt;"&amp;lt;title&amp;gt;[^&amp;lt;]*&amp;lt;/title&amp;gt;\|&amp;lt;meta name=\"description\"[^&amp;gt;]*&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;title&amp;gt;Internationalization (i18n) Routing | Docs&amp;lt;/title&amp;gt;
&amp;lt;meta name="description" content="Learn how to use Astro’s i18n routing features to localize your site’s pages."/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That output is from the Astro docs. If two of your pages print the same title, fix the template.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Hit the Core Web Vitals thresholds
&lt;/h2&gt;

&lt;p&gt;"Loads in under 2 seconds" is not a metric Google uses. The thresholds on &lt;a href="https://web.dev/articles/vitals" rel="noopener noreferrer"&gt;web.dev&lt;/a&gt; are: Largest Contentful Paint within 2.5 seconds, Interaction to Next Paint of 200 milliseconds or less, and Cumulative Layout Shift of 0.1 or less, each measured at the 75th percentile of real page loads.&lt;/p&gt;

&lt;p&gt;A new site has no real-user data yet. The &lt;a href="https://developers.google.com/speed/docs/insights/v5/about" rel="noopener noreferrer"&gt;PageSpeed Insights documentation&lt;/a&gt; explains it shows "both lab and field data", that the field data comes from the Chrome User Experience Report, and that a page "might not have sufficient data if it has been recently published or has too few samples from real users". Until then you work from the Lighthouse lab run. INP needs real interactions, which a lab run can only simulate, so web.dev's &lt;a href="https://web.dev/articles/tbt" rel="noopener noreferrer"&gt;Total Blocking Time article&lt;/a&gt; offers TBT as "a reasonable proxy metric for INP for the lab", with a target under 200 milliseconds on average mobile hardware.&lt;/p&gt;

&lt;p&gt;In Astro the image work is one component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
import { Image } from 'astro:assets';
import hero from '../assets/hero.jpg';
---
&amp;lt;Image src={hero} alt="Technician fitting a tankless water heater" priority /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Astro &lt;a href="https://docs.astro.build/en/guides/images/" rel="noopener noreferrer"&gt;images guide&lt;/a&gt; says &lt;code&gt;&amp;lt;Image /&amp;gt;&lt;/code&gt; "infers image dimensions to avoid Cumulative Layout Shift" and converts the file at build time. Keep source images in &lt;code&gt;src/&lt;/code&gt;, because files in &lt;code&gt;public/&lt;/code&gt; are "copied into the build folder as-is, with no processing". The &lt;a href="https://docs.astro.build/en/reference/modules/astro-assets/#priority" rel="noopener noreferrer"&gt;&lt;code&gt;priority&lt;/code&gt; attribute&lt;/a&gt;, added in Astro 5.10, sets &lt;code&gt;loading="eager"&lt;/code&gt;, &lt;code&gt;decoding="sync"&lt;/code&gt; and &lt;code&gt;fetchpriority="high"&lt;/code&gt;, which is what the hero image above the fold needs. Astro 7.4.11 is the current release &lt;a href="https://registry.npmjs.org/astro/latest" rel="noopener noreferrer"&gt;on npm&lt;/a&gt; today.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Submit the site in Search Console and Bing yourself
&lt;/h2&gt;

&lt;p&gt;No prompt can do this part. Add a Domain property in Search Console and verify it with the DNS record it gives you. Google's &lt;a href="https://support.google.com/webmasters/answer/9008080" rel="noopener noreferrer"&gt;ownership verification page&lt;/a&gt; says a DNS record is "required only for Domain property" and that you "must choose between a TXT record and a CNAME record". Open the &lt;a href="https://support.google.com/webmasters/answer/7451001" rel="noopener noreferrer"&gt;Sitemaps report&lt;/a&gt;, paste &lt;code&gt;https://example.com/sitemap-index.xml&lt;/code&gt; into "Add a new sitemap" and click Submit. Then run &lt;a href="https://support.google.com/webmasters/answer/9012289" rel="noopener noreferrer"&gt;URL Inspection&lt;/a&gt; on the homepage and your main service pages, click Test live URL, check the rendered HTML, and click Request indexing.&lt;/p&gt;

&lt;p&gt;Set expectations from Google's own text. The &lt;a href="https://developers.google.com/search/docs/crawling-indexing/ask-google-to-recrawl" rel="noopener noreferrer"&gt;recrawl documentation&lt;/a&gt; says "crawling can take anywhere from a few days to a few weeks" and that "requesting a recrawl multiple times for the same URL won't get it crawled any faster". URL Inspection has "a daily limit of inspection requests for each property". Two statuses in the Page indexing report are normal for a new site: "Discovered - currently not indexed" means Google found the URL but hasn't crawled it yet, and "Crawled - currently not indexed" is described by Google as "a common message for many sites" that "doesn't necessarily indicate an issue".&lt;/p&gt;

&lt;p&gt;Once the site has impressions, Search Console also shows whether pages appear in AI Overviews and AI Mode. That traffic still counts under the Web search type in the main Performance report, and since 31 August 2026 every property also has a &lt;a href="https://developers.google.com/search/blog/2026/06/gen-ai-performance-reports" rel="noopener noreferrer"&gt;Generative AI performance report&lt;/a&gt; with impressions only, broken down by page, country, device and date. Find it under Performance in the Search Console sidebar, or open it directly at search.google.com/search-console/performance/search-analytics/ai. The &lt;a href="https://support.google.com/webmasters/answer/16984139" rel="noopener noreferrer"&gt;help page&lt;/a&gt; says that if the report is missing, the site "hasn't received enough impressions in generative AI features".&lt;/p&gt;

&lt;p&gt;Add the site to Bing Webmaster Tools too. On the My Sites page, click Import, sign in with the Google account that owns the Search Console property, and select the sites. &lt;a href="https://blogs.bing.com/webmaster/september-2019/Import-sites-from-Search-Console-to-Bing-Webmaster-Tools" rel="noopener noreferrer"&gt;Bing's announcement&lt;/a&gt; says up to 100 sites import at once, they arrive "automatically verified", and traffic data can take up to 48 hours.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Fix the parts a prompt can't
&lt;/h2&gt;

&lt;p&gt;Google's &lt;a href="https://developers.google.com/search/docs/fundamentals/using-gen-ai-content" rel="noopener noreferrer"&gt;guidance on generative AI content&lt;/a&gt; doesn't ban AI-written text. It says generative AI "can be particularly useful when researching a topic, and to add structure to original content". What it targets is generating "many pages without adding value for users", which falls under the &lt;a href="https://developers.google.com/search/docs/essentials/spam-policies" rel="noopener noreferrer"&gt;scaled content abuse&lt;/a&gt; spam policy. The same page warns that "generative models don't retrieve facts, but predict a likely sequence of words", and that "it is critical to manually factcheck and review all AI-generated content".&lt;/p&gt;

&lt;p&gt;So the fix for copy that sounds like every other site is specifics only the business knows: real prices, the actual service area, what happens on a job, which brands they install. Google's &lt;a href="https://developers.google.com/search/docs/fundamentals/creating-helpful-content" rel="noopener noreferrer"&gt;helpful content guidance&lt;/a&gt; asks "Who, How, and Why" about a page, starting with making it "clear who created it". The author on an about page has to be a real person with a real role. Never let a tool invent a bio, a review or a statistic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Illustrative example
&lt;/h2&gt;

&lt;p&gt;Illustrative example: a plumbing company has a nine-page site built with an AI app builder as a single-page React app. The checks from steps 1 and 2 return this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ curl -s https://example.com/ | grep -io "&amp;lt;h1[^&amp;gt;]*&amp;gt;"
$ curl -s https://example.com/ | grep -o '&amp;lt;a [^&amp;gt;]*href="[^"]*"' | wc -l
0
$ curl -s -o /dev/null -w "%{http_code}\n" https://example.com/anything
200
$ curl -s https://example.com/robots.txt
User-agent: *
Disallow: /
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three failures, all before Google can read a word: no HTML content, no crawlable links, no real 404, plus a staging robots.txt that went live. The fix order is the order of this article. Move the nine pages to prerendered HTML, remove the &lt;code&gt;Disallow&lt;/code&gt;, add the sitemap, set one canonical URL per page, then add the Domain property and request indexing on the homepage and the three service pages. Only then does the copy, the Core Web Vitals and the author page matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt
&lt;/h2&gt;

&lt;p&gt;Paste this into your coding tool from the repository root and fill in the brackets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You're working on [site name], a [framework and version] site deployed to [host] at [production URL]. Google isn't indexing it. Audit first, then fix. Don't change prices, business details, reviews or author information.

Preferred URLs: [https + www or non-www], trailing slash [always/never].
Pages that must stay out of Google: [list or "none"].

1. Rendering: build the site and confirm each page's main text, H1 and navigation links exist in the built HTML without JavaScript, with links as &amp;lt;a href&amp;gt;. List any page that needs JavaScript to show content and propose a prerendered fix.
2. Blocking: find noindex meta tags, X-Robots-Tag headers and robots.txt Disallow rules in the code, the build output and the host configuration. Remove them from production pages. Excluded pages get noindex in the server HTML and stay crawlable.
3. Sitemap: generate one containing only canonical, indexable URLs that return 200. Add a Sitemap: line to robots.txt. Do not write lastmod dates unless they come from real content changes.
4. URLs: one absolute, self-referencing canonical in &amp;lt;head&amp;gt; on every page, matching my preferred format. Every other variant redirects to the final URL in one 301. Update internal links that hit redirects or 404s. Unknown URLs must return a real 404 status.
5. On-page: unique title and meta description per page, drafted from that page's content and marked for my review. One H1 per page. Descriptive alt text, alt="" on decorative images. Visible breadcrumbs with BreadcrumbList JSON-LD. List sitemap URLs with no internal links pointing to them and suggest where to link from. No FAQPage schema.
6. Performance: images in WebP or AVIF with width and height set, largest above-the-fold image not lazy-loaded, no layout shifts. Targets on mobile: LCP 2.5 s or less, INP 200 ms or less, CLS 0.1 or less.
7. Never invent author bios, credentials, reviews or statistics. Leave a TODO where they're missing.

Finish with a table (check, finding, change, file paths), the curl commands I can run on the live site to confirm each fix, and the steps I have to do myself in Search Console.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the output by deploying and running the curl commands against the production URL. The dev server doesn't show you your host's headers or redirects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;p&gt;Run the commands in steps 1 and 2 against the live site today. An empty &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; grep or a &lt;code&gt;Disallow: /&lt;/code&gt; means nothing else on this list matters yet. After that, sitemap and Search Console, then work down in order.&lt;/p&gt;

&lt;p&gt;This article was written with AI assistance and checked by a person.&lt;/p&gt;

&lt;p&gt;If that's too much work, contact us and we'll make you a free website.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>ai</category>
      <category>astro</category>
    </item>
    <item>
      <title>How to build a topic cluster for a local business website (with a copy-paste AI prompt)</title>
      <dc:creator>Marc Mulvaney</dc:creator>
      <pubDate>Sat, 31 Oct 2026 13:15:12 +0000</pubDate>
      <link>https://dev.to/freewebsite247/how-to-build-a-topic-cluster-for-a-local-business-website-with-a-copy-paste-ai-prompt-3fmi</link>
      <guid>https://dev.to/freewebsite247/how-to-build-a-topic-cluster-for-a-local-business-website-with-a-copy-paste-ai-prompt-3fmi</guid>
      <description>&lt;p&gt;Most local business sites have one page called "Services". It lists ten jobs with one sentence each. That page can't answer "how much does an EV charger install cost in Tucson, and do I need a panel upgrade?", so nothing on the site gets quoted when someone asks that question.&lt;/p&gt;

&lt;p&gt;People now ask those questions in more places than Google. BrightLocal's &lt;a href="https://www.brightlocal.com/research/local-consumer-review-survey/" rel="noopener noreferrer"&gt;2026 Local Consumer Review Survey&lt;/a&gt; (1,002 US adults, published 11 February 2026) found that use of AI tools for local business recommendations rose from 6% to 45% in one year, and 97% of consumers still read reviews. Google's &lt;a href="https://developers.google.com/search/docs/appearance/ai-features" rel="noopener noreferrer"&gt;AI features documentation&lt;/a&gt; says a page only needs to be indexed and eligible for a snippet to be a supporting link in AI Overviews or AI Mode, and that both features may run a "query fan-out", several related searches behind one question. A topic cluster gives each of those fan-out searches a page to land on.&lt;/p&gt;

&lt;p&gt;This guide covers the whole build: question collection, grouping into hubs, spokes and town pages, the Astro content collection, Service and BreadcrumbList schema, a doorway-page check, a planning prompt, and verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a topic cluster is on a local site
&lt;/h2&gt;

&lt;p&gt;A hub page covers one core service. Spoke pages cover one sub-service each. Town pages cover one place the business really serves. Hub links to every spoke; each spoke links back to the hub and to one or two siblings; town pages link to the services offered there.&lt;/p&gt;

&lt;p&gt;Three rules keep it honest:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One question group = one page. Two pages answering the same question compete with each other.&lt;/li&gt;
&lt;li&gt;Every page needs something only that page can say. Google's &lt;a href="https://developers.google.com/search/docs/essentials/spam-policies" rel="noopener noreferrer"&gt;spam policies&lt;/a&gt; list "multiple domain names or pages targeted at specific regions or cities that funnel users to one page" as doorway abuse.&lt;/li&gt;
&lt;li&gt;Every claim in the markup has to be on the page. Google's &lt;a href="https://developers.google.com/search/docs/appearance/structured-data/sd-policies" rel="noopener noreferrer"&gt;structured data policies&lt;/a&gt;: "Your structured data must be a true representation of the page content."&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Collect questions, not keywords
&lt;/h2&gt;

&lt;p&gt;Keyword tools return "electrician tucson". Customers ask "can you add a 240V outlet in my garage this week?" Pull real questions from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Call notes, texts and emails from the last 90 days&lt;/li&gt;
&lt;li&gt;Google reviews (people describe the job they hired you for)&lt;/li&gt;
&lt;li&gt;Google autocomplete and People Also Ask for each service&lt;/li&gt;
&lt;li&gt;The Business Profile performance report (business.google.com &amp;gt; Performance, pick a date range, Apply). Google's &lt;a href="https://support.google.com/business/answer/9918094?hl=en" rel="noopener noreferrer"&gt;performance report help page&lt;/a&gt; says it shows "The search terms people used to find your business", and that "The searches metric is updated at the start of each month. It might take up to 5 days to show up."&lt;/li&gt;
&lt;li&gt;Search Console &amp;gt; Performance &amp;gt; Queries, if the site already ranks for anything&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Aim for 20 to 40 questions. Write them down exactly as asked, with the price, place and urgency words left in.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Group by meaning
&lt;/h2&gt;

&lt;p&gt;"Who installs Tesla wall chargers?" and "Level 2 charger installation near me" are the same job. They go on one page. "Do I need a panel upgrade for an EV charger?" is a different decision with a different answer, so it gets its own spoke.&lt;/p&gt;

&lt;p&gt;When two groups need the same answer, merge them. When one group needs two different answers (a homeowner question and a landlord question), split it.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Map hubs, spokes and towns
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Illustrative example.&lt;/strong&gt; A two-van electrician in Tucson, AZ. The questions cluster like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Page&lt;/th&gt;
&lt;th&gt;URL&lt;/th&gt;
&lt;th&gt;Main question it answers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hub&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/ev-charger-installation/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What does EV charger installation involve and cost in Tucson?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spoke&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/ev-charger-installation/panel-upgrade/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Do I need a panel upgrade, and what does it add?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spoke&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/ev-charger-installation/tesla-wall-connector/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How is a Tesla Wall Connector installed and permitted?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spoke&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/ev-charger-installation/apartments-and-hoa/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Can a charger go in a condo or HOA parking spot?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Town&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/oro-valley/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Which services are offered in Oro Valley, with what response time?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Town&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/marana/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Same for Marana&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each town page needs local evidence that can't be copied to the next town: the Pima County or town permit office the business files with, typical panel ages in that area's housing stock, drive time from the shop, and jobs done there (with the customer's permission). If the only difference between two town pages is the town name, build one service-area page instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The Astro structure
&lt;/h2&gt;

&lt;p&gt;Plain folders work for the first dozen pages. Astro's &lt;a href="https://docs.astro.build/en/basics/project-structure/" rel="noopener noreferrer"&gt;project structure docs&lt;/a&gt; put &lt;code&gt;robots.txt&lt;/code&gt; in &lt;code&gt;public/&lt;/code&gt;, whose files "will be copied into the build folder untouched", and pages in &lt;code&gt;src/pages/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/pages/
  index.astro
  ev-charger-installation/
    index.astro                 # hub
    panel-upgrade.astro         # spoke
    tesla-wall-connector.astro  # spoke
    apartments-and-hoa.astro    # spoke
  oro-valley.astro              # town
  marana.astro                  # town
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Past that, move the services into a content collection so every page shares one layout, one schema component and one link block. The Astro &lt;a href="https://docs.astro.build/en/guides/content-collections/" rel="noopener noreferrer"&gt;content collections docs&lt;/a&gt; say: "All of your build-time content collections are defined in a special &lt;code&gt;src/content.config.ts&lt;/code&gt; file." The &lt;code&gt;glob()&lt;/code&gt; loader and the &lt;code&gt;render()&lt;/code&gt; import below are the Content Layer API that arrived in &lt;a href="https://docs.astro.build/en/guides/upgrade-to/v5/" rel="noopener noreferrer"&gt;Astro 5.0&lt;/a&gt;, and they're unchanged in the current release (Astro 7.4 on 12 November 2026).&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;// src/content.config.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;defineCollection&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"astro:content"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;glob&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"astro/loaders"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;services&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;defineCollection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;loader&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;glob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"**/*.md"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"./src/data/services"&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="n"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;object&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;string&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="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;string&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="n"&gt;hub&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;string&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="nf"&gt;optional&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;// id of the parent hub; omit on hub pages&lt;/span&gt;
    &lt;span class="n"&gt;cities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;string&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="p"&gt;,&lt;/span&gt;      &lt;span class="c1"&gt;// towns this service is offered in&lt;/span&gt;
    &lt;span class="n"&gt;gbpService&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;string&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;// exact service name used on the Business Profile&lt;/span&gt;
    &lt;span class="n"&gt;updatedDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;coerce&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;date&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="p"&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="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;services&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;A file at &lt;code&gt;src/data/services/ev-charger-installation/panel-upgrade.md&lt;/code&gt; gets the id &lt;code&gt;ev-charger-installation/panel-upgrade&lt;/code&gt;, because the docs say "the &lt;code&gt;id&lt;/code&gt; includes the full nested path". One dynamic route builds every page from the collection, following the &lt;code&gt;getStaticPaths()&lt;/code&gt; pattern in the same docs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
// src/pages/[...id].astro
import { getCollection, render } from "astro:content";
import ServiceLayout from "../layouts/ServiceLayout.astro";

export async function getStaticPaths() {
  const services = await getCollection("services");
  return services.map((entry) =&amp;gt; ({
    params: { id: entry.id },
    props: { entry, all: services },
  }));
}

const { entry, all } = Astro.props;
const { Content } = await render(entry);

const hub = entry.data.hub ? all.find((s) =&amp;gt; s.id === entry.data.hub) : null;
const spokes = all.filter((s) =&amp;gt; s.data.hub === entry.id);
const siblings = all.filter((s) =&amp;gt; s.data.hub &amp;amp;&amp;amp; s.data.hub === entry.data.hub &amp;amp;&amp;amp; s.id !== entry.id);
---
&amp;lt;ServiceLayout entry={entry} hub={hub} spokes={spokes} siblings={siblings}&amp;gt;
  &amp;lt;Content /&amp;gt;
&amp;lt;/ServiceLayout&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding a service is now one Markdown file. The layout renders the hub link, the spoke list and the sibling links from the data, so no page can be orphaned by accident. The &lt;code&gt;[...id]&lt;/code&gt; rest parameter claims every unmatched path at the root, so keep other dynamic routes (blog, towns) in their own folders or give the services route a prefix.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Turn follow-up questions into H2s
&lt;/h2&gt;

&lt;p&gt;For a service page, the fan-out questions are predictable: cost, time, permits, financing, emergency or same-day availability, what's included, what's excluded. Each one becomes an H2 phrased the way a customer says it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## How much does EV charger installation cost in Tucson?
## Do I need a panel upgrade for a Level 2 charger?
## Does Tucson require a permit for an EV charger?
## How long does the install take?
## Can you install a charger in a condo or HOA lot?
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Answer in the first 40 to 60 words
&lt;/h2&gt;

&lt;p&gt;Under each H2, the first paragraph answers the question, names the service and the place, and makes sense if quoted alone. Detail, exceptions and photos follow it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Level 2 EV charger installation in Tucson costs $[low] to $[high] for a 40 to 60 amp circuit from an existing panel with spare capacity, including the City of Tucson electrical permit. A panel upgrade, if needed, adds $[low] to $[high]. Most installs take one visit of 3 to 5 hours.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Use the business's real numbers. If the owner won't publish prices, give the range and state what moves it (panel capacity, run length, trenching).&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Link the cluster both ways
&lt;/h2&gt;

&lt;p&gt;Hub to every spoke. Every spoke back to the hub and to one or two siblings. Town pages to the services offered there, and each service page to the towns it covers. Google's &lt;a href="https://developers.google.com/search/docs/fundamentals/seo-starter-guide" rel="noopener noreferrer"&gt;SEO Starter Guide&lt;/a&gt; says link text "tells users and Google something about the page you're linking to", so write "EV charger panel upgrade in Tucson", not "learn more".&lt;/p&gt;

&lt;p&gt;For scale: the HTTP Archive &lt;a href="https://almanac.httparchive.org/en/2025/seo" rel="noopener noreferrer"&gt;Web Almanac 2025 SEO chapter&lt;/a&gt; reports a median of 43 same-site links per desktop page (39 on mobile), with 174 at the 90th percentile. A six-page cluster with 5 to 10 contextual links per page is nowhere near excessive.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Add proof on every page
&lt;/h2&gt;

&lt;p&gt;Job photos with real captions, price ranges, the license number, reviews that mention the specific service, and the permit office you file with. BrightLocal's survey found 47% of consumers won't use a business with fewer than 20 reviews, and 31% only use businesses rated 4.5 stars or higher. Proof persuades the reader and gives an AI assistant a concrete sentence to quote.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Schema: one business entity, many services
&lt;/h2&gt;

&lt;p&gt;Put &lt;code&gt;LocalBusiness&lt;/code&gt; once, sitewide, with an &lt;code&gt;@id&lt;/code&gt;. Google's &lt;a href="https://developers.google.com/search/docs/appearance/structured-data/local-business" rel="noopener noreferrer"&gt;LocalBusiness structured data docs&lt;/a&gt; say "Use the most specific &lt;code&gt;LocalBusiness&lt;/code&gt; sub-type possible", e.g. &lt;code&gt;Electrician&lt;/code&gt;, and allow an array such as &lt;code&gt;["Electrician", "Plumber"]&lt;/code&gt;. Google requires &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;address&lt;/code&gt;; &lt;code&gt;url&lt;/code&gt;, &lt;code&gt;telephone&lt;/code&gt;, &lt;code&gt;openingHoursSpecification&lt;/code&gt;, &lt;code&gt;geo&lt;/code&gt; (at least 5 decimal places) and &lt;code&gt;priceRange&lt;/code&gt; (under 100 characters) are recommended. Then put &lt;code&gt;Service&lt;/code&gt; and &lt;code&gt;BreadcrumbList&lt;/code&gt; on each service page and point &lt;code&gt;provider&lt;/code&gt; at the business &lt;code&gt;@id&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;On schema.org, &lt;a href="https://schema.org/Service" rel="noopener noreferrer"&gt;&lt;code&gt;Service.areaServed&lt;/code&gt;&lt;/a&gt; accepts AdministrativeArea, GeoShape, Place or Text, and &lt;a href="https://schema.org/City" rel="noopener noreferrer"&gt;&lt;code&gt;City&lt;/code&gt;&lt;/a&gt; is a subtype of AdministrativeArea, so an array of &lt;code&gt;City&lt;/code&gt; objects is valid. &lt;code&gt;provider&lt;/code&gt; accepts Organization or Person.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
// src/components/ServiceSchema.astro
const { name, description, url, cities, crumbs, site, businessId } = Astro.props;
// crumbs: [{ name: "EV charger installation", url: "/ev-charger-installation/" }, ...]

const service = {
  "@context": "https://schema.org",
  "@type": "Service",
  name,
  description,
  url,
  serviceType: name,
  areaServed: cities.map((city) =&amp;gt; ({ "@type": "City", name: city })),
  provider: { "@id": businessId },
};

const breadcrumbs = {
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  itemListElement: crumbs.map((c, i) =&amp;gt; ({
    "@type": "ListItem",
    position: i + 1,
    name: c.name,
    item: new URL(c.url, site).href,
  })),
};
---
&amp;lt;script type="application/ld+json" set:html={JSON.stringify(service)} /&amp;gt;
&amp;lt;script type="application/ld+json" set:html={JSON.stringify(breadcrumbs)} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;BreadcrumbList&lt;/code&gt; needs &lt;code&gt;itemListElement&lt;/code&gt; with &lt;code&gt;ListItem&lt;/code&gt; entries that each carry &lt;code&gt;position&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;item&lt;/code&gt;, per Google's &lt;a href="https://developers.google.com/search/docs/appearance/structured-data/breadcrumb" rel="noopener noreferrer"&gt;breadcrumb documentation&lt;/a&gt; (&lt;code&gt;item&lt;/code&gt; may be left off the last entry, Google then uses the page URL). The Web Almanac 2025 found structured data on 50% of home pages and &lt;code&gt;BreadcrumbList&lt;/code&gt; on 28% of desktop inner pages, so this is table stakes, not an edge.&lt;/p&gt;

&lt;p&gt;Two things not to do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don't add &lt;code&gt;FAQPage&lt;/code&gt; expecting a rich result. Google's &lt;a href="https://developers.google.com/search/blog/2023/08/howto-faq-changes" rel="noopener noreferrer"&gt;August 2023 change post&lt;/a&gt; says FAQ rich results are "only shown for well-known, authoritative government and health websites". Keep the questions and answers as visible H2s and paragraphs; those are what get quoted.&lt;/li&gt;
&lt;li&gt;Don't mark up reviews on your own business page. Google says &lt;code&gt;review&lt;/code&gt; and &lt;code&gt;aggregateRating&lt;/code&gt; are "only recommended for sites that capture reviews about other local businesses".&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  10. Match the Business Profile
&lt;/h2&gt;

&lt;p&gt;Add each spoke as a service on the Google Business Profile with the same name as the page. Google's &lt;a href="https://support.google.com/business/answer/9455399?hl=en" rel="noopener noreferrer"&gt;services help page&lt;/a&gt;: open the profile, select &lt;strong&gt;Edit services&lt;/strong&gt;, pick from the suggested options (a plumbing business gets options such as "Install faucet" or "Repair toilet") or select &lt;strong&gt;Add custom service&lt;/strong&gt;, then &lt;strong&gt;Save&lt;/strong&gt;. Custom names must not include "profanity, gibberish, personal information, prices, or phone numbers", and "Custom services that violate policy will be automatically rejected." Store that exact name in the &lt;code&gt;gbpService&lt;/code&gt; field so the site and the profile never drift.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. The doorway check before you publish a town page
&lt;/h2&gt;

&lt;p&gt;Run each town page through Google's own self-assessment questions in the &lt;a href="https://developers.google.com/search/docs/fundamentals/creating-helpful-content" rel="noopener noreferrer"&gt;helpful content guidance&lt;/a&gt;: "Does the content provide original information, reporting, research, or analysis?" and "Are you producing lots of content on many different topics in hopes that some of it might perform well in search results?"&lt;/p&gt;

&lt;p&gt;Then a mechanical test. Copy the body text of two town pages into a diff tool. If more than about half the sentences are identical apart from the town name, you have one page, not two. Merge them into a service-area page until you have real local evidence for a second one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt
&lt;/h2&gt;

&lt;p&gt;Paste this into ChatGPT, Gemini or any assistant and fill in the brackets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Act as a local SEO strategist. Plan a topic cluster for my service business.

Business: [name] | Core service: [service] | Based in: [city, state] | Towns actually served: [list] | Services offered: [5-10] | Customers: [homeowners / landlords / businesses] | Proof we can publish: [license no., years, photos, reviews, financing]

Customer questions, verbatim, from calls, emails, reviews, autocomplete, People Also Ask and the Business Profile performance report:
[paste 20-40]

Rules:
1. Group questions by meaning, not wording. One group = one page. Merge groups that need the same answer; split a group that needs two different answers.
2. Organise as hubs (one per core service), spokes (one per sub-service) and one page per town served. Do not add towns or services I didn't list.
3. For every page: title, URL slug, main question, 6-10 H2s written as customer questions (always include cost, timing, permits, financing, emergency availability, what's included).
4. Under each H2 write a 40-60 word direct answer that names the service and place and works if quoted alone. Use [brackets] where I must supply a real number.
5. For each town page, list the local evidence it needs before it may be published (permit office, housing stock, drive time, local jobs). Flag any town page that would be the same as another with the name swapped.
6. Internal links: hub to spokes, spokes to hub and two siblings, towns to services and back. Give the anchor text.
7. Schema per page: LocalBusiness subtype sitewide, Service + BreadcrumbList per service page. No FAQPage.
8. Map each spoke to a Google Business Profile service name (no prices in the name).

Output: a summary table (page | URL | main question | GBP service), then one outline per page.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the plan before building anything. Models add towns and services that don't exist. Delete anything the business can't back up.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check it worked
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Paste one finished service page into Google's &lt;a href="https://search.google.com/test/rich-results" rel="noopener noreferrer"&gt;Rich Results Test&lt;/a&gt;. &lt;code&gt;Service&lt;/code&gt; is not in Google's &lt;a href="https://developers.google.com/search/docs/appearance/structured-data/search-gallery" rel="noopener noreferrer"&gt;rich result gallery&lt;/a&gt;, so the test won't list it; look for "valid items detected" on &lt;code&gt;BreadcrumbList&lt;/code&gt; and &lt;code&gt;LocalBusiness&lt;/code&gt; with zero errors. Validate the full JSON-LD, including &lt;code&gt;Service&lt;/code&gt;, at &lt;a href="https://validator.schema.org/" rel="noopener noreferrer"&gt;validator.schema.org&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Request indexing for the hub with the &lt;a href="https://support.google.com/webmasters/answer/9012289" rel="noopener noreferrer"&gt;URL Inspection tool&lt;/a&gt; in Search Console. Google's help page notes "There is a daily limit to how many index requests you can submit." Confirm "URL is on Google" and "Indexing allowed? Yes", then check the page source for a &lt;code&gt;nosnippet&lt;/code&gt; robots directive, because Google requires snippet eligibility for AI features.&lt;/li&gt;
&lt;li&gt;Three to four weeks later, open Search Console &amp;gt; Performance, filter by page, and read the queries. AI Overviews and AI Mode traffic still counts under the "Web" search type there, and since 3 June 2026 Search Console also has a dedicated &lt;a href="https://support.google.com/webmasters/answer/16984139" rel="noopener noreferrer"&gt;Generative AI performance report&lt;/a&gt;, rolled out to all websites on 31 August 2026 per Google's &lt;a href="https://developers.google.com/search/blog/2026/06/gen-ai-performance-reports" rel="noopener noreferrer"&gt;announcement&lt;/a&gt;. Find it under Performance in the Search Console sidebar, or open it directly at &lt;a href="https://search.google.com/search-console/performance/search-analytics/ai" rel="noopener noreferrer"&gt;search.google.com/search-console/performance/search-analytics/ai&lt;/a&gt;. It shows impressions only (no clicks) for AI Overviews and AI Mode, by page, country, device and date, with a search type filter for "Web: text-based" and "Web: multimodal". If the report is missing, Google says the site usually "hasn't received enough impressions in generative AI features" yet.&lt;/li&gt;
&lt;li&gt;Ask the question from one of your H2s in ChatGPT, Perplexity and Google AI Mode and see which page, if any, gets cited. Note the result; repeat monthly.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;p&gt;Build the hub for the service that makes the most money, plus two spokes, and add the matching Business Profile services the same day. Add town pages one at a time, each only when you have something true to say about that town.&lt;/p&gt;

&lt;p&gt;This article was written with AI assistance and checked by a person.&lt;/p&gt;

&lt;p&gt;If that's too much work, contact us and we'll make you a free website.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>astro</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
