From 1d7f8878da6466eaa6484fb69d6649b8f927d8e3 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sun, 21 Jan 2024 22:38:52 +0100 Subject: [PATCH] fix: add protocol to sitemap url --- src/routes/robots.txt/+server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/robots.txt/+server.ts b/src/routes/robots.txt/+server.ts index 33556c6..1a1bf6b 100644 --- a/src/routes/robots.txt/+server.ts +++ b/src/routes/robots.txt/+server.ts @@ -31,7 +31,7 @@ export async function GET() { * @returns {string} robots.txt content. */ function generateRobotsTxt(siteUrl: string, config: { agent: string; disallow: string[] }[]) { - return `Sitemap: ${siteUrl}/sitemap.xml + return `Sitemap: https://${siteUrl}/sitemap.xml # https://developers.google.com/search/docs/advanced/sitemaps/build-sitemap#addsitemap # https://www.robotstxt.org/robotstxt.html