---
title: "Website playbook · Agent Wranglers"
url: https://agentwranglers.se/playbook/website
updated: 2026-10-20
licence: "All rights reserved"
---

# Website optimization playbook

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

A website playbook for any stack. It lists every rule a good website should follow, how to build it, and how to prove it works.

We tested the rules on a reference site. We measured each feature with and without it, in Lighthouse and in browsers. Where a rule has a measured effect, its page says how large it was. Where a feature did nothing measurable, it says that too.

Each rule has its own page, written for people and for AI agents. Every page also comes as Markdown if you add `.md` to the address. The [checklist](https://agentwranglers.se/playbook/website/checklist) lists every rule on one page.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website`.

## Chapters

1. [HTML basics](https://agentwranglers.se/playbook/website/html-basics): Everything in the head of a page, such as doctype, language, title, description, canonical address, icons, colours, social cards and feeds. (5 required, 7 recommended, 3 optional)
2. [Site architecture](https://agentwranglers.se/playbook/website/site-architecture): A structure that makes the other rules easy. Pages are data, built once to static HTML and served from memory, with every machine file from one source. (3 required, 6 recommended)
3. [Interface](https://agentwranglers.se/playbook/website/interface): Native HTML and CSS for menus, layout, text, colour and motion. Use what the browser already does instead of JavaScript widgets and fixed layouts. (7 recommended, 4 optional)
4. [Performance](https://agentwranglers.se/playbook/website/performance): How to make a page load about as fast as the network allows. The speed rules for any site, what moved the numbers in practice, and what to skip. (5 required, 12 recommended, 5 optional, 1 avoid)
5. [SEO](https://agentwranglers.se/playbook/website/seo): Make every page easy to find and understand with robots.txt, sitemaps, clean addresses, redirects, rendering on the server, structured data and breadcrumbs. (3 required, 11 recommended, 3 optional)
6. [Redirects and canonicals](https://agentwranglers.se/playbook/website/redirects-and-canonicals): Keep every old link working. Send each old address to the right new page in one hop, and make every signal point at the one true address of each page. (5 required, 3 recommended, 1 optional, 1 avoid)
7. [Accessibility](https://agentwranglers.se/playbook/website/accessibility): Make the site work for everyone with readable contrast, full keyboard use, visible focus, clear structure, calm motion, big touch targets and plain HTML first. (35 required, 8 recommended, 1 optional, 1 avoid)
8. [Security](https://agentwranglers.se/playbook/website/security): HTTPS, a strict Content Security Policy, isolation headers, integrity checks and the other headers, policies and DNS records that keep visitors safe. (6 required, 9 recommended, 2 optional, 1 avoid)
9. [Hosting and network](https://agentwranglers.se/playbook/website/hosting-and-network): Server and DNS work under every site. It covers HTTPS, TLS, HTTP/2 and HTTP/3, a fast first send, DNS records, IPv6 and certificate renewal. (3 required, 5 recommended, 3 optional)
10. [Standard addresses](https://agentwranglers.se/playbook/website/standard-addresses): Fixed addresses under /.well-known/ that browsers, password managers, privacy tools and agents look for, and which ones a small site needs. (3 recommended, 12 optional)
11. [Ready for AI agents](https://agentwranglers.se/playbook/website/ready-for-ai-agents): Markdown copies, llms.txt, AI crawler rules, structured data, link headers, MCP, A2A, skills and WebMCP make a site easy for AI agents to use. (7 recommended, 15 optional, 1 avoid)
12. [Privacy](https://agentwranglers.se/playbook/website/privacy): Collect nothing you do not need. Write a full privacy policy, skip needless cookies and third parties, honour Global Privacy Control and delete data on time. (8 required, 5 recommended, 1 optional)
13. [When things break](https://agentwranglers.se/playbook/website/when-things-break): Plan for things going wrong with error pages, maintenance mode, pages that survive failed scripts, offline support and retired addresses. (1 required, 6 recommended, 2 optional)
14. [Languages and regions](https://agentwranglers.se/playbook/website/languages-and-regions): Serve each language and script with translated metadata, hreflang, translate hints, right-to-left text, local dates and numbers, and no forced geo redirects. (1 required, 11 recommended, 4 optional, 1 avoid)

## Evidence

- [Measured results](https://agentwranglers.se/playbook/website/measured-results): What each feature is worth, measured on a reference site with Lighthouse and browsers. We took features away one by one and noted what made no difference.
- [Measuring it yourself](https://agentwranglers.se/playbook/website/measuring-it-yourself): A repeatable lab for website features. It runs Lighthouse with and without each one, a Playwright click test with added latency, and live checks from outside.

See all 237 rules on one page in the [checklist](https://agentwranglers.se/playbook/website/checklist).
