feat(seo): metadata, previews and sitemaps for status pages and the app #170

Merged
Sebi merged 1 commits from feat/seo-metadata into main 2026-11-28 21:58:06 +00:00
Owner

Summary

Search engine and link preview metadata for public status pages and the app's public pages, matching what the landing page got.

Status pages (internal/statuspage)

  • <head> carries description (plain text of the page's description, else "Current status of X: …"), canonical, hreflang per language plus x-default, Open Graph and Twitter tags.
  • ?lang=de|en shows the page in that language and becomes its canonical address. Without it the language follows Accept-Language as before.
  • /<slug>/og.png (or /og.png on a custom domain): a 1200×630 PNG with the page name, current status and status colour, cached per page and language until title or status change. It is drawn with the new internal/ogimage package (Go fonts via golang.org/x/image, no external service).
  • sitemap.xml per page. /robots.txt disallows feeds, the API and subscription forms, and names the sitemap on custom domains.
  • Component, legal and subscription pages get noindex.

App (internal/api, cloud edition only)

  • /login, /signup and /legal/:kind get the same tags, with /og.png showing a generic UptimeSebi card per language.
  • /robots.txt allows only those pages, and /sitemap.xml lists them (signup only while sign-up is open, legal pages only when hosted here).
  • Every other page is noindex, nofollow. Self-hosted installations serve Disallow: /, no sitemap and noindex everywhere.
  • ?lang= works on all pages.

Absolute URLs use UPTIME_PUBLIC_URL for the app. The status page server uses the request host, with https when served over TLS or X-Forwarded-Proto: https.

Test plan

  • TestSearchAndPreviewMetadata (statuspage): tags, ?lang= canonical, generated description, noindex pages, og.png, sitemap, robots for custom domain and shared host
  • TestPublicPagesForSearchEngines (api): cloud login/signup tags, robots, sitemap, og.png, console noindex, self-hosted fully closed
  • internal/ogimage tests: size, wrapping and ellipsis for long names
  • Dev stack: /dev status page tags and preview image checked
  • golangci-lint 0 issues. In the full parallel run only TestCheckerNetwork failed, by timeout; alone it passes twice.

🤖 Generated with Claude Code

https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3

## Summary Search engine and link preview metadata for public status pages and the app's public pages, matching what the landing page got. **Status pages** (`internal/statuspage`) - `<head>` carries description (plain text of the page's description, else "Current status of X: <status>…"), canonical, hreflang per language plus x-default, Open Graph and Twitter tags. - `?lang=de|en` shows the page in that language and becomes its canonical address. Without it the language follows `Accept-Language` as before. - `/<slug>/og.png` (or `/og.png` on a custom domain): a 1200×630 PNG with the page name, current status and status colour, cached per page and language until title or status change. It is drawn with the new `internal/ogimage` package (Go fonts via `golang.org/x/image`, no external service). - `sitemap.xml` per page. `/robots.txt` disallows feeds, the API and subscription forms, and names the sitemap on custom domains. - Component, legal and subscription pages get `noindex`. **App** (`internal/api`, cloud edition only) - `/login`, `/signup` and `/legal/:kind` get the same tags, with `/og.png` showing a generic UptimeSebi card per language. - `/robots.txt` allows only those pages, and `/sitemap.xml` lists them (signup only while sign-up is open, legal pages only when hosted here). - Every other page is `noindex, nofollow`. Self-hosted installations serve `Disallow: /`, no sitemap and noindex everywhere. - `?lang=` works on all pages. Absolute URLs use `UPTIME_PUBLIC_URL` for the app. The status page server uses the request host, with https when served over TLS or `X-Forwarded-Proto: https`. ## Test plan - [x] `TestSearchAndPreviewMetadata` (statuspage): tags, `?lang=` canonical, generated description, noindex pages, og.png, sitemap, robots for custom domain and shared host - [x] `TestPublicPagesForSearchEngines` (api): cloud login/signup tags, robots, sitemap, og.png, console noindex, self-hosted fully closed - [x] `internal/ogimage` tests: size, wrapping and ellipsis for long names - [x] Dev stack: `/dev` status page tags and preview image checked - [x] golangci-lint 0 issues. In the full parallel run only `TestCheckerNetwork` failed, by timeout; alone it passes twice. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi added 1 commit 2026-11-28 21:50:50 +00:00
feat(seo): metadata, previews and sitemaps for status pages and the app
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 6m23s
ci / test (pull_request) Successful in 12m44s
ci / build (pull_request) Successful in 16m9s
ci / image (pull_request) Successful in 3m24s
3baeb98ee2
Status pages describe themselves to search engines and link previews:
description (from the page's text, else its status), canonical address,
language versions via ?lang= with hreflang and x-default, Open Graph and
Twitter tags, and a 1200x630 preview image per page and language showing
its name and current status (/og.png). Each page has a sitemap.xml, and
robots.txt keeps crawlers off feeds, the API and subscription forms.
Component, legal and subscription pages are noindex.

In the cloud edition the app's sign-in, sign-up and legal pages get the
same tags with a preview image of their own, plus robots.txt and a
sitemap. Everything signed in stays noindex, and self-hosted
installations keep the whole app out of search engines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi merged commit d91d600c90 into main 2026-11-28 21:58:06 +00:00
Sebi deleted branch feat/seo-metadata 2026-11-28 21:58:08 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ZB-Server/uptimesebi#170