Skip to content

Commit b929c4b

Browse files
committed
fix metadata base to set proper canonical urls
1 parent e767029 commit b929c4b

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

apps/dashboard/next-sitemap.config.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ module.exports = {
4848
policies: [
4949
{
5050
userAgent: "*",
51-
[process.env.VERCEL_ENV !== "preview" &&
52-
process.env.VERCEL_ENV !== "development"
53-
? "allow"
54-
: "disallow"]: "/",
51+
// allow all if production
52+
allow: process.env.VERCEL_ENV === "production" ? ["/"] : [],
53+
// disallow all if not production
54+
disallow:
55+
process.env.VERCEL_ENV !== "production"
56+
? ["/"]
57+
: // disallow `/team` and `/team/*` if production
58+
["/team", "/team/*"],
5559
},
5660
],
5761
},

apps/dashboard/src/app/layout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ const fontSans = Inter({
1717
});
1818

1919
export const metadata: Metadata = {
20+
metadataBase: new URL("https://thirdweb.com"),
21+
alternates: {
22+
canonical: "./",
23+
},
2024
title: "thirdweb: The complete web3 development platform",
2125
description:
2226
"Build web3 apps easily with thirdweb's powerful SDKs, audited smart contracts, and developer tools—for Ethereum & 700+ EVM chains. Try now.",

apps/dashboard/src/app/login/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
import type { Metadata } from "next";
12
import { redirect } from "next/navigation";
23
import { getRawAccount } from "../account/settings/getAccount";
34
import { LoginAndOnboardingPage } from "./LoginPage";
45
import { isOnboardingComplete } from "./onboarding/isOnboardingRequired";
56

7+
export const metadata: Metadata = {
8+
robots: {},
9+
};
10+
611
export default async function Page(props: {
712
searchParams: Promise<{
813
next?: string;

0 commit comments

Comments
 (0)