Fix Lighthouse SEO metadata issues

This commit is contained in:
AmirReza Jamali
2026-06-17 13:51:49 +03:30
parent 635ca32b3a
commit 85d1fbb20d
11 changed files with 106 additions and 15 deletions
+3 -6
View File
@@ -1,6 +1,5 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { headers } from "next/headers";
import Image from "next/image";
import Link from "next/link";
import { Suspense } from "react";
@@ -19,7 +18,7 @@ const geistMono = Geist_Mono({
});
export const metadata: Metadata = {
metadataBase: new URL("https://opplens.com"),
metadataBase: new URL("https://opplenz.com"),
title: "Opp lens - AI-Powered Tender Management",
description:
"Democratizing Tender Access for SMEs with AI-Powered Tender Management.",
@@ -81,13 +80,11 @@ function ContactInfo({
);
}
export default async function RootLayout({
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const domain = (await headers()).get("host")?.replace("www.", "");
const contactInfo = [
{
icon: "/Message.svg",
@@ -128,7 +125,7 @@ export default async function RootLayout({
</Link>
</section>
<Suspense>
<NavigationBar host={domain ?? "opplens.com"} />
<NavigationBar />
</Suspense>
</header>
+2 -2
View File
@@ -11,7 +11,7 @@ export const metadata: Metadata = {
openGraph: {
title: "Opp lens - AI-Powered Tender Management",
description: "Win more tenders automatically with our AI-powered platform",
url: "https://opplens.com/",
url: "https://opplenz.com/",
type: "website",
locale: "en_US",
siteName: "Opp lens",
@@ -23,7 +23,7 @@ export const metadata: Metadata = {
images: ["/images/opp-lens-mobile.jpg"],
},
alternates: {
canonical: "https://opplens.com/",
canonical: "https://opplenz.com/",
},
robots: {
index: true,
+8 -2
View File
@@ -18,8 +18,14 @@ const geistMono = Geist_Mono({
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
metadataBase: new URL("https://opplenz.com"),
title: "Page Not Found | Opp lens",
description:
"Opp lens helps SMEs find relevant tenders, automate document handling, and get real-time alerts for new opportunities.",
robots: {
index: false,
follow: true,
},
icons: {
icon: "/fav-icon.svg",
},
+1 -1
View File
@@ -2,7 +2,7 @@
import Link from "next/link";
import { usePathname } from "next/navigation";
const NavigationBar = ({ host }: { host: string }) => {
const NavigationBar = ({ host = "opplenz.com" }: { host?: string }) => {
const pathname = usePathname();
return (
+40
View File
@@ -0,0 +1,40 @@
import "./globals.css";
const description =
"Opp lens helps SMEs find relevant tenders, automate document handling, and get real-time alerts for new opportunities.";
export default function GlobalNotFound() {
return (
<html lang="en">
<head>
<title>Page Not Found | Opp lens</title>
<meta
name="description"
content={description}
/>
<meta
name="robots"
content="noindex, follow"
/>
<link
rel="icon"
href="/fav-icon.svg"
/>
</head>
<body>
<main className="min-h-screen px-6 py-16 flex flex-col items-center justify-center text-center">
<h1 className="text-3xl font-bold text-[#013280]">Page not found</h1>
<p className="mt-4 max-w-xl text-[#777]">
Sorry, the page you are looking for does not exist or has been
removed.
</p>
<a
href="/"
className="mt-8 rounded-full bg-(--primary) px-8 py-4 text-white">
Home
</a>
</main>
</body>
</html>
);
}
+13
View File
@@ -0,0 +1,13 @@
import type { MetadataRoute } from "next";
const siteUrl = "https://opplenz.com";
export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: "*",
allow: "/",
},
sitemap: `${siteUrl}/sitemap.xml`,
};
}
+26
View File
@@ -0,0 +1,26 @@
import type { MetadataRoute } from "next";
const siteUrl = "https://opplenz.com";
export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: siteUrl,
lastModified: new Date(),
changeFrequency: "weekly",
priority: 1,
},
{
url: `${siteUrl}/contact-us`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.7,
},
{
url: `${siteUrl}/marketing`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.6,
},
];
}
+3 -1
View File
@@ -4,6 +4,8 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="Contact Opp lens to learn how AI-powered tender management helps SMEs find relevant tenders and win more opportunities.">
<link rel="canonical" href="https://opplenz.com/contact-us">
<link rel="icon" type="image/x-icon" href="assets/image/favicon.ico">
<title>Opplens</title>
<link rel="stylesheet" href="assets/css/style.css">
@@ -156,4 +158,4 @@
<script src="assets/js/main.js"></script>
</body>
</html>
</html>
+3 -1
View File
@@ -4,6 +4,8 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="Opp lens helps SMEs compete for public and private tenders with AI-powered discovery, preparation support, and opportunity alerts.">
<link rel="canonical" href="https://opplenz.com/email-marketing">
<link rel="icon" type="image/x-icon" href="assets/image/favicon.ico">
<title>Opplens</title>
<link rel="stylesheet" href="assets/css/style.css">
@@ -258,4 +260,4 @@
<script src="assets/js/main.js"></script>
</body>
</html>
</html>
+3 -1
View File
@@ -4,6 +4,8 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="Automated tender management platform for SMEs. Find tailored tenders, automate document handling, and get real-time alerts.">
<link rel="canonical" href="https://opplenz.com/">
<link rel="icon" type="image/x-icon" href="assets/image/favicon.ico">
<title>Opplens</title>
<link rel="stylesheet" href="assets/css/style.css">
@@ -151,4 +153,4 @@
<script src="assets/js/main.js"></script>
</body>
</html>
</html>
+4 -1
View File
@@ -1,7 +1,10 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
experimental: {
globalNotFound: true,
},
htmlLimitedBots: /.*/,
};
export default nextConfig;