From 744f60d8c6eb5f3b7645a12e5947abc47a5a0802 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Fri, 13 Mar 2026 13:00:24 +0100 Subject: [PATCH] Fix SEO: www canonical, add og:image and JSON-LD - Change canonical/sitemap/robots URLs from policyengine.org to www.policyengine.org (non-www 307-redirects to www, causing a confusing canonical loop that prevents Google indexing) - Add og:image and twitter:image for social share previews - Add WebApplication JSON-LD structured data for rich snippets - Fix sitemap lastModified to use fixed date instead of new Date() Co-Authored-By: Claude Opus 4.6 --- frontend/app/layout.tsx | 33 ++++++++++++++++++++++++++++++++- frontend/app/robots.ts | 2 +- frontend/app/sitemap.ts | 4 ++-- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx index 499bfbd..909f150 100644 --- a/frontend/app/layout.tsx +++ b/frontend/app/layout.tsx @@ -12,7 +12,7 @@ const inter = Inter({ display: 'swap', }); -const SITE_URL = 'https://policyengine.org/us/keep-your-pay-act'; +const SITE_URL = 'https://www.policyengine.org/us/keep-your-pay-act'; export const metadata: Metadata = { title: 'Keep Your Pay Act Calculator', @@ -30,12 +30,22 @@ export const metadata: Metadata = { siteName: 'PolicyEngine', type: 'website', locale: 'en_US', + images: [ + { + url: 'https://www.policyengine.org/assets/posts/keep-your-pay-act-calculator.png', + width: 1200, + height: 630, + }, + ], }, twitter: { card: 'summary_large_image', title: 'Keep Your Pay Act Calculator', description: 'Calculate your personal and national tax impact under the Keep Your Pay Act.', + images: [ + 'https://www.policyengine.org/assets/posts/keep-your-pay-act-calculator.png', + ], }, other: { 'theme-color': '#2C7A7B', @@ -57,6 +67,27 @@ export default function RootLayout({ return ( +