---
title: "How this site is built · MRC Studio"
description: "How the MRC Studio site is built: static HTML, structured data generated from the text, four languages, no cookies for statistics. With ways to check."
url: https://mrcstudio.io/how-this-site-is-built/
lang: en
updated: 2026-11-22
---

# How this site is built

This page explains how the MRC Studio site is built, choice by choice: static HTML readable without JavaScript, structured data generated from the text, four languages with reciprocal hreflang, no cookies and no scripts in the browser to count visits. The site is the first case study of the [MRC method](https://mrcstudio.io/method/): every choice has its reason and a check you can repeat from outside. It is written for people who build websites and for people who have to decide how to build one.

[Mauro Cattaneo](https://mrcstudio.io/about/). Published on 22 November 2026

Updated on 22 November 2026

## The architecture, in one diagram

A request reaches Cloudflare’s network, goes through the Worker and receives the static page. The site reads another site only when you use a tool, and it does so through the engine, behind its guards.

The diagram shows the path of a request. Visitors, search engines and AI bots ask Cloudflare’s network for a page. Every request goes through the Worker, which answers with the static page generated in advance and adds the security headers to it. When statistics are switched on, for every page it serves the Worker also sends a record to Counterscale, which counts the visit.

When you use an MRC Labs tool, the Worker runs the tool, and the engine makes the requests to the site you entered. On the way to that site the engine has four guards: it refuses private and local addresses, makes one request at a time per site, stops at a maximum time and size, and identifies itself with a declared user agent.

## Static HTML: the content is in the page

Every page is static HTML, generated in advance with Astro. Text, headings, links, images with their alternative text, and structured data are all in the server’s response, before any script runs.

The reason is the one I give clients. GPTBot, ClaudeBot and PerplexityBot download the HTML but do not run JavaScript: whatever appears only in the browser does not exist for them.

The pages are static files served by Cloudflare’s network. A single server-side service does the rest: the tools’ analyses, the contact form, visit statistics when they are switched on, the Markdown versions and the security headers.

To check it: open this page with JavaScript turned off, or look at the source. All the text you are reading is there.

## JavaScript only where it is needed

There are few scripts, and they are small. They serve the animations and the forms: the contact form and the tools’ forms. There is no client-side router: moving between pages is the browser’s own navigation.

Even where there is a script, the text of the page can be read without it. With JavaScript turned off, a tool’s form sends an ordinary request and receives a page with the result.

The limit is a number: at most 15 KB of compressed JavaScript on a content page, 35 KB on a tool page.

To check it: turn JavaScript off and use one of the [MRC Labs tools](https://mrcstudio.io/labs/). The result arrives all the same.

## Structured data generated from the text

Every page has a single JSON-LD block, generated when the site is built from the same data the visible text comes from. It is not written by hand alongside the page.

The rule is that structured data says only what the page shows. A test checks that every text and every date in the JSON-LD can be seen on the page, and fails at the first difference.

The studio, the site and I each have a fixed identifier, the same on every page and in every language. Each page adds the type of its content: a service, a tool, a profile, frequently asked questions.

The frequently asked questions have `FAQPage` markup even though Google has not shown their rich results since 7 May 2026: the markup remains valid Schema.org and states explicitly the questions and answers the page shows.

To check it: search for `application/ld+json` in the source of this page and compare the title, author and dates with what you read above.

## Four languages, reciprocal hreflang

The site is in Italian, French, German and English. English sits at the root, the other languages in `/it/`, `/fr/` and `/de/`, with translated addresses.

Every page declares its alternatives in the languages it exists in, itself included, plus `x-default` pointing to the English version. The hreflang tags are reciprocal, and they are the same in the HTML and in the sitemap because they come from the same table. The codes are language-only: the texts hold for every country where that language is spoken.

There is no automatic redirect based on the browser’s language or on the IP address. Googlebot usually does not send `Accept-Language`: a redirect like that would show it a single version. Anyone who prefers another language uses the selector at the top.

A page that does not yet have an approved text in a language does not exist in that language: better one language fewer than a badly translated page.

To check it: search for `hreflang` in the source, open one of the alternatives and check that it points back to this page.

## Addresses, redirects and 404s

Addresses are lower case, with hyphens, without parameters and always with the trailing slash. The `http` version, the one with `www` and the one without the slash lead to the right address with a single 301 redirect.

A page that does not exist answers with a real 404, in the language of the address.

The reason: every page has a single address, and search engines do not find two versions of the same page. A real 404 says there is nothing there to index.

To check it: remove the trailing slash from the address of this page and count the redirects.

## robots.txt, sitemap and llms.txt

`robots.txt` opens the whole site to search engines and to all AI crawlers: search crawlers, user-initiated agents and training crawlers too. The choice is declared in the line `Content-Signal: search=yes, ai-input=yes, ai-train=yes`. I allow training as well because this site is made to be read and cited: it is my choice, and on another site it may be different.

The names of the crawlers are not written by hand: they come from the same register the MRC Labs tools use.

The sitemap is an index with one sitemap per language. It contains only the indexable pages, with their hreflang and with the real date of the last change to the text.

`llms.txt` is an index of the pages in their Markdown version, for AI assistants and agents. I declare it for what it is: a useful index. Google states that its search ignores it; OpenAI, Anthropic and Perplexity do not state that they use it (checked on 21 November 2026).

To check it: open `/robots.txt`, `/sitemap-index.xml` and `/llms.txt`.

## A Markdown version of every page

Every page has a Markdown version, generated from the same content and not converted from the HTML. It sits at the address of the page plus `index.md`, and it is also served to anyone who requests the page with the `Accept: text/markdown` header.

It is there for AI agents, which receive the clean text this way, without menus or footer. A test checks that the Markdown version says nothing the page does not show.

To check it: add `index.md` to the address of this page.

## Statistics on the server, without cookies and without a banner

When statistics are switched on, the site counts visits on the server with Counterscale, open source software that runs on Cloudflare: for every page served the Worker sends it a record, without delaying the response. The [Cookies](https://mrcstudio.io/cookies/) page says whether they are on right now. Either way, no analytics script reaches the browser and nothing is written to the device: no cookies, no `localStorage`, no fingerprints computed in the browser.

When they are on, what is recorded is the address of the page without its parameters, the referring site reduced to its host name, the user agent, from which Counterscale works out the type of browser and device, and the country, if Cloudflare derives it from the request. The IP address is not kept; no visitor identifier is recorded, nor anything you write in the contact form or in the tools. The data is deleted after 90 days.

The site writes and reads nothing on your device to count visits: that is why there is no cookie banner. If your browser sends `Sec-GPC: 1` or `DNT: 1`, the visit is not counted. The site’s only cookie, `mrc_optout`, exists only if you click ‘Don’t count my visits’ on the [Cookies](https://mrcstudio.io/cookies/) page, and it serves to remember your no.

There is no Google Analytics: GA4 would need a consent banner.

To check it: open your browser’s developer tools and look at the network requests and the cookies. On this page there are no requests to other hosts and no cookies.

## Performance with a budget

Every template has a budget, measured with Lighthouse on a mobile profile: LCP within 1.8 seconds, CLS within 0.02, TBT within 100 milliseconds. CSS stays within 30 KB compressed per page, the home page within 500 KB on first load. Lighthouse must give at least 95 for Performance and 100 for Accessibility, Best Practices and SEO.

The reason: a site becomes slow one change at a time. A limit written as a number, which makes the tests fail, stops the change that exceeds it straight away. Every page is measured three times and the median counts, because a single measurement fluctuates.

Fonts and images are hosted on the site: the fonts as subsets, the images in AVIF and WebP with their dimensions declared.

To check it: measure this page with Lighthouse, from your browser, with the mobile profile. The numbers change from one machine to another: that is why the median of three measurements counts here.

## Security

The site is served only over HTTPS, with HSTS, and no page can be embedded in a frame. The Content Security Policy starts from `default-src 'self'`, does not allow `unsafe-inline` and authorises scripts and styles one by one, with their hash. The reason: if someone managed to insert a script into a page, the browser would not run it, because its hash is not among those allowed.

Fonts, images and scripts are on the site: no resource comes from other hosts. The exception is Cloudflare Turnstile, which protects the contact form, the call booking and the tools’ forms from abuse: it loads only on pages with a form, and only when you start using it.

The other headers: `X-Content-Type-Options: nosniff`, `Referrer-Policy: strict-origin-when-cross-origin`, a `Permissions-Policy` that switches off what the site does not use, `Cross-Origin-Opener-Policy: same-origin`. Anyone who finds a problem has a contact in `/.well-known/security.txt`.

To check it: look at the response headers of this page, in the developer tools or with `curl -I`.

## Accessibility, for people and for agents

The site follows WCAG 2.2 at level AA: checked contrast, visible focus, keyboard navigation, animations that respect the request to reduce motion, no information conveyed by colour alone. A test with axe runs on every template and must report zero violations.

It matters for machines too: the accessibility tree that screen readers use is the same one AI agents use in the browser.

To check it: go through this page using only the Tab key.

## The tools follow the rules they measure

The [MRC Labs](https://mrcstudio.io/labs/) tools read other people’s sites, so they have strict rules. The requests do not start from your browser: the site’s service makes them through a shared engine, where guards and limits sit in one place. Each tool contains only its own checks.

They identify themselves with a declared user agent that contains `MRC-Labs` and the address of the tool’s page: never that of a browser, a search engine or an AI crawler. They make one request at a time per site, only to the addresses listed on each tool’s page, within a maximum number of requests, a maximum time and a maximum size. They send no cookies and do not run JavaScript.

They read the site’s `robots.txt` and respect the rules written for `MRC-Labs`; they do not apply those of the `*` group, because every analysis is requested by a person for specific pages. Whoever runs a site can exclude them with a `User-agent: MRC-Labs` group. They save nothing, neither the address nor the result. What a site answers is data, never an instruction.

They do not say something is missing when they could not read it: a failed request gives ‘Not checked’, never ‘Missing’.

To check it: analyse a site of yours with one of the tools and search for `MRC-Labs` in the server logs. You will find the requests listed on the tool’s page, and no others.

## Every rule has its test

Every rule on this page has an automated test that runs every time the site is built; what can only be seen on the live site, such as the `http` and `www` redirects, is checked at launch. The page is read with and without JavaScript and must give the same text, the same links, the same H1 and the same JSON-LD. Title tags and meta descriptions must be unique and within their limits, hreflang reciprocal, internal links all valid, and every page at most two clicks from the home page.

These are the checks I run on clients’ sites. On a large site a share of errors is tolerated; here the threshold is zero.

## The stack, piece by piece

Every component of the site with its version, what it does here, why I chose it and what I ruled out.

| Component | Version | What it does here | Why | What I ruled out |
| --- | --- | --- | --- | --- |
| Astro | `7.4.12` | Generates every page as static HTML, with the images, the fonts and the Content Security Policy with its hashes. | Complete HTML at build time and JavaScript only where it is needed. The Fonts API and the CSP API come built in. | WordPress: a larger attack surface and heavier pages. |
| TypeScript | `6.0.3` | The language of the site, the engine, the tools and the Worker, in `strict` mode. | One language across all the packages, with the types checked. | Untyped JavaScript: there is no JavaScript file in the `src` folder of any package. |
| pnpm workspace | `12.21.0` | Keeps the site, the Worker, the engine and the tools in a single repository, each as a package of its own. | The packages stay separate but are built, tested and changed together. The pnpm version is pinned in the root manifest. | One repository per tool, branches and git submodules: the tools could not be changed together with the site. |
| Node.js | `>=22.23.4` | Runs the site build, the tests and the repository’s scripts. The ‘Version’ column gives the minimum version the repository accepts, from the `engines` field: that version or any later one will do. | Astro, Vitest, Playwright and Lighthouse run on Node. | No alternative: the build and test tools require Node. |
| Cloudflare Workers | `wrangler 4.156.0` | Every request goes through here. It serves the static pages with their headers and handles the tools, the contact form and the Markdown versions; when statistics are switched on, it sends the visits to Counterscale. | The pages come from Cloudflare’s network, and a single server-side service does the rest, tested in its real runtime. | Astro’s Cloudflare adapter: the site needs no server-side code of its own. |
| @mrc-labs/engine | `0.1.0` | Makes the requests to other sites for the tools, behind the guards, reads the HTML and applies the four states. | Guards, limits and user agent sit in one place and apply to every tool. | Network code inside each tool: the boundary check rejects it. |
| MRC Labs | `@mrc-labs/ai-robots-llms-txt 0.2.1` `@mrc-labs/entity-check 0.2.0` `@mrc-labs/mrc-check 0.2.0` | Each MRC Labs tool is a library with its own checks and its messages in the four languages. The table gives the version of each one. | A tool is tested on its own, on synthetic samples, without network access. | Tools that run in the browser: a browser cannot read other sites, and the code of the checks would reach the visitor. |
| htmlparser2 | `12.0.0` | Reads the HTML of the pages the tools analyse. | It is pure JavaScript: it runs the same in the Worker and in Node, reads the page in pieces while checking the limits, and tolerates malformed HTML the way bots do. | cheerio, which brings a networking module with it; linkedom, which emulates the DOM; parse5, which has no selectors. |
| Counterscale | `GET /collect` | When statistics are switched on, counts visits on the server: it is open source software that runs on Cloudflare, and the Worker sends it a record for every page served. The repository does not pin a version of Counterscale, so the ‘Version’ column gives the request the Worker makes to it when statistics are switched on. | No analytics script reaches the browser and nothing is written to the device: that is why there is no banner. When statistics are switched on, the data stays with Cloudflare, which already serves the site, with no other processor. | Google Analytics 4: even with Consent Mode it requires consent, and so a banner. |
| Cloudflare Turnstile | `v0` | Protects the contact form and the tools’ forms from abuse. | It loads only on pages with a form, and only when you start using it. It is there to stop the tools becoming a service for scanning sites: without JavaScript an analysis starts without the check, but within a limit shared by all visitors. | A request limit per IP address on its own: there is one as well, but by itself it cannot tell a person from a program. |
| sharp | `0.35.5` | Converts the photo to AVIF and WebP, in several widths, and renders the sharing images and the icons as PNG. | It is Astro’s built-in image service: every image comes out of the build, with its dimensions declared. | Images prepared by hand outside the repository. |
| fontkit | `3.0.0` | Extracts from the font files the letter outlines used on the punched cards, in the logo and in the sharing images, and measures the words of the architecture diagram. | No extra font to download, and the cards look the same in every browser and in every build. | The letters as text in IBM Plex Mono, as in the mockup: the pages would have requested six font files, over the limit of four. |
| Host Grotesk | `5.3.0` | The site’s typeface, in three weights, hosted on the site as subsets. | OFL licence and the files on the site: no request to other hosts, neither at build time nor in the browser. | Fonts served from another host. |
| Vitest | `4.1.12` | Runs the tests of the code, of the scripts and of the built site. | It reads TypeScript as it is and runs without network access. There is a single version for all the packages, from the workspace catalogue. | A different test runner for each package. |
| @cloudflare/vitest-plugin | `1.4.11` | Runs the Worker’s tests in the real Workers runtime, the same one as `wrangler dev`. | The Worker is tested where it runs. | Testing the Worker in Node: the two runtimes do not behave the same way. In Workers, for example, the clock does not move forward while code is running. |
| Playwright | `1.65.1` | Opens the built pages in a real browser: with and without JavaScript, at four screen widths, compared with the reference screenshots. | It tests what a visitor sees, not just the HTML. | Stopping at the HTML: appearance, motion and keyboard use only show in a browser. |
| Lighthouse | `13.6.0` | Measures every page template three times, on the mobile profile, and keeps the median. | The budget is a number: a page that exceeds it makes the tests fail. | A single measurement: it fluctuates from one run to the next. |
| axe-core | `4.14.0` | Looks for accessibility violations on every page template. | It runs inside the Playwright tests, on the same built pages. | A tolerated share of violations: here the threshold is zero. |
| schema-dts | `2.1.0` | Gives schema.org types to the JSON-LD, which is generated from the same data as the visible text. | A structural error in the JSON-LD is caught by the type check, `pnpm typecheck`. | JSON-LD written by hand alongside the page. |

The versions are not written by hand: at every build the page reads them from the lockfile, from the package manifests and, for the services outside the repository, from the code that calls them.

## The security headers, as they are served

Every response from the Worker carries these headers. The page reads them from the Worker’s code at every build: if the code changes, this page changes too.

The Content Security Policy, with the hashes of scripts and styles, sits in a `<meta>` tag on every page. The header adds `frame-ancestors`, which has no effect in a `<meta>` tag.

`workers/api/src/headers.ts`

```
strict-transport-security: max-age=63072000; includeSubDomains; preload
content-security-policy: frame-ancestors 'none'
x-frame-options: DENY
x-content-type-options: nosniff
referrer-policy: strict-origin-when-cross-origin
cross-origin-opener-policy: same-origin
permissions-policy: accelerometer=(), autoplay=(), bluetooth=(), browsing-topics=(), camera=(), display-capture=(), geolocation=(), gyroscope=(), hid=(), magnetometer=(), microphone=(), midi=(), payment=(), screen-wake-lock=(), serial=(), usb=(), xr-spatial-tracking=()
```

## The checks, suite by suite

The list comes from the test configuration: every suite that `pnpm test` runs, in order, with its command and the number of test files it reads.

### `confini`

That every package imports only what it is allowed to, and that network code sits only in the three places allowed. It runs first.

- Command: `node scripts/confini/controlla.mjs`
- Test files: 1

### `dominio`

That the site’s domain is written in one file only, and nowhere else in the code, the tests or the content.

- Command: `node scripts/dominio/controlla.mjs`
- Test files: 1

### `scripts`

The repository’s scripts, on samples: the boundary check, the domain check, the check of the published site, the conversion of the legal texts and the utility scripts.

- Command: `vitest run --config scripts/vitest.config.mjs`
- Test files: 18

### `engine`

The engine: the guards, the limits, one request at a time, reading the HTML and the `robots.txt`, the registers, the four states.

- Command: `vitest run`
- Test files: 23

### `ai-robots-llms-txt`

The checks in AI Robots & llms.txt, on synthetic samples.

- Command: `vitest run`
- Test files: 12

### `entity-check`

The checks in Entity Check, on synthetic samples.

- Command: `vitest run`
- Test files: 15

### `mrc-check`

The checks in MRC Check, on synthetic samples.

- Command: `vitest run`
- Test files: 14

### `site-unit`

The site’s code: addresses, content against its schemas, texts, structured data, fonts, punched cards.

- Command: `vitest run --project unit --reporter=default --reporter=./test/aiuti/reporter-misure.ts --outputFile.json=misure-grezze/site-unit.json`
- Test files: 35

### `site-build`

The four builds of the site: test, test with statistics switched on, production and preview.

- Command: `node scripts/astro.mjs build prova` `node scripts/astro.mjs build prova --statistiche-accese` `node scripts/astro.mjs build produzione` `node scripts/astro.mjs build anteprima`
- Test files: 1

### `site-sito`

The built site, as a crawler reads it: texts, links, hreflang, JSON-LD, sitemap, Markdown versions, headers, no resources from other hosts.

- Command: `vitest run --project sito --reporter=default --reporter=./test/aiuti/reporter-misure.ts --outputFile.json=misure-grezze/site-sito.json`
- Test files: 29

### `site-browser`

The pages in a browser: without JavaScript, accessibility, appearance at four screen widths, fonts, motion.

- Command: `playwright test`
- Test files: 15

### `site-lighthouse`

The performance budgets, measured with Lighthouse.

- Command: `node test/prestazioni/lighthouse.mjs`
- Test files: 1

### `api`

The Worker in the Workers runtime: the pages and their headers, the language, the tools, the contact form, visit counting and the opt-out; and the checks that guard a release.

- Command: `vitest run`
- Test files: 15

### `api-browser`

The Worker and the pages together, in a browser: the contact form, the opt-out and the tools.

- Command: `playwright test`
- Test files: 3

## The real numbers from the build

Measured in the last complete test run: the JavaScript and the weight of every page measured, the Lighthouse scores, the tests of the site’s suites, all passed.

Measured on 21 November 2026

- 1,496 tests passed
- 602 tests in `site-browser`
- 524 tests in `site-sito`
- 370 tests in `site-unit`

| Page | JavaScript | Weight | Performance | Accessibility | Best Practices | SEO |
| --- | --- | --- | --- | --- | --- | --- |
| `/` | 7.4 kB | 89.1 kB | 100 | 100 | 100 | 100 |
| `/de/` | 7.4 kB | 90.3 kB | 100 | 100 | 100 | 100 |
| `/de/labs/entity-check/` | 3.0 kB | 75.1 kB | 100 | 100 | 100 | 100 |
| `/de/methode/` | 1.4 kB | 56.0 kB | 100 | 100 | 100 | 100 |
| `/fr/` | 7.4 kB | 90.0 kB | 100 | 100 | 100 | 100 |
| `/fr/labs/entity-check/` | 3.0 kB | 83.1 kB | 100 | 100 | 100 | 100 |
| `/it/` | 7.4 kB | 89.4 kB | 100 | 100 | 100 | 100 |
| `/it/404.html` | 1.4 kB | 53.2 kB | 100 | 100 | 100 | 100 |
| `/it/chi-sono/` | 1.4 kB | 97.7 kB | 100 | 100 | 100 | 100 |
| `/it/come-e-fatto/` | 1.4 kB | 77.7 kB | 100 | 100 | 100 | 100 |
| `/it/contatti/` | 6.8 kB | 61.7 kB | 100 | 100 | 100 | 100 |
| `/it/cookie/` | 1.9 kB | 55.5 kB | 100 | 100 | 100 | 100 |
| `/it/labs/` | 1.4 kB | 54.3 kB | 100 | 100 | 100 | 100 |
| `/it/labs/ai-robots-llms-txt/` | 3.0 kB | 74.4 kB | 100 | 100 | 100 | 100 |
| `/it/labs/entity-check/` | 3.0 kB | 74.5 kB | 100 | 100 | 100 | 100 |
| `/it/labs/store-app-audit/` | 1.4 kB | 71.3 kB | 100 | 100 | 100 | 100 |
| `/it/metodo/` | 1.4 kB | 55.6 kB | 100 | 100 | 100 | 100 |
| `/it/servizi/` | 1.4 kB | 54.2 kB | 100 | 100 | 100 | 100 |
| `/it/servizi/geo-ai-search/` | 1.4 kB | 69.7 kB | 100 | 100 | 100 | 100 |
| `/labs/entity-check/` | 3.0 kB | 74.1 kB | 100 | 100 | 100 | 100 |

## The same rules, on your site

If you want to know how many of these checks your site passes, get in touch: I’ll reply personally and, if needed, we’ll arrange a call.

[Get in touch](https://mrcstudio.io/contact/)
