Codex (OpenAI) · Medium

Codex SEO: llms.txt, Schema and robots.txt with OpenAI Codex

OpenAI Codex is an AI agent for the terminal: it reads your project and makes targeted edits. Run it with the prompt below and it adds the files and markup. You review every change yourself.

Requires: OpenAI Codex CLI

Install: npm install -g @openai/codex. You need an OpenAI account to sign in; see the Codex documentation for sign-in options.

What we'll add:
  • Organization Schema — AI can read what your business does
  • FAQ Schema — the questions and answers on your page, in a form AI can read
  • robots.txt — allow GPTBot, ClaudeBot, PerplexityBot
  • Specifics and freshness — prices, facts and update dates on the page itself; markup does not replace them
  • llms.txt — a short summary of the site for AI agents; no proven effect on AI answers
0

Generate your fix files first

  1. Go to causabi.com
  2. Enter your site URL and run the check
  3. After you get the files pack, download the ZIP: it contains Schema.org, FAQ Schema, llms.txt and robots.txt
  4. Save them to your project root as reference files (e.g., geo-assets/)
1

Run Codex with a GEO optimization prompt

Open your terminal in the project root and run:

Terminal
codex

Then paste this task description:

Codex Task Prompt
I need to add GEO optimization (structured data for AI search) to this project. Please do the following: 1. Add JSON-LD Organization Schema to the <head> of every page. The schema JSON is in geo-assets/schema.jsonld. 2. Add the FAQ Schema to the homepage <head> only. It is an HTML block containing JSON-LD, stored in geo-assets/faq-block.html: paste its contents as is. 3. Create or update public/robots.txt with the content from geo-assets/robots.txt. 4. Create public/llms.txt with the content from geo-assets/llms.txt. For Next.js App Router: add scripts to app/layout.tsx using next/script or direct script tags in metadata. For Vite/React: add to index.html <head>. For static HTML: add directly to each HTML file's <head>. Make sure all files are in the right location for the framework this project uses.
What Codex does

Codex will read your project structure, identify the framework, and make the exact file edits needed. By default it asks for your approval before making changes.

2

Review and apply changes

  1. Codex will show a diff of all proposed changes
  2. Verify that Schema scripts appear in the right layout file
  3. Check that public/robots.txt and public/llms.txt were created
  4. Accept the changes
3

Deploy and verify

  1. Deploy your changes
  2. Check your-site.com/robots.txt and your-site.com/llms.txt
  3. Go to causabi.com → run a new check. An AI score of 70 or more is Good
  4. Validate Schema: validator.schema.org

Check your own site right here

Enter your domain — we’ll show your AI score and the biggest thing keeping ChatGPT and other AI engines from reading your site.

Updated:

Check your site and preview the files for free

The check and a preview of the files are free. The files pack is $19 once per site (included in paid plans): Schema.org, FAQ Schema, llms.txt, and robots.txt tailored to your specific site, ready for Codex to apply.

Check my site
Codex SEO — llms.txt, Schema and robots.txt with OpenAI Codex