Both were a genuine 404 on the live site (checked via curl against
settlekit-web.onrender.com, the real current deployment) -- the Next app
had no app/robots.ts or app/sitemap.ts at all. Also found while checking
this: settlekit.dev (the domain hardcoded as metadataBase in layout.tsx,
and referenced in every og:image/canonical tag) is not actually serving
this app -- it 200s with a different, stale title ("SettleKit - Settlement
Engine for Payment Processors", Last-Modified Aug 28) on an account this
environment's Cloudflare token has no zone access to. That DNS/deployment
cutover is a real, confirmed owner-only blocker (same shape as the
previously-flagged Render env-var cutover in plans/settlekit.md), not
something fixed here.
Resolves SITE_URL from RENDER_EXTERNAL_URL (set automatically by Render)
so robots.txt/sitemap.xml are correct on the actual live onrender.com URL
right now, and will self-correct once settlekit.dev is cut over.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
23 lines
792 B
TypeScript
23 lines
792 B
TypeScript
import type { MetadataRoute } from "next";
|
|
|
|
// SITE_URL resolves to the real domain this instance is actually serving:
|
|
// Render injects RENDER_EXTERNAL_URL automatically for every service, so this
|
|
// is correct both on the current settlekit-web.onrender.com deployment and
|
|
// after settlekit.dev's DNS is pointed at it (owner-only step, not available
|
|
// from this environment -- confirmed 2026-10-25 that settlekit.dev's zone
|
|
// isn't on the Cloudflare account this environment has a token for).
|
|
const SITE_URL =
|
|
process.env.NEXT_PUBLIC_SITE_URL ||
|
|
process.env.RENDER_EXTERNAL_URL ||
|
|
"https://settlekit.dev";
|
|
|
|
export default function robots(): MetadataRoute.Robots {
|
|
return {
|
|
rules: {
|
|
userAgent: "*",
|
|
allow: "/",
|
|
},
|
|
sitemap: `${SITE_URL}/sitemap.xml`,
|
|
};
|
|
}
|