docs: add dual-domain design spec
This commit is contained in:
38
docs/superpowers/specs/2026-05-16-dual-domain-design.md
Normal file
38
docs/superpowers/specs/2026-05-16-dual-domain-design.md
Normal 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`).
|
||||
Reference in New Issue
Block a user