Going by search console standards the index.html has the same content as the root UR so this is considered duplicate content. I already have setup a canonical tag in the header but the index.html is still available for people to visit.
Because I use hugo to render my website with Netlify as the backend I was looking for a way to redirect the index.html back to the root of each page.
I like to know if Hugo has this type of function build in.
Something similar like the PHP version like this:
RewriteRule ^index.html$ / [R=301,L]
RewriteRule ^(.*)/index.html$ /$1/ [R=301,L]
Hope that this gives a better understanding of what I am looking to solve.