feat(seo): robots.txt + sitemap.xml — crawler-kontraktet saknades (404 mätt live) #89
@@ -0,0 +1,10 @@
|
||||
import type { MetadataRoute } from "next";
|
||||
|
||||
// Publik marknadsföringssajt: crawler-vänlig men utan auth-ytor.
|
||||
// /portal, /admin och /order/* är inloggnings-ytor — ej indexerbara.
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
return {
|
||||
rules: [{ userAgent: "*", allow: "/", disallow: ["/portal/", "/admin/", "/order/", "/api/"] }],
|
||||
sitemap: "https://0pt.app/sitemap.xml",
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type { MetadataRoute } from "next";
|
||||
|
||||
const BASE = "https://0pt.app";
|
||||
const ROUTES = ["", "/tjanster", "/katalog", "/kallor", "/bestall", "/bestall/beskriv", "/bestall/forskott"];
|
||||
|
||||
export default function sitemap(): MetadataRoute.Sitemap {
|
||||
return ROUTES.map((r) => ({
|
||||
url: `${BASE}${r}`,
|
||||
lastModified: new Date(),
|
||||
changeFrequency: "weekly",
|
||||
priority: r === "" ? 1 : 0.7,
|
||||
}));
|
||||
}
|
||||
Reference in New Issue
Block a user