Claude Code logo
How-To Guide

How do I get my Claude Code site cited by AI tools?

To get my Claude Code site cited by AI tools, write the rules once in CLAUDE.md, so every Claude Code session builds pages the same way. The rules cover public access, one visible answer per page and unique metadata. Claude Code writes the files and runs the checks, but AI tools decide what they quote.

Updated November 22, 2026

TL;DR

Write rules in CLAUDE.md

Keep the access, answer and metadata rules in one project file that Claude Code reads each session.

Check robots.txt each build

Ask Claude Code to confirm robots.txt does not block any public page.

GrandRanker writes the pages

GrandRanker publishes search-led articles to your site, so new answer pages keep arriving.

5 steps

Step-by-Step

  1. 1

    Create the starting file

    In the project folder, run /init in Claude Code. It creates a starting CLAUDE.md from your codebase, and if a file already exists it suggests improvements rather than overwriting it.

  2. 2

    Add the public page rules

    Open CLAUDE.md and add a rule that robots.txt must not block public pages. Add a second rule that every page needs its own title and meta description. Claude loads the file every session, so keep the rules short.

  3. 3

    Add the answer rule

    Add a rule that each page states its answer in the first paragraph, in plain text and not only inside an image. This is a writing rule for your own pages, so keep it to pages you publish.

  4. 4

    Ask Claude Code to check robots.txt

    Ask Claude Code to read the robots.txt at the site root and list any rule that blocks a public page. Google's robots guide says: "A robots.txt file is a text file containing rules about which crawlers may access which parts of a site."

  5. 5

    Check the crawled HTML after deploy

    After you deploy, open URL Inspection in Search Console for one key page and click View crawled page. Confirm the title and the first answer appear in the HTML shown there.

Where do the AI rules live?

Keep them in CLAUDE.md, so the rules apply every time Claude Code starts work on the site. CLAUDE.md files are markdown files that give Claude persistent instructions for a project, your personal workflow, or your entire organization. A project CLAUDE.md can be stored in either `./CLAUDE.md` or `./.claude/CLAUDE.md`.

Commit the file, because the memory docs say project instructions are shared with your team through version control. Then the rules travel with the repository and reach every session, not only yours.

Which rules should go in CLAUDE.md?

Only rules that change the output. Write the robots.txt rule, the answer rule and the metadata rule, and leave out style preferences the site does not need. Each rule should name a file, a field or a page, so Claude Code can check it.

Keep the robots.txt rule strict. Google's robots guide says: "Google can't index the content of pages which are disallowed for crawling," so a block on a public page also keeps its content out of the index.

How do I check the result?

Check the live page in Search Console, not in the editor. Run URL Inspection on one key page, then click View crawled page to read the HTML that Google received.

Repeat the check after each build. Keep a short log of the rule changes, so the before and after results stay easy to compare in the next report.

Common mistakes

Writing rules Claude Code cannot check, such as make it rank. Rules should point at a file, a field or a page. Another mistake is a robots.txt block left over from a test build, which hides the site until someone reads the file line by line. A long CLAUDE.md that nobody reads is a third, so keep the AI rules in one short section.

Sources

Frequently Asked Questions

Let GrandRanker Do This for You

Grandranker does this for you. GrandRanker publishes search-led articles to your site, so new answer pages keep arriving without changing your CLAUDE.md rules.