Skip to content

[Frontend] SEO site origin is read from two different env vars (NEXT_PUBLIC_SITE_URL vs NEXT_PUBLIC_APP_URL) with mismatched defaults, so canonical/OG can diverge from sitemap/robots #1238

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

metadata.ts:15 and layout.tsx:17 read NEXT_PUBLIC_SITE_URL (default http://localhost:3000) for metadataBase/canonical/OG, while robots.ts:25 and sitemap.ts:3 read NEXT_PUBLIC_APP_URL (default https://remitlend.com). Neither var is in frontend/.env.example. If only one is configured in prod, canonical/OG URLs and the sitemap/robots host point at different origins (e.g. canonical=localhost).

Acceptance criteria

  • All four files resolve the site origin from a single shared constant/env var
  • The chosen var is documented in frontend/.env.example
  • Defaults are consistent across metadata, robots, and sitemap

Files to touch

  • frontend/src/app/lib/metadata.ts
  • frontend/src/app/layout.tsx
  • frontend/src/app/robots.ts
  • frontend/src/app/sitemap.ts
  • frontend/.env.example

Out of scope

  • Backend env var naming

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingfrontendIssues related to frontend developmentseoSEO improvements

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions