Static site: Redirecting non-trailing slash URLs to trailing-slash

Currently, every URL of my Hugo site work with and without a trailing slash. Search engines may see this as duplicate content and treat each URL as a separate page.

I would like to redirect any hit without / at the end to the / version.

So if someone visit , they will be redirected to the version (with slash).

How can I achieve it with Render?

You might be better off just adding a canonical URL link tag, so a redirect isn’t necessary for handling the SEO case. Consolidate Duplicate URLs with Canonicals | Google Search Central  |  Google Developers