Link Not Found
++ This link does not exist. Please check the URL and try again. +
+ + Create Your Free Branded Link + +From 2a9e0761cf1c0d0e9ad46bda9b99edd4295bc2ac Mon Sep 17 00:00:00 2001
From: Steven Tey
@@ -38,7 +38,7 @@ export default async function ExpiredPage({ new one.
Create Your Free Branded Link diff --git a/apps/web/app/not-found/[domain]/page.tsx b/apps/web/app/not-found/[domain]/page.tsx new file mode 100644 index 0000000000..bb8f91e5ca --- /dev/null +++ b/apps/web/app/not-found/[domain]/page.tsx @@ -0,0 +1,49 @@ +import { getDomainViaEdge } from "@/lib/planetscale/get-domain-via-edge"; +import { Background, Footer, Nav, NavMobile } from "@dub/ui"; +import { constructMetadata } from "@dub/utils"; +import { redirect } from "next/navigation"; + +export const runtime = "edge"; + +export const metadata = constructMetadata({ + title: "Link Not Found – Dub.co", + description: + "This link does not exist on Dub.co. Please check the URL and try again.", + noIndex: true, +}); + +export default async function NotFoundLinkPage({ + params, +}: { + params: { domain: string }; +}) { + const domain = await getDomainViaEdge(params.domain); + + if (domain?.notFoundUrl) { + redirect(domain.notFoundUrl); + } + + return ( ++ This link does not exist. Please check the URL and try again. +
+ + Create Your Free Branded Link + +