Optimizing My Site for ChatGPT, Claude, and Perplexity in One Claude Code Session
intermediate

Optimizing My Site for ChatGPT, Claude, and Perplexity in One Claude Code Session

Outcome: Full GEO stack shipped in one session: auto-updating llms.txt and llms-full.txt endpoints, 15 AI crawlers explicitly allowed in robots.txt, Person/FAQPage/ProfessionalService schema on key pages, RSS feed with autodiscovery. Zero recurring maintenance, since the feeds rebuild themselves.

Claude CodeAstroCloudflare WorkersJSON-LD

People increasingly ask ChatGPT and Perplexity for recommendations instead of Googling. If an LLM can’t read your site, you don’t exist in those answers. I gave Claude Code one goal: make this site legible to every major AI platform.

What “legible to LLMs” actually means

Three layers, in order of impact:

  1. Crawl access. AI crawlers respect robots.txt. If GPTBot, ClaudeBot, or PerplexityBot isn’t allowed, nothing else matters.
  2. Machine-readable indexes. llms.txt is the emerging convention: a markdown map of your site written for models, not browsers.
  3. Entity clarity. JSON-LD schema that states who you are, where you are, and what you do, in vocabulary machines parse without guessing.

The build

Claude Code audited the existing site first and found the gaps: no AI crawlers named in robots.txt, a static llms.txt going stale with every new post, no RSS, and zero geographic signals for the market I serve.

The interesting decision: llms.txt became an Astro endpoint instead of a file.

// src/pages/llms.txt.ts
export const GET: APIRoute = async () => {
  const posts = await getCollection("blog", ({ data }) => !data.draft);
  // ...renders every published post as a markdown link list
};

A static llms.txt is a list you forget to update. An endpoint queries the content collections at build time, so every deploy ships a current index for free. Same pattern for llms-full.txt, which serves the complete text of every post so a model can ingest the whole site in one fetch.

The details that get skipped

  • robots.txt names each crawler explicitly: GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot, Google-Extended, CCBot and ten others. A wildcard allow works, but explicit groups survive the day you add a disallow rule for scrapers.
  • FAQ answers on the hire page are written self-contained, because LLMs quote them verbatim, and a pronoun pointing at a previous paragraph dies in extraction.
  • Claude flagged its own trap: the site’s five template lorem-ipsum posts were about to ship inside llms-full.txt. An “expert” site feeding “Lorem ipsum dolor sit amet” to every AI crawler. Draft-flagged before deploy.

Result

One session. The site now has a permanent, self-maintaining GEO layer, and the only recurring cost is writing actual content, which was always the job anyway.

Mark Lester Mahilum

Mark Lester Mahilum

Claude Code expert based in the Philippines. Building AI-native workflows for businesses and documenting what actually works.