diff --git a/404.html b/404.html index 1c0ced6..b6a48a0 100644 --- a/404.html +++ b/404.html @@ -39,6 +39,7 @@ Storybook Privacy Contact + hello@spacecorpstechnology.com diff --git a/README.md b/README.md index 2f3e1a5..5bb8edd 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The site does not install the React package: it is a static site with no React c ## Agent-facing files (single source: this repo) -All served from the site root and maintained only here: `llms.txt`, `index.md` (Markdown of the home page), `openapi.json` (the hosted spaceemit API), `robots.txt`, `sitemap.xml`. There is deliberately no MCP server card, sandbox, API-key service or `.well-known/` agent metadata: none of those existed behind the old files (the advertised MCP endpoint returned 404). Add them back only when the service is real. +All served from the site root and maintained only here: `llms.txt`, `index.md` (Markdown of the home page), `openapi.json` (the hosted spaceemit API), `robots.txt`, `sitemap.xml`. There is deliberately no MCP server card, sandbox or API-key service, and `.well-known/` holds only `security.txt`: none of those existed behind the old files (the advertised MCP endpoint returned 404). Add them back only when the service is real. ## Develop, build, run diff --git a/about.html b/about.html index 47a7d83..c407b7d 100644 --- a/about.html +++ b/about.html @@ -54,6 +54,7 @@

Elsewhere

Storybook Privacy Contact + hello@spacecorpstechnology.com diff --git a/contact.html b/contact.html index 57ac911..fae982c 100644 --- a/contact.html +++ b/contact.html @@ -41,8 +41,10 @@

