fix: canonicalize vibedeveloper.id for search and WhatsApp links - #43
fix: canonicalize vibedeveloper.id for search and WhatsApp links#43julianromli wants to merge 3 commits into
Conversation
Point robots, sitemap, canonical tags, and structured data at https://vibedeveloper.id. 301 www and vibedevid.com hosts to the apex. Keep /sitemap.xml on HTTP 200 when the database query fails. Change community buttons to https://wa.vibedeveloper.id. Co-authored-by: faizintifada <faizintifada@gmail.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
vibedevid | ddaec72 | Commit Preview URL Branch Preview URL |
Sep 07 2026, 02:16 AM |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@cursoragent review |
|
The SEO cutover on this branch is correct. I posted the same review on PR #43. Verified on the Cloudflare preview
The old duplicate-canonical bug is gone: the root layout no longer puts a homepage canonical on every page. Event pages now use an absolute canonical. Do not block merge on Biome CI. Still required after merge (not in this diff)
|
ReviewThe canonical cutover works on the Cloudflare preview for this branch. Verified on
The root layout no longer emits a homepage canonical on every page, which was a real duplicate-canonical signal. Event detail canonicals are absolute now.
Blockers outside this PR
Nits (not merge blockers)
After merge: rebuild with |
There was a problem hiding this comment.
1 issue found across 30 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/start.ts">
<violation number="1" location="app/start.ts:16">
P1: When a POST-based server function is called on an alias host, this middleware returns a 301 before the handler runs. Fetch follows that redirect as GET, so mutations and sign-in requests fail; use a method-preserving 308 for non-GET/HEAD requests and retain 301 for GET/HEAD.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
|
||
| const canonicalHostMiddleware = createMiddleware().server(async ({ request, next }) => { | ||
| const redirect = applyCanonicalHostRedirect(request) | ||
| if (redirect) return redirect |
There was a problem hiding this comment.
P1: When a POST-based server function is called on an alias host, this middleware returns a 301 before the handler runs. Fetch follows that redirect as GET, so mutations and sign-in requests fail; use a method-preserving 308 for non-GET/HEAD requests and retain 301 for GET/HEAD.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/start.ts, line 16:
<comment>When a POST-based server function is called on an alias host, this middleware returns a 301 before the handler runs. Fetch follows that redirect as GET, so mutations and sign-in requests fail; use a method-preserving 308 for non-GET/HEAD requests and retain 301 for GET/HEAD.</comment>
<file context>
@@ -1,41 +1,44 @@
+
+const canonicalHostMiddleware = createMiddleware().server(async ({ request, next }) => {
+ const redirect = applyCanonicalHostRedirect(request)
+ if (redirect) return redirect
+ return next()
+})
</file context>
| if (redirect) return redirect | |
| if (redirect) { | |
| if (request.method === 'GET' || request.method === 'HEAD') return redirect | |
| return new Response(null, { status: 308, headers: redirect.headers }) | |
| } |
Drop unused siteConfig, share XML escaping, strip DNS trailing-dot hosts, use 308 for non-GET alias redirects, and stop reading process.env at client module load. Co-authored-by: faizintifada <faizintifada@gmail.com>
Co-authored-by: faizintifada <faizintifada@gmail.com>
There was a problem hiding this comment.
1 issue found across 12 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="lib/seo/site-url.ts">
<violation number="1" location="lib/seo/site-url.ts:32">
P1: When the edge runtime exposes `process` without an `env` object, `readProcessEnv` throws before `getSiteUrl()` can use the Worker binding or Vite fallback. Read the environment through optional chaining, matching `runtime-secrets.ts`.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
|
||
| function readProcessEnv(name: string): string | undefined { | ||
| if (typeof process === 'undefined') return undefined | ||
| const value = process.env[name] |
There was a problem hiding this comment.
P1: When the edge runtime exposes process without an env object, readProcessEnv throws before getSiteUrl() can use the Worker binding or Vite fallback. Read the environment through optional chaining, matching runtime-secrets.ts.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At lib/seo/site-url.ts, line 32:
<comment>When the edge runtime exposes `process` without an `env` object, `readProcessEnv` throws before `getSiteUrl()` can use the Worker binding or Vite fallback. Read the environment through optional chaining, matching `runtime-secrets.ts`.</comment>
<file context>
@@ -27,6 +27,14 @@ function readWorkerEnv(name: string): string | undefined {
+function readProcessEnv(name: string): string | undefined {
+ if (typeof process === 'undefined') return undefined
+ const value = process.env[name]
+ if (typeof value !== 'string') return undefined
+ const trimmed = value.trim()
</file context>
| const value = process.env[name] | |
| const value = process.env?.[name] |


Point robots, sitemap, canonical tags, and structured data at https://vibedeveloper.id. 301 www and vibedevid.com hosts to the apex. Keep /sitemap.xml on HTTP 200 when the database query fails. Change community buttons to https://wa.vibedeveloper.id.