How to make your landing page readable for AI agents

building-in-publicpermamusicsoundscrub

I ran the landing page of PermaMusic (permamusic.app) through an online agent-readiness scanner. It scored Level 1, “Basic Web Presence”. After a few small changes it scores Level 3, “Agent-Readable”. The same setup now runs on SoundScrub (soundscrub.video) too.

Here are the steps, in the order I did them. Most steps have a command to check them.

1. Scan your site and pick the cheap checks

Find a scanner that lists its checks, run your homepage through it and read the list. Mine ran 21 checks. Most were about APIs and OAuth, which a landing page has no use for. Only three were worth my time: content signals, Markdown and a Link header.

The levels I saw were 1 “Basic Web Presence”, 2 “Bot-Aware”, 3 “Agent-Readable” and 4 “Agent-Integrated”.

2. Say what AI may do with your pages

One check kept the site from Level 2: content signals. It’s a line in robots.txt, inside the User-agent: * group:

User-agent: *
Content-Signal: ai-train=no, search=yes, ai-input=yes
Disallow: /app/

Sitemap: https://example.com/sitemap.xml

There are three values:

  • ai-train: may your pages be used to train models
  • search: may they go into a search index
  • ai-input: may an AI answer quote them

I went with no training, search allowed and quoting allowed, because a landing page benefits from being quoted. If you don’t want that, set ai-input=no.

Check it: curl https://example.com/robots.txt shows the line.

3. Return Markdown when a client asks for it

A client that wants Markdown sends Accept: text/markdown. Browsers send text/html in that header and keep getting your normal page. So the same URL has two versions.

Check it:

curl -H 'Accept: text/markdown' https://example.com/

You should see Markdown. curl -I -H 'Accept: text/markdown' https://example.com/ should show Content-Type: text/markdown.

How you serve it depends on your site.

An app with a backend

I wrote a middleware for the landing page and the blog. The one rule that matters: only an explicit preference for Markdown counts, because a browser’s Accept header can also contain */*. In Laravel that is one line:

$request->prefers(['text/html', 'text/markdown']) === 'text/markdown'

Then add Vary: Accept to the response. It tells caches that the two versions differ.

Two details bit me:

  • The landing page Markdown is written by hand and mirrors the page copy, so if I change the copy I change both. The blog Markdown is read from each post’s own file, so that part stays in sync.
  • Inertia overwrote my Vary header, so the middleware has to run before it. If your framework does the same, run it earlier.

A static site behind nginx

SoundScrub’s site is static, so there is no app code to answer with Markdown. At build time I generate a .md file for the home page and for the blog, and nginx sends that file when the Accept header asks for it.

Put the two map blocks in http {} and the rest in server {}:

map $http_accept $wants_md {
    default 0;
    "~*^text/markdown" 1;
    "~*^(?!.*text/html).*text/markdown" 1;
}

map "$wants_md$uri" $md_uri {
    default "";
    "1/" /index.md;
    "~^1/blog/?$" /blog/index.md;
    "~^1/blog/(?<slug>[^/.]+)/?$" /blog/$slug.md;
}

add_header Vary "Accept" always;

location / {
    if ($md_uri) { rewrite ^ $md_uri last; }
    try_files $uri $uri/ $uri.html /index.html;
}

location ~ \.md$ {
    default_type text/markdown;
    charset utf-8;
    charset_types text/markdown;
    add_header Vary "Accept" always;
    try_files $uri =404;
}

The .md location repeats Vary because an add_header inside a location replaces the ones from the server level.

nginx can’t compare q-values, so Markdown only wins when it is listed first or when text/html isn’t in the header at all.

Don’t cache both versions as one

Cloudflare ignores Vary: Accept. On SoundScrub I added a note to the deploy docs: no “Cache Everything” rule on the home page or the blog.

The third check wanted a Link header on the homepage:

Link: </sitemap.xml>; rel="describedby"; type="application/xml"

I planned to use rel="sitemap", but the scanner doesn’t accept it. It takes api-catalog, service-desc, service-doc and describedby. On PermaMusic the header sits next to the preload Link headers the page already sent, so I appended it instead of replacing them. On SoundScrub it points describedby at llms.txt.

Check it: curl -I https://example.com/ shows a Link line with rel="describedby".

5. Check the live site before you scan again

After I deployed, the scan still said Level 1. The new robots.txt was on my server, but Cloudflare kept serving the old copy from its cache (max-age=14400, so up to 4 hours). curl -I on the live robots.txt showed cf-cache-status: HIT.

Look at what the live site returns first. If it’s the old file, purge that one URL in Cloudflare or wait. Then scan again. When I did, it said Level 3.

What I skipped

I skipped the checks for an API catalog and an MCP server card. PermaMusic has no public API and nothing built for agents to call, so there is nothing to put in them. Level 4 asks for things like that.

I also don’t know yet if any agent asks for Markdown. The scanner checks for it.