Skip to content

Commit 75116b2

Browse files
committed
Document canonical flip completion and PEELS_PUBLIC_SITE_URL cutover
Update dual-hosting docs to reflect the .org canonical state and add the Edge Function redeploy steps for transactional email URL cutover.
1 parent bb41cc8 commit 75116b2

2 files changed

Lines changed: 51 additions & 43 deletions

File tree

docs/dual-hosting-peels-org.md

Lines changed: 50 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ Peels serves the same production app from both `https://www.peels.app` and
55
dual-hosting phase. Apex `peels.org` is not an app origin; if used, it should
66
redirect to `https://www.peels.org`.
77

8-
The current canonical SEO origin is still `https://www.peels.app`. The next
9-
planned step, after the dual-hosting period has had time to settle, is to make
10-
`https://www.peels.org` canonical while still keeping `.app` functional. A much
11-
later step can redirect `.app` to `.org`.
8+
The canonical SEO origin is now `https://www.peels.org`. Both hosts still serve
9+
the app with no redirect between them. A much later step can redirect `.app` to
10+
`.org`.
1211

1312
## Current state
1413

@@ -25,12 +24,16 @@ Done:
2524
`https://www.peels.org`.
2625
- Supabase Edge Function email sending uses one configured sender:
2726
`GENERAL_EMAIL_ADDRESS`.
27+
- `siteConfig.url` is `https://www.peels.org`.
28+
- Supabase Auth Site URL is `https://www.peels.org`.
29+
- Both hosts emit `.org` canonical URLs, sitemap URLs, and robots sitemap
30+
references.
31+
- `https://www.peels.org/sitemap.xml` submitted in Search Console (180 pages).
2832

2933
Still intentional:
3034

31-
- Keep `siteConfig.url` as `https://www.peels.app` during dual-hosting.
32-
- Keep Supabase Auth Site URL as `https://www.peels.app`.
33-
- Keep `PEELS_PUBLIC_SITE_URL` as `https://www.peels.app`.
35+
- Keep `PEELS_PUBLIC_SITE_URL` as `https://www.peels.app` until the
36+
transactional-email URL cutover below is complete.
3437
- Keep `GENERAL_EMAIL_ADDRESS` on the currently verified `@peels.app` sender
3538
until the email cutover.
3639
- Do not redirect `peels.app` to `peels.org` yet.
@@ -60,24 +63,21 @@ unless a page says otherwise. The app only emits `noindex, follow` metadata for
6063
explicitly non-indexable surfaces.
6164

6265
Canonical URLs are emitted through Next.js metadata as `<link rel="canonical"
63-
...>`, not as a `meta` tag. During this phase, pages on both domains should
64-
emit `.app` canonical URLs because `siteConfig.url` remains
65-
`https://www.peels.app`.
66+
...>`, not as a `meta` tag. Both domains now emit `.org` canonical URLs because
67+
`siteConfig.url` is `https://www.peels.org`.
6668

67-
For now, the intended SEO shape is:
69+
The current SEO shape is:
6870

6971
- `.app` and `.org` both render the app.
70-
- `.app` remains canonical in page metadata, sitemap, robots sitemap URL,
71-
JSON-LD, RSS, Open Graph URLs, and newsletter content.
72-
- `.org` builds browser trust, partner familiarity, allow-list history, and
73-
backlinks without asking search engines to treat it as the primary origin
74-
yet.
72+
- `.org` is canonical in page metadata, sitemap, robots sitemap URL, JSON-LD,
73+
Open Graph URLs, and RSS.
74+
- `.app` still serves the app and emits the same `.org` canonical metadata.
7575

7676
## Supabase during dual-hosting
7777

7878
No SQL migration is needed for dual-hosting. Hosted Supabase Auth should have:
7979

80-
- Site URL: `https://www.peels.app`
80+
- Site URL: `https://www.peels.org`
8181
- Redirect URLs:
8282
- `https://www.peels.app/**`
8383
- `https://www.peels.org/**`
@@ -114,37 +114,45 @@ Useful preparation:
114114

115115
## Making peels.org canonical
116116

