Sitemap has trailing slash for homepage
I believe the problem is related to this issue, but wasn't quite sure how to implement the fix.
The homepage has a trailing slash for the first page, which is a problem for SEO because Google / other search engines think it's a different page since the default version of the homepage does not have a trailing slash.
Any idea how we fix?
Not sure how to fix this issue for now.
Btw, I noticed the issue also appears on https://astro.build/sitemap-0.xml.
@saicaca
import { defineConfig } from "astro/config";
import sitemap from "@astrojs/sitemap";
// https://astro.build/config
export default defineConfig({
site: "https://kb.l4ph.moe",
trailingSlash: "never",
integrations: [sitemap()]
});
As mentioned above, it seems that the problem can be solved by setting trailingSlash: "never", but I think that doing this is likely to cause problems with the application itself, so I will investigate this a bit myself.
@davidvkimball
Could you please tell me what behavior you would like to see?
If you probably want to be strict and set it yourself, using trailingSlash: "never" should solve the problem.
https://docs.astro.build/en/reference/configuration-reference/#trailingslash
@L4Ph
in xhtmllink we have 'end slash', it's problem