為小型企業網站加入 llms.txt:我們在 2026 年部署時的心得
Adding llms.txt to a Small Business Website: What We Learned Shipping It in 2026
文章分享為服務型企業網站加入 llms.txt 的做法,並整理檔案結構與部署注意事項。檔案列出公司資料、服務、地點及資源連結,並透過 CI 驗證連結、部署後通知 IndexNow。直接成效仍太早衡量,但整理過程有助修正網站及商業目錄中不一致的公司資料。
AI assistants increasingly answer "which company should I hire for X in my city?" before a person ever opens a search result. For a services business, that means the website needs to be easy for a language model to read, not just for a crawler to index. One lightweight step is publishing an llms.txt file at the site root.
What llms.txt actually is
The llmstxt.org proposal is simple: a Markdown file at /llms.txt with an H1 (the site or company name), a short blockquote summary, and sections of links with one-line descriptions. Some sites also publish /llms-full.txt, a longer clean-Markdown version of the key facts. It is not a ranking switch and no assistant is obliged to read it. Think of it as a tidy, machine-friendly index of the pages you most want understood.
How we structured ours
For our own company site we kept it boring on purpose:
- Entity facts first - legal name, city, founding year, what we do. These must match the footer, Google Business Profile and directory listings exactly. Inconsistent names or addresses confuse humans and models alike.
- Services section - one link per core service page with a single sentence on who it is for.
- Locations section - only city pages that have genuinely local content.
- Resources - the cost guides and tools people actually ask about.
- No prices, no claims we can't back up - if a fact isn't visible on the live site, it doesn't go in the file.
Implementation notes
- Serve both files as text/plain; charset=utf-8. Some hosts default .txt to the wrong encoding, which mangles non-ASCII names.
- Keep it in version control and regenerate it on deploy, otherwise it drifts out of date within weeks.
- Validate links in CI with a tiny script: fetch each URL, fail the build on anything that isn't 200.
- Ping IndexNow after deploys so Bing (which powers several assistants) picks up changes quickly.
curl -s https://example.com/llms.txt | grep -oE 'https?://[^) ]+' | while read u; do
code=$(curl -s -o /dev/null -w '%{http_code}' "$u"); [ "$code" = "200" ] || echo "BROKEN $code $u"
done
Does it help?
Honestly, it's too early to measure directly. What we can say is that the exercise forced us to fix inconsistent entity facts across the site and listings, which helps classic local SEO regardless. If you want to see a real example, ours lives at https://nexprosolution.com/llms.txt (I work at Nexpro Softwares, a software and web development company in Bhubaneswar, Odisha).
Low effort, no downside, and a good excuse to clean up your site's facts.
來源:DEV Community · dev.to