117-
Do this after the dual-hosting period has had enough time to build confidence
118-
and after third-party allow-lists, auth, and email flows have been smoke-tested
119-
on `.org`.
117+
Done:
120118

121-
Code changes:
119+
1. `siteConfig.url` is `https://www.peels.org`.
120+
2. Supabase Auth Site URL is `https://www.peels.org`.
121+
3. `.app` and `.org` remain in the redirect allow-list.
122+
4. Tests expect `.org` canonical URLs.
123+
5. `https://www.peels.org/sitemap.xml` submitted in Search Console.
122124

123-
1. Change `src/config/site.ts`:
124-
- `siteConfig.url` to `https://www.peels.org`
125-
- encoded contact emails once the email cutover is complete
126-
- any visible `.app` wording that should become `.org`
127-
2. Search for remaining `.app` references in app code and content:
128-
`rg "peels\\.app|Peels\\.app|siteConfig\\.url|encodedEmail" src supabase docs`
129-
3. Keep `src/config/appOrigins.ts` allowing both `https://www.peels.app` and
130-
`https://www.peels.org` while `.app` still serves the app.
131-
4. Keep `supabase/functions/_shared/app-origin.ts` allowing both origins while
132-
`.app` still serves the app.
133-
5. Update tests that assert `.app` canonical URLs so they expect `.org`.
134-
135-
Supabase and Edge Function changes:
136-
137-
1. Change Supabase Auth Site URL to `https://www.peels.org`.
138-
2. Keep `.app` and `.org` redirect URLs in the allow-list.
139-
3. Change `PEELS_PUBLIC_SITE_URL` to `https://www.peels.org`.
140-
4. If email sending has cut over, change `GENERAL_EMAIL_ADDRESS` to the chosen
141-
`@peels.org` sender.
142-
5. Redeploy the email Edge Functions after changing code or secrets:
143-
- `send-email-for-auth-action`
125+
Next: transactional email URL cutover (`PEELS_PUBLIC_SITE_URL`):
126+
127+
1. Change `PEELS_PUBLIC_SITE_URL` to `https://www.peels.org` in Supabase Edge
128+
Function secrets.
129+
2. Redeploy the functions that call `getPublicSiteUrl()`:
144130
- `send-email-for-new-chat-message`
145131
- `send-email-for-new-feature`
146132
- `send-email-for-newsletter-issue-supabase-users`
147133
- `send-email-for-newsletter-issue-resend-audience`
134+
3. Smoke-test one chat notification or newsletter link points to `.org`.
135+
136+
Example CLI after `supabase login` and `supabase link --project-ref mfnaqdyunuafbwukbbyr`:
137+
138+
```bash
139+
supabase secrets set PEELS_PUBLIC_SITE_URL=https://www.peels.org
140+
supabase functions deploy send-email-for-new-chat-message
141+
supabase functions deploy send-email-for-new-feature
142+
supabase functions deploy send-email-for-newsletter-issue-supabase-users
143+
supabase functions deploy send-email-for-newsletter-issue-resend-audience
144+
```
145+
146+
Later canonical / email work still deferred:
147+
148+
1. Change `encodedEmail` in `src/config/site.ts` once the email cutover is
149+
complete.
150+
2. Search for remaining `.app` references in app code and content:
151+
`rg "peels\\.app|Peels\\.app|siteConfig\\.url|encodedEmail" src supabase docs`
152+
3. If email sending has cut over, change `GENERAL_EMAIL_ADDRESS` to the chosen
153+
`@peels.org` sender.
154+
4. Redeploy `send-email-for-auth-action` after any auth email code or secret
155+
changes.
148156

149157
Email cutover:
150158

supabase/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# These are only necessary if you plan to run Supabase functions locally.
22
# Production secrets should stay in the Supabase dashboard for now.
33
GENERAL_EMAIL_ADDRESS=
4-
PEELS_PUBLIC_SITE_URL=https://www.peels.app
4+
PEELS_PUBLIC_SITE_URL=https://www.peels.org
55
RESEND_API_KEY=
66
SEND_EMAIL_HOOK_SECRET=
77
PEELS_CHAT_MESSAGE_WEBHOOK_SECRET=

0 commit comments

Comments
 (0)