docs: add dual-domain design spec

This commit is contained in:
2026-05-16 13:59:48 +02:00
parent 38fadf32f6
commit f9f26dc584

View File

@@ -0,0 +1,38 @@
# Dual-Domain Support
**Date:** 2026-05-16
**Status:** Approved
## Goal
Serve the portfolio under both `gabrielkaszewski.dev` and `gabrielkaszewski.pl` with identical content. The `.dev` domain is canonical for SEO.
## Changes
### 1. `compose.yml` — Traefik router rule
Extend the `Host()` rule to accept both domains and cover both with TLS:
```yaml
- "traefik.http.routers.gabrielkaszewski.rule=Host(`gabrielkaszewski.dev`) || Host(`gabrielkaszewski.pl`)"
- "traefik.http.routers.gabrielkaszewski.entrypoints=websecure"
- "traefik.http.routers.gabrielkaszewski.tls.certresolver=letsencrypt"
```
### 2. `app/layout.tsx` — canonical metadata
Add `alternates.canonical` to the exported `metadata` object:
```ts
alternates: {
canonical: "https://gabrielkaszewski.dev",
},
```
This injects `<link rel="canonical" href="https://gabrielkaszewski.dev">` into every page's `<head>`, telling search engines the `.dev` domain is authoritative.
## Out of scope
- No redirects — `.pl` serves content directly.
- No per-domain content differences.
- No changes to OpenGraph or JSON-LD (already hardcoded to `.dev`).