Implement multi-domain SEO improvements:
- Add metadata to login and login-verify pages to prevent indexing. - Update robots.txt to disallow additional sensitive paths. - Enhance sitemap generation to filter by city and include accurate last modified dates. - Refactor canonical URL generation to support multi-domain architecture, ensuring self-canonicalization for city domains. - Remove deprecated CanonicalHandler component and streamline canonical URL handling. - Introduce safe JSON-LD output to prevent XSS vulnerabilities. - Add payment layout with appropriate metadata to prevent indexing. - Conduct a comprehensive technical SEO audit and implement necessary fixes across the application.
This commit is contained in:
+16
-2
@@ -4,7 +4,20 @@ import { buildDoctorParams } from "@/helper";
|
||||
import { getStateInfo } from "@/lib/getStateInfo";
|
||||
import { fetchReq } from "@/lib/req";
|
||||
|
||||
export async function generateMetadata() {
|
||||
|
||||
const FILTER_KEYS = ["specialty", "state", "city", "gender", "degree", "active", "sort", "name"];
|
||||
|
||||
// جستجوی داخلی و ترکیب چند فیلتر نباید ایندکس شوند — crawl budget و duplicate
|
||||
function listingRobots(params) {
|
||||
const activeFilters = FILTER_KEYS.filter((key) => params?.[key]);
|
||||
if (params?.name || activeFilters.length >= 2) {
|
||||
return { robots: { index: false, follow: true } };
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
export async function generateMetadata({ searchParams }) {
|
||||
const awaitedParams = await searchParams;
|
||||
const { matchedCity, matchedState } = await getStateInfo();
|
||||
const siteName = matchedCity?.site_name || "نوبت 724";
|
||||
const cityName = matchedCity?.name || matchedState?.name || "";
|
||||
@@ -14,10 +27,11 @@ export async function generateMetadata() {
|
||||
const description = cityName
|
||||
? `لیست پزشکان متخصص در ${cityName}. جستجو بر اساس تخصص و منطقه. رزرو آنلاین نوبت پزشکی در ${cityName}.`
|
||||
: `جستجوی پزشکان متخصص در سراسر کشور. رزرو آنلاین نوبت پزشکی سریع و آسان با نوبت 724.`;
|
||||
const image = "https://www.nobat724.com/assets/images/logo.png";
|
||||
const image = "https://nobat724.com/assets/images/logo.png";
|
||||
return {
|
||||
title,
|
||||
description,
|
||||
...listingRobots(awaitedParams),
|
||||
openGraph: { title, description, images: [image] },
|
||||
twitter: { card: "summary_large_image", title, description, images: [image] },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user