Skip to content

Commit 4e694a8

Browse files
mxkaskeclaude
andauthored
chore: improve SEO with canonical URLs, better titles and descriptions (#1904)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1e3a538 commit 4e694a8

File tree

19 files changed

+121
-68
lines changed

19 files changed

+121
-68
lines changed

apps/web/src/app/(landing)/blog/category/[slug]/page.tsx

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,35 @@ import {
88
} from "@/lib/metadata/shared-metadata";
99
import type { Metadata } from "next";
1010

11-
const TITLE = "Blog Category";
12-
const DESCRIPTION = "All the latest articles and news from openstatus.";
11+
export async function generateMetadata({
12+
params,
13+
}: {
14+
params: Promise<{ slug: string }>;
15+
}): Promise<Metadata> {
16+
const { slug } = await params;
17+
const TITLE = `Blog - ${slug.charAt(0).toUpperCase()}${slug.slice(1)}`;
18+
const DESCRIPTION = "All the latest articles and news from openstatus.";
1319

14-
export const metadata: Metadata = {
15-
...defaultMetadata,
16-
title: TITLE,
17-
description: DESCRIPTION,
18-
openGraph: {
19-
...ogMetadata,
20+
return {
21+
...defaultMetadata,
2022
title: TITLE,
2123
description: DESCRIPTION,
22-
},
23-
twitter: {
24-
...twitterMetadata,
25-
title: TITLE,
26-
description: DESCRIPTION,
27-
images: [`/api/og?title=${TITLE}&description=${DESCRIPTION}`],
28-
},
29-
};
24+
alternates: {
25+
canonical: `/blog/category/${slug}`,
26+
},
27+
openGraph: {
28+
...ogMetadata,
29+
title: TITLE,
30+
description: DESCRIPTION,
31+
},
32+
twitter: {
33+
...twitterMetadata,
34+
title: TITLE,
35+
description: DESCRIPTION,
36+
images: [`/api/og?title=${TITLE}&description=${DESCRIPTION}`],
37+
},
38+
};
39+
}
3040

3141
export const dynamicParams = false;
3242

apps/web/src/app/(landing)/blog/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ import Link from "next/link";
66
import { ContentCategory } from "../content-category";
77
import { ContentList } from "../content-list";
88

9-
const TITLE = "Blog";
10-
const DESCRIPTION = "All the latest articles and news from openstatus.";
9+
const TITLE = "Blog - Engineering, Product & Monitoring Insights";
10+
const DESCRIPTION =
11+
"Read engineering deep dives, product updates, and monitoring best practices from the openstatus team. Learn about uptime monitoring, incident communication, and building reliable systems.";
1112

1213
export const metadata: Metadata = {
1314
...defaultMetadata,
1415
title: TITLE,
1516
description: DESCRIPTION,
17+
alternates: {
18+
canonical: "/blog",
19+
},
1620
openGraph: {
1721
...ogMetadata,
1822
title: TITLE,

apps/web/src/app/(landing)/changelog/category/[slug]/page.tsx

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,35 @@ import {
88
} from "@/lib/metadata/shared-metadata";
99
import type { Metadata } from "next";
1010

11-
const TITLE = "Changelog Category";
12-
const DESCRIPTION = "All the latest changes and updates to openstatus.";
11+
export async function generateMetadata({
12+
params,
13+
}: {
14+
params: Promise<{ slug: string }>;
15+
}): Promise<Metadata> {
16+
const { slug } = await params;
17+
const TITLE = `Changelog - ${slug.charAt(0).toUpperCase()}${slug.slice(1)}`;
18+
const DESCRIPTION = "All the latest changes and updates to openstatus.";
1319

14-
export const metadata: Metadata = {
15-
...defaultMetadata,
16-
title: TITLE,
17-
description: DESCRIPTION,
18-
openGraph: {
19-
...ogMetadata,
20+
return {
21+
...defaultMetadata,
2022
title: TITLE,
2123
description: DESCRIPTION,
22-
},
23-
twitter: {
24-
...twitterMetadata,
25-
title: TITLE,
26-
description: DESCRIPTION,
27-
images: [`/api/og?title=${TITLE}&description=${DESCRIPTION}`],
28-
},
29-
};
24+
alternates: {
25+
canonical: `/changelog/category/${slug}`,
26+
},
27+
openGraph: {
28+
...ogMetadata,
29+
title: TITLE,
30+
description: DESCRIPTION,
31+
},
32+
twitter: {
33+
...twitterMetadata,
34+
title: TITLE,
35+
description: DESCRIPTION,
36+
images: [`/api/og?title=${TITLE}&description=${DESCRIPTION}`],
37+
},
38+
};
39+
}
3040

3141
export const dynamicParams = false;
3242

apps/web/src/app/(landing)/changelog/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ export const metadata: Metadata = {
1313
...defaultMetadata,
1414
title: TITLE,
1515
description: DESCRIPTION,
16+
alternates: {
17+
canonical: "/changelog",
18+
},
1619
openGraph: {
1720
...ogMetadata,
1821
title: TITLE,

apps/web/src/app/(landing)/compare/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ import {
1313
ContentBoxUrl,
1414
} from "../content-box";
1515

16-
const TITLE = "Compare Alternatives";
17-
const DESCRIPTION = "Compare OpenStatus with other tools.";
16+
const TITLE = "Compare Uptime Monitoring & Status Page Alternatives";
17+
const DESCRIPTION =
18+
"See how openstatus compares to BetterStack, UptimeRobot, Checkly, Instatus, and other monitoring tools. Side-by-side feature and pricing comparisons to help you choose the right solution.";
1819

1920
export const metadata: Metadata = {
2021
...defaultMetadata,
2122
title: TITLE,
2223
description: DESCRIPTION,
24+
alternates: {
25+
canonical: "/compare",
26+
},
2327
openGraph: {
2428
...ogMetadata,
2529
title: TITLE,

apps/web/src/app/(landing)/guides/category/[slug]/page.tsx

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,35 @@ import {
88
} from "@/lib/metadata/shared-metadata";
99
import type { Metadata } from "next";
1010

11-
const TITLE = "Guide Category";
12-
const DESCRIPTION = "All the latest guides from openstatus.";
11+
export async function generateMetadata({
12+
params,
13+
}: {
14+
params: Promise<{ slug: string }>;
15+
}): Promise<Metadata> {
16+
const { slug } = await params;
17+
const TITLE = `Guides - ${slug.charAt(0).toUpperCase()}${slug.slice(1)}`;
18+
const DESCRIPTION = "All the latest guides from openstatus.";
1319

14-
export const metadata: Metadata = {
15-
...defaultMetadata,
16-
title: TITLE,
17-
description: DESCRIPTION,
18-
openGraph: {
19-
...ogMetadata,
20+
return {
21+
...defaultMetadata,
2022
title: TITLE,
2123
description: DESCRIPTION,
22-
},
23-
twitter: {
24-
...twitterMetadata,
25-
title: TITLE,
26-
description: DESCRIPTION,
27-
images: [`/api/og?title=${TITLE}&description=${DESCRIPTION}`],
28-
},
29-
};
24+
alternates: {
25+
canonical: `/guides/category/${slug}`,
26+
},
27+
openGraph: {
28+
...ogMetadata,
29+
title: TITLE,
30+
description: DESCRIPTION,
31+
},
32+
twitter: {
33+
...twitterMetadata,
34+
title: TITLE,
35+
description: DESCRIPTION,
36+
images: [`/api/og?title=${TITLE}&description=${DESCRIPTION}`],
37+
},
38+
};
39+
}
3040

3141
export const dynamicParams = false;
3242

apps/web/src/app/(landing)/guides/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ export const metadata: Metadata = {
1212
...defaultMetadata,
1313
title: TITLE,
1414
description: DESCRIPTION,
15+
alternates: {
16+
canonical: "/guides",
17+
},
1518
openGraph: {
1619
...ogMetadata,
1720
title: TITLE,

apps/web/src/app/(landing)/oss-friends/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export const metadata: Metadata = {
2020
...defaultMetadata,
2121
title: TITLE,
2222
description: DESCRIPTION,
23+
alternates: {
24+
canonical: "/oss-friends",
25+
},
2326
openGraph: {
2427
...ogMetadata,
2528
title: TITLE,

apps/web/src/app/(landing)/play/checker/[slug]/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ export async function generateMetadata({
3535
const { slug } = await params;
3636
const page = getToolsPage("checker-slug");
3737

38-
const metadata = getPageMetadata(page);
38+
const metadata = {
39+
...getPageMetadata(page, "play"),
40+
alternates: { canonical: `${BASE_URL}/play/checker/${slug}` },
41+
};
3942

4043
const data =
4144
process.env.NODE_ENV === "development"

apps/web/src/app/(landing)/play/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export const metadata: Metadata = {
1919
...defaultMetadata,
2020
title: TITLE,
2121
description: DESCRIPTION,
22+
alternates: {
23+
canonical: "/play",
24+
},
2225
openGraph: {
2326
...ogMetadata,
2427
title: TITLE,

0 commit comments

Comments
 (0)