Main route without trailing slash

tunecino
5
tunecino
commented 2 months ago

Is there a way to include the main page url without a trailing slash? Like https://example.com instead of https://example.com/ ?

I can exclude the main route but I didn't find a way to manually include a full path without programmatically involve hostname.

Thanks.

0
NicoPennec
2.0k
NicoPennec
commented 2 months ago

No, you can't sorry. Each URL is normalized and the valid URL is with a trailing slash (see https://www.sitemaps.org/protocol.html and https://tools.ietf.org/html/rfc3986#section-6.2.3).

Your web browser and Google see the see these two URLs as equivalent:

Why do you want to do this?

1
tunecino
5
tunecino
commented 2 months ago

Just confused by following sample in a first result search as I googled sitemap example: https://statcounter.com/insights/seo/sitemap-example

Thank you @NicoPennec for clarification and links.

1
Informations
Question โ€ข Resolved
#c89 - Created 2 months ago