Skip to content

Full Toolkit for Next-Level Domain Analysis

Add og & canonical tags 🚀

Felix Wotschofsky7256b82c965f
diff --git a/app/layout.tsx b/app/layout.tsx
index 2995e42..911b081 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -10,6 +10,15 @@ export const metadata = {
title: 'Domain Digger: DNS, WHOIS lookup & more',
description:
'Domain Digger is the easy but incredibly powerful tool for looking up and quickly inspecting DNS records, WHOIS data, SSL/TLS certificate history and other domain related data. No installation required!',
+ openGraph: {
+ title: 'Domain Digger: DNS, WHOIS lookup & more',
+ description:
+ 'Domain Digger is the easy but incredibly powerful tool for looking up and quickly inspecting DNS records, WHOIS data, SSL/TLS certificate history and other domain related data. No installation required!',
+ url: process.env.SITE_URL,
+ },
+ alternates: {
+ canonical: process.env.SITE_URL,
+ },
};
type RootLayoutProps = {
diff --git a/app/lookup/[domain]/layout.tsx b/app/lookup/[domain]/layout.tsx
index b706f19..82ea988 100644
--- a/app/lookup/[domain]/layout.tsx
+++ b/app/lookup/[domain]/layout.tsx
@@ -18,6 +18,15 @@ export const generateMetadata = ({
}: LookupLayoutProps): Metadata => ({
title: `Results for ${domain} - Domain Digger`,
description: `Find DNS records, WHOIS data, SSL/TLS certificate history and other for ${domain}`,
+ openGraph: {
+ title: `Results for ${domain} - Domain Digger`,
+ description: `Find DNS records, WHOIS data, SSL/TLS certificate history and other for ${domain}`,
+ url: process.env.SITE_URL && `${process.env.SITE_URL}/lookup/${domain}`,
+ },
+ alternates: {
+ canonical:
+ process.env.SITE_URL && `${process.env.SITE_URL}/lookup/${domain}`,
+ },
});
const LookupLayout: FC<LookupLayoutProps> = ({
diff --git a/app/lookup/[domain]/opengraph-image.tsx b/app/lookup/[domain]/opengraph-image.tsx
new file mode 100644
index 0000000..71cd3a0
--- /dev/null
+++ b/app/lookup/[domain]/opengraph-image.tsx
@@ -0,0 +1,77 @@
+import { ImageResponse } from 'next/server';
+
+export const runtime = 'edge';
+export const contentType = 'image/png';
+
+const interRegularFontP = fetch(
+ new URL('https://fonts.bunny.net/inter/files/inter-latin-400-normal.woff')
+).then((res) => res.arrayBuffer());
+
+const interBoldFontP = fetch(
+ new URL('https://fonts.bunny.net/inter/files/inter-latin-700-normal.woff')
+).then((res) => res.arrayBuffer());
+
+export const handler = async ({ params }: { params: { domain: string } }) => {
+ const [interRegularFont, interBoldFont] = await Promise.all([
+ interRegularFontP,
+ interBoldFontP,
+ ]);
+
+ return new ImageResponse(
+ (
+ <div
+ style={{
+ display: 'flex',
+ width: '100%',
+ height: '100%',
+ flexDirection: 'column',
+ justifyContent: 'center',
+ gap: 16,
+ backgroundColor: '#fff',
+ padding: 48,
+ }}
+ >
+ <span
+ style={{
+ fontSize: 32,
+ color: '#000',
+ }}
+ >
+ Domain Digger
+ </span>
+ <span style={{ fontSize: 48, fontWeight: 700 }}>
+ Results for {params.domain}
+ </span>
+ <span
+ style={{
+ color: 'gray',
+ fontSize: 32,
+ marginTop: 32,
+ }}
+ >
+ DNS records, WHOIS data, SSL/TLS certificates & more
+ </span>
+ </div>
+ ),
+ {
+ width: 1200,
+ height: 630,
+ fonts: [
+ {
+ name: 'Inter',
+ data: interRegularFont,
+ style: 'normal',
+ weight: 400,
+ },
+ {
+ name: 'Inter',
+ data: interBoldFont,
+ style: 'normal',
+ weight: 700,
+ },
+ ],
+ }
+ );
+};
+
+export default handler;
diff --git a/app/opengraph-image.tsx b/app/opengraph-image.tsx
new file mode 100644
index 0000000..3869465
--- /dev/null
+++ b/app/opengraph-image.tsx
@@ -0,0 +1,75 @@
+import { ImageResponse } from 'next/server';
+
+export const runtime = 'edge';
+export const contentType = 'image/png';
+
+const interRegularFontP = fetch(
+ new URL('https://fonts.bunny.net/inter/files/inter-latin-400-normal.woff')
+).then((res) => res.arrayBuffer());
+
+const interBoldFontP = fetch(
+ new URL('https://fonts.bunny.net/inter/files/inter-latin-700-normal.woff')
+).then((res) => res.arrayBuffer());
+
+export const handler = async () => {
+ const [interRegularFont, interBoldFont] = await Promise.all([
+ interRegularFontP,
+ interBoldFontP,
+ ]);
+
+ return new ImageResponse(
+ (
+ <div
+ style={{
+ display: 'flex',
+ width: '100%',
+ height: '100%',
+ flexDirection: 'column',
+ justifyContent: 'center',
+ gap: 16,
+ backgroundColor: '#fff',
+ padding: 48,
+ }}
+ >
+ <span
+ style={{
+ fontSize: 48,
+ color: '#000',
+ fontWeight: 700,
+ }}
+ >
+ Domain Digger
+ </span>
+ <span
+ style={{
+ color: 'gray',
+ fontSize: 32,
+ marginTop: 32,
+ }}
+ >
+ DNS records, WHOIS data, SSL/TLS certificates & more
+ </span>
+ </div>
+ ),
+ {
+ width: 1200,
+ height: 630,
+ fonts: [
+ {
+ name: 'Inter',
+ data: interRegularFont,
+ style: 'normal',
+ weight: 400,
+ },
+ {
+ name: 'Inter',
+ data: interBoldFont,
+ style: 'normal',
+ weight: 700,
+ },
+ ],
+ }
+ );
+};
+
+export default handler;
diff --git a/app/robots.txt b/app/robots.txt
new file mode 100644
index 0000000..f6e6d1d
--- /dev/null
+++ b/app/robots.txt
@@ -0,0 +1,2 @@
+User-Agent: *
+Allow: /