Skip to content

Commit ade9eaa

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

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-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.",

0 commit comments

Comments
 (0)