feat: add hreflang tags and international sitemap for SEO

- Added hreflang alternates to root layout for all locales (sr, en, de, fr)
- Added hreflang alternates to [locale] layout for all locales
- Updated sitemap to include all locale variants for every page
- Google will now properly index all language versions
This commit is contained in:
Unchained
2026-03-24 11:22:22 +02:00
parent 52b2eac5b5
commit a4e7a07adb
3 changed files with 123 additions and 14 deletions

View File

@@ -2,6 +2,8 @@ import "./globals.css";
import type { Metadata, Viewport } from "next";
import ErrorBoundary from "@/components/providers/ErrorBoundary";
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://dev.manoonoils.com";
export const metadata: Metadata = {
title: {
default: "ManoonOils - Premium Natural Oils for Hair & Skin",
@@ -9,6 +11,15 @@ export const metadata: Metadata = {
},
description: "Discover our premium collection of natural oils for hair and skin care.",
robots: "index, follow",
alternates: {
canonical: baseUrl,
languages: {
sr: baseUrl,
en: `${baseUrl}/en`,
de: `${baseUrl}/de`,
fr: `${baseUrl}/fr`,
},
},
openGraph: {
title: "ManoonOils - Premium Natural Oils for Hair & Skin",
description: "Discover our premium collection of natural oils for hair and skin care.",