Test Post - 01

Test Post 01


name: Marketing SEO gaps overview: "Close the three remaining marketing SEO gaps without turning indexing on: an absolute home title, self-canonicals for blog pages, and a build-time redirect map for www-to-apex plus the two footer paths that have no pages." todos:

  • id: home-title content: Use absolute home title so the brand template is not applied twice status: pending
  • id: blog-canonical content: generateMetadata canonical and prev/next for blog pagination, gated on indexing status: pending
  • id: redirects content: "next.config redirects: www to apex from SITE_URL, plus /contact and /careers to /#faq" status: pending
  • id: docs content: Changelog and architecture note; keep indexing fail-closed status: pending isProject: false

Marketing SEO gaps

Indexing stays fail-closed. Do not change allowMarketingIndexing, the root layout robots: { index: false }, or the X-Robots-Tag headers in next.config.ts. Canonicals and the sitemap still appear only when NEXT_PUBLIC_ALLOW_INDEXING=true.

Absolute home title

In src/app/(marketing)/page.tsx, the home title is a plain string under the marketing layout template `%s | ${SITE_BRAND}`, so it renders as “StartUp Factory | Build a Startup from Idea to Company | StartUp Factory”.

Set title: { absolute: DEFAULT_HOME_TITLE } so the template is skipped. Leave the layout template in place for About, Privacy, Terms, and Blog.

Blog pagination canonicals

src/app/(marketing)/blog/page.tsx exports a static canonical: "/blog" for every page.

Replace that with generateMetadata that reads searchParams.page (same clamp as the page: invalid or missing becomes page 1):

  • Page 1: canonical /blog
  • Page 2+: canonical /blog?page=N
  • Still only when allowMarketingIndexing() is true
  • Add Next pagination.previous / pagination.next for the same pages when indexing is on (omit previous on page 1; omit next on the last page — last page needs total from fetchPublicBlogList, which this page already calls)

Put the path helper next to canonicalPath in src/lib/marketing/seo.ts and cover it with a small node test beside the existing robots test.

Redirects

Add a pure builder, same style as robots-rules.ts, and call it from redirects() in next.config.ts.

  • www to apex: only if NEXT_PUBLIC_SITE_URL is a valid https:// URL. Strip a leading www. from that host and 301 www.<apex>/:path* to https://<apex>/:path*. If the env var is missing or not https, emit no host redirect (local dev stays unchanged). This does not depend on the indexing flag.
  • Legacy paths: the only public labels with no route are footer Contact and Careers, both already pointed at /#faq in Footer.tsx. 301 /contact and /careers to /#faq. List these before the host catch-all.

Do not add a broad trailing-slash rule or redirects for /build and /admin.

Docs

Add docs/changelog/2026-10-08-marketing-seo-gaps.md and one line in docs/architecture/ARCHITECTURE.md that www-to-apex and /contact /careers are app redirects, not only Amplify/DNS.

Test Post - 01 | StartUp Factory