Questions, bugs and feature requests

  • obop: obop issues.
  • Any other tool: open an issue in its repository on github.com/SpaceCorps.
  • +

    Email

    +

    General questions: hello@spacecorpstechnology.com.

    Security

    -

    Please report vulnerabilities privately with GitHub's “Report a vulnerability” on the affected repository (Security tab), not in a public issue.

    +

    Please report vulnerabilities privately, not in a public issue: email security@spacecorpstechnology.com, or use GitHub's “Report a vulnerability” on the affected repository (Security tab).

    Company

    SpaceCorps Technology AB, Sweden.

    @@ -53,6 +55,7 @@

    Company

    Storybook Privacy Contact + hello@spacecorpstechnology.com diff --git a/deploy/Caddyfile b/deploy/Caddyfile index 8e2b7b3..53645e0 100644 --- a/deploy/Caddyfile +++ b/deploy/Caddyfile @@ -1,40 +1,56 @@ # Static site for spacecorps.tech. Listens on :80 inside the container; Sliplane terminates TLS. +# The handle blocks are mutually exclusive and checked in order, so /healthz answers for any host. { auto_https off admin off } :80 { - root * /srv - encode zstd gzip - handle /healthz { respond "ok" 200 } - header { - X-Content-Type-Options nosniff - Referrer-Policy strict-origin-when-cross-origin - X-Frame-Options SAMEORIGIN + # Old company domain: redirect to the apex, keeping path and query. + @oldcompany host spacecorpstechnology.com www.spacecorpstechnology.com + handle @oldcompany { + redir https://spacecorps.tech{uri} permanent + } + + @www host www.spacecorps.tech + handle @www { + redir https://spacecorps.tech{uri} permanent } - # Markdown and text are served as UTF-8 text for people and agents. - @text path *.md *.txt - header @text Content-Type "text/plain; charset=utf-8" - @md path *.md - header @md Content-Type "text/markdown; charset=utf-8" + handle { + root * /srv + encode zstd gzip + + header { + X-Content-Type-Options nosniff + Referrer-Policy strict-origin-when-cross-origin + X-Frame-Options SAMEORIGIN + } + + # Markdown and text are served as UTF-8 text for people and agents. + @text path *.md *.txt + header @text Content-Type "text/plain; charset=utf-8" + @md path *.md + header @md Content-Type "text/markdown; charset=utf-8" - @fonts path /fonts/* - header @fonts Cache-Control "public, max-age=31536000, immutable" - @media path /blog/media/* - header @media Cache-Control "public, max-age=86400" + @fonts path /fonts/* + header @fonts Cache-Control "public, max-age=31536000, immutable" + @media path /blog/media/* + header @media Cache-Control "public, max-age=86400" - file_server { - precompressed gzip + file_server { + precompressed gzip + } } handle_errors { rewrite * /404.html - file_server + file_server { + root /srv + } } } diff --git a/docs/REDIRECTS.md b/docs/REDIRECTS.md index e923cfb..eddb865 100644 --- a/docs/REDIRECTS.md +++ b/docs/REDIRECTS.md @@ -1,56 +1,43 @@ -# Domain and redirect plan - -Plan only. Nothing here has been applied: no DNS or Sliplane settings were changed. - -## Target state - -| Host | Serves | -| --- | --- | -| `spacecorps.tech` | **this site** (canonical company home) | -| `www.spacecorps.tech` | 301 to `https://spacecorps.tech{uri}` | -| `play.spacecorps.tech` | game downloads (the `play` repo's static site) | -| `storybook.spacecorps.tech` | Storybook (SpaceCorps/storybook) | -| `web.spacecorps.xyz`, `spacecorps.xyz` | browser build of the game (unchanged) | -| `obop.dev`, `space3d.dev` | product sites (unchanged) | -| `spacecorpstechnology.com`, `www.` | 301 to `https://spacecorps.tech{uri}` (old site, title "SpaceCorps Technology") | -| `spacecorps.eu`, `spacecorps.online`, and their `www.` | 301 to `https://spacecorps.tech{uri}` | -| `spacecorps.github.io` | old GitHub Pages site; see below | - -## Steps (in order) - -1. **Sliplane**: deploy this repo's `Dockerfile` as a service (port 80, health check `/healthz`). Check it on the temporary `*.sliplane.app` URL first. -2. **DNS, `spacecorps.tech`**: add the custom domain in Sliplane, then create the record it shows (CNAME for `www`; for the apex, the A/ALIAS record Sliplane specifies). Wait for the certificate; `https://spacecorps.tech/healthz` must return `ok`. Same procedure for `play.` and `storybook.` (`storybook` is described in the storybook README). -3. **Redirect domains**: either (a) give each domain's DNS to Sliplane and add all four as custom domains of a second tiny service running the redirect Caddy below, or (b) use the registrar's / Cloudflare's own redirect rule if the zone is on Cloudflare (a single "redirect all, keep path, 301" rule per domain). (b) needs no extra container; (a) keeps everything in one place. Recommendation: (b) for the three domains that are only redirects. -4. **Last**: switch the old content off only after step 2 works, and keep the redirects for at least a year. - -## Redirect-only Caddyfile (option a) - -```caddyfile -{ - auto_https off - admin off -} - -:80 { - @health path /healthz - respond @health "ok" 200 - redir https://spacecorps.tech{uri} permanent -} -``` +# Domain and redirect setup + +What is live, and what is still open. + +## State + +| Host | Serves | How | +| --- | --- | --- | +| `spacecorps.tech` | this site | Sliplane service `spacecorps-site` (this repo's Dockerfile, port 80, health check `/healthz`) | +| `www.spacecorps.tech` | 301 to `https://spacecorps.tech{uri}` | `deploy/Caddyfile` (needs the host added as a custom domain on the service) | +| `spacecorpstechnology.com`, `www.` | 301 to `https://spacecorps.tech{uri}`, path and query kept | Custom domains on `spacecorps-site`, redirected by `deploy/Caddyfile`. **Google Workspace MX records are kept untouched**: only the web records (apex and `www`) point at Sliplane. | +| `spacecorps.eu`, `spacecorps.online` | 301 to `https://spacecorps.tech` | Namecheap "URL Redirect" records (301, **http only**: there is no certificate, so `https://spacecorps.eu` shows a certificate error until these move to a Caddy-served custom domain) | +| `play.spacecorps.tech` | game downloads (`play` repo) | separate service | +| `storybook.spacecorps.tech` | Storybook | separate service, see the storybook README | +| `web.spacecorps.xyz`, `obop.dev`, `space3d.dev` | unchanged | | +| `spacecorps.github.io` | old GitHub Pages site | see below | + +Company email is on `@spacecorpstechnology.com` (Google Workspace): `hello@` for general contact, `security@` for vulnerability reports (also published in `/.well-known/security.txt`). That is why the domain's MX must stay as it is. -Run it as `caddy:2-alpine` with that file at `/etc/caddy/Caddyfile`. TLS is terminated by Sliplane, so every hostname must be added as a custom domain of this service for certificates to be issued. Add `www.spacecorps.tech` here as well. +## The Caddy rules -## `spacecorps.github.io` +`deploy/Caddyfile` uses ordered, mutually exclusive `handle` blocks: `/healthz` first (answers `ok` for every host, so health checks never get redirected), then the two redirect host matchers, then the static site. Check locally: -GitHub Pages cannot redirect by HTTP status. This PR removes the Pages workflow, so the last deployed old version stays online until Pages is disabled. Options, after `spacecorps.tech` is live: (1) leave it (project pages such as `spacecorps.github.io/Sliplane-Cli/` and `/play/` keep working, and they are linked from many places); (2) replace `index.html` on a small branch with a meta-refresh and `rel=canonical` to `https://spacecorps.tech/`. Do **not** set `spacecorps.tech` as the Pages custom domain: that would move every project page (`/Sliplane-Cli/`, `/open-glass/` ...) under `spacecorps.tech//`. +```bash +docker build -t spacecorps-tech . && docker run -d --name t -p 8081:80 spacecorps-tech +curl -sI -H 'Host: spacecorpstechnology.com' 'localhost:8081/about.html?x=1' # 301, Location: https://spacecorps.tech/about.html?x=1 +curl -s -H 'Host: spacecorpstechnology.com' localhost:8081/healthz # ok +``` + +## Open -## Checks after cutover +- `https://spacecorps.eu` and `https://spacecorps.online` (https) do not redirect. Fix: add both (and `www.`) as custom domains on `spacecorps-site` and extend the `@oldcompany` matcher in the Caddyfile, then drop the Namecheap redirects. +- `spacecorps.github.io`: GitHub Pages cannot send HTTP redirects. Project pages such as `/Sliplane-Cli/` and `/play/` keep working there, so leave the org site as is, or replace its index with a meta refresh. Do **not** set `spacecorps.tech` as its Pages custom domain: that would move every project page under `spacecorps.tech//`. +- Update the `homepage` field of repositories that still point at `spacecorps.github.io` or `spacecorpstechnology.com` (for example `SpaceCorps/web`), add `spacecorps.tech` to Google Search Console and use "Change of address" for spacecorpstechnology.com. Keep the redirects for at least a year. + +## After a change ```bash -for h in spacecorpstechnology.com www.spacecorpstechnology.com spacecorps.eu spacecorps.online www.spacecorps.tech; do +for h in spacecorpstechnology.com www.spacecorpstechnology.com www.spacecorps.tech; do curl -sI "https://$h/about.html" | grep -iE '^(HTTP|location)' done # expect 301 and Location: https://spacecorps.tech/about.html curl -s https://spacecorps.tech/healthz # ok ``` - -Also update: the `homepage` field of the GitHub org and of the repositories that point at `spacecorps.github.io` or `spacecorpstechnology.com` (for example `SpaceCorps/web`), Google Search Console (add `spacecorps.tech`, submit the sitemap, use "Change of address" for spacecorpstechnology.com). diff --git a/index.html b/index.html index 210d1b1..d2d198b 100644 --- a/index.html +++ b/index.html @@ -63,6 +63,7 @@

    From the blog

    Storybook Privacy Contact + hello@spacecorpstechnology.com diff --git a/privacy.html b/privacy.html index be30a20..585ecfb 100644 --- a/privacy.html +++ b/privacy.html @@ -41,7 +41,7 @@

    The game

    Our command-line tools

    They send no telemetry. API credentials you give a tool are stored in your operating system's keystore (macOS Keychain, Linux Secret Service or Windows DPAPI) and are sent only to the service the tool talks to. Each tool's repository documents what it contacts.

    Contact

    -

    Questions about privacy: see Contact.

    +

    Questions about privacy: hello@spacecorpstechnology.com (see also Contact).

    diff --git a/public/.well-known/security.txt b/public/.well-known/security.txt new file mode 100644 index 0000000..0f9db0c --- /dev/null +++ b/public/.well-known/security.txt @@ -0,0 +1,4 @@ +Contact: mailto:security@spacecorpstechnology.com +Expires: 2027-11-19T00:00:00.000Z +Preferred-Languages: en, sv +Canonical: https://spacecorps.tech/.well-known/security.txt diff --git a/public/index.md b/public/index.md index 7aa46c8..6f8e0f4 100644 --- a/public/index.md +++ b/public/index.md @@ -29,3 +29,5 @@ SpaceCorps Technology AB builds a space MMO, the Space3d engine it runs on, an o ## More [Blog](https://spacecorps.tech/blog/) · [About](https://spacecorps.tech/about.html) · [Contact](https://spacecorps.tech/contact.html) · [Privacy](https://spacecorps.tech/privacy.html) + +Email: hello@spacecorpstechnology.com · security reports: security@spacecorpstechnology.com diff --git a/public/llms.txt b/public/llms.txt index b401899..9476081 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -23,6 +23,7 @@ ## Site - [Blog](https://spacecorps.tech/blog/) +- Email: hello@spacecorpstechnology.com (general), security@spacecorpstechnology.com (vulnerability reports; also GitHub private vulnerability reporting) - [About](https://spacecorps.tech/about.html), [Contact](https://spacecorps.tech/contact.html), [Privacy](https://spacecorps.tech/privacy.html) - [Markdown version of the home page](https://spacecorps.tech/index.md) - [Sitemap](https://spacecorps.tech/sitemap.xml) diff --git a/scripts/_gen.py b/scripts/_gen.py index e453237..210419a 100644 --- a/scripts/_gen.py +++ b/scripts/_gen.py @@ -42,6 +42,7 @@ Storybook Privacy Contact + hello@spacecorpstechnology.com diff --git a/scripts/_pages.py b/scripts/_pages.py index 2a986be..862d74b 100644 --- a/scripts/_pages.py +++ b/scripts/_pages.py @@ -92,8 +92,10 @@ def card(tag, name, desc, links):
  • obop: obop issues.
  • Any other tool: open an issue in its repository on github.com/SpaceCorps.
  • +

    Email

    +

    General questions: hello@spacecorpstechnology.com.

    Security

    -

    Please report vulnerabilities privately with GitHub's “Report a vulnerability” on the affected repository (Security tab), not in a public issue.

    +

    Please report vulnerabilities privately, not in a public issue: email security@spacecorpstechnology.com, or use GitHub's “Report a vulnerability” on the affected repository (Security tab).

    Company

    SpaceCorps Technology AB, Sweden.

    @@ -110,7 +112,7 @@ def card(tag, name, desc, links):

    Our command-line tools

    They send no telemetry. API credentials you give a tool are stored in your operating system's keystore (macOS Keychain, Linux Secret Service or Windows DPAPI) and are sent only to the service the tool talks to. Each tool's repository documents what it contacts.

    Contact

    -

    Questions about privacy: see Contact.

    +

    Questions about privacy: hello@spacecorpstechnology.com (see also Contact).

    """ page("privacy.html", "Privacy | SpaceCorps", "What spacecorps.tech and SpaceCorps tools collect: nothing on this site, and links to the game policy.", "/privacy.html", privacy)