Site name - silly-keller-2bc6e2
domain - swiadomypodpis.pl
- Did you try Ask Netlify, our generative AI chatbot, before posting? It pulls info from Support Guides and recent solved forums posts. - YES!
We are facing a constant issue with a trailing slash being added to our URLs in a static site generated by nuxt generate. We have Pretty URL disabled.
Here is how the problem looks:
Whenever we visit our page and navigate to subpages like “/umowy-b2b”, Netlify adds a trailing slash at the end of the URL - “umowy-b2b/”, which causes two things:
- Google thinks there’s another URL with the same content, indicating duplication in URLs.
- We fetch page data from the CMS based on the URL (data like description, title, etc., for translation purposes), so with the mismatched URL, the data is not requested.
What we have tried:
- Adding _redirect to Netlify with content like “umowy-b2b/ umowy-b2b 301!”, which causes an infinite redirect loop.
- Adding a redirect directly as Nuxt middleware.
- Adding a canonical URL to every page.
- Fixing sitemaps.
Nothing seems to help; Netlify still adds trailing slashes, which causes Google to misunderstand the page content and proper links, leading to SEO errors, incorrect URLs in Google search results, and issues in ads.