Skip to content

SEO and static deployment ​

The application generates complete HTML for the calculator, cohort importer, guide, settings and 404 pages in both languages. Vue hydrates the rendered pages in the browser. No server receives or renders sample data. Each build creates an empty workspace, with an isolated Pinia store and translation instance per page.

Set the public origin ​

Copy .env.example to .env.local for a local production preview, or configure the equivalent variables in the host's build environment:

dotenv
VITE_SITE_URL=https://app.reiberrechner.de
VITE_INDEXABLE=true

The app lives at https://app.reiberrechner.de; the documentation lives at https://reiberrechner.de. VITE_SITE_URL must be an absolute HTTPS origin without credentials, a path, query parameters or a fragment. The app is deployed at the subdomain root. This value supplies its canonical URLs, language alternates, structured data, social image URLs and sitemap. It is not inferred from visitors' URLs. The documentation has its own canonical URLs, sitemap and robots.txt on the root domain.

sh
pnpm build
pnpm preview

The deployable output is dist/. When the origin is unset, the build logs a warning and generates a noindex preview with no canonical URLs or sitemap. Set VITE_INDEXABLE=false for staging; its pages remain noindex and it does not publish a sitemap. robots.txt permits crawling so search engines can read the noindex tags. Rebuild after changing either variable.

URLs and indexing ​

PageEnglishGermanIndexed
Calculator//deYes
Cohort importer/import/de/importYes
Scientific guide/help/de/helpYes
Preferences/settings/de/settingsNo
Missing pages404.htmlde/404.htmlNo

The home entry (/) applies the visitor's language preset after hydration: an explicit saved app choice first, then the first supported browser language, then English. Regional preferences such as de-CH and en-GB map to German and English. The client replaces the home URL when German is preferred, retaining query parameters and fragments without adding a history entry. Other URLs keep their linked language. Only using the language switch saves a preference; opening a shared page or detecting the browser language never overwrites it.

The language switch is a normal crawlable link and preserves the current section. Prerendered HTML remains deterministic in each URL's language, including without JavaScript. Every indexable page has a self-referencing canonical, reciprocal en/de alternates, and an English x-default. Query parameters and fragments never enter metadata. Settings and unknown pages are excluded from the sitemap; unknown URLs have no canonical pointing to the home page.

The guide is accessible without accepting the research-tool notice. Entering an interactive analysis page still requires acknowledgment. The initial HTML includes descriptive headings, guidance, reference diagrams and links to the scientific sources; JavaScript is needed for calculations and downloads.

Metadata is defined in src/lib/seo.ts and rendered by Unhead on both server and client. JSON-LD describes the website, page and research web application without invented ratings, reviews or clinical credentials. It does not claim eligibility for a particular search enhancement. The same 1200 × 630 PNG social card is used by Open Graph and Twitter cards. Its editable source is public/social-card.svg; rebuild the PNG with pnpm seo:card after installing Chromium through Playwright.

Static hosting contract ​

Serve each generated page at its clean URL: /help serves help.html, /de serves de.html, and /de/help serves de/help.html. Existing assets retain their normal URLs and content types. Return HTTP 404 with the generated 404 document for missing paths. Do not route every request to index.html: that would return home-page metadata for other pages and create soft 404s.

Permanently redirect /info to /help and /de/info to /de/help. Normalize .html aliases and trailing slashes to the clean URLs above. pnpm preview implements these redirects and status codes, and the browser tests verify them. The preview middleware is a local testing server, not production hosting configuration.

public/_redirects provides Netlify's legacy redirects and language-specific 404 handling. Netlify handles clean HTML URLs; check the final canonical URL and redirect behavior on the actual host. public/.htaccess provides the equivalent rules for Apache 2.4, including Plesk with Apache proxy mode; see Deploy on Plesk for paths and build actions. For other hosts, configure equivalent clean-file serving and custom 404s. Use HTTPS, enable Brotli/gzip, cache hashed /assets/ files immutably, and revalidate HTML and sw.js so releases do not serve stale metadata. The PWA precaches each language's page independently and does not substitute the home page for arbitrary navigations.

The VitePress output in docs/.vitepress/dist/ is a separate documentation site. It is not listed in the application's sitemap because it has no configured public hosting URL.

Verification ​

sh
pnpm test
pnpm test:e2e

The E2E server builds in e2e mode to dist-e2e/, with the reserved test origin https://reiber.example. Tests never overwrite dist/ with that fixture origin. SEO checks cover the actual HTTP response and a browser with JavaScript disabled, all six public routes, unique metadata, language alternates, JSON-LD, redirects, real 404s, social-image dimensions, sitemap contents, client navigation, hydration and exclusion of sample information from metadata. The full local suite retains all five browser profiles, with offline checks in Chromium. CI currently runs only the Chromium project to shorten deployments.

To target an existing production preview, set both PLAYWRIGHT_BASE_URL to its local serving address and PLAYWRIGHT_SITE_URL to the canonical origin used for that build. Use only a disposable browser profile and synthetic data for testing.

After deployment, verify the domain in Google Search Console, submit /sitemap.xml, and inspect /, /help and /de/help with URL Inspection. Public discovery, search ranking and field Core Web Vitals can only be evaluated against the live site; the repository checks establish crawlable output and consistent metadata.

Implementation references ​

For scientific research only. MIT licensed.