Hey @Jennifer_G!
Welcome to The Community! ![]()
I was having some trouble with this too. I felt inspired to dig in and answer your question, but the resulting content became so a) long, and b) relevant beyond the scope of this forum, that I wrote it into a (more refined) article. I firmly believe this is the best solution for trailing slashes / duplicated content, at least on Netlify. If you could give it a good read, I think it’ll help answer your questions.
Otherwise,
To @gregraven’s point (adding a canonical tag), the good news is that Netlify is already doing that for you. Sort of. As noted here, when a request comes in to any given site’s <xyz-xyz-123>.netlify.app domain, the response is automatically sent back with a Link header specifying the canonical URL for that site. You’ll note that it has a trailing slash.
That’s not much help in figuring out your trailing-slash strategy on your custom / primary domain, but it’s a good side-note to be aware of.
–
Jon
