Netlify creating two urls of a page

Netlify seems to be creating two urls of every page on my site.

For example /contact/ and /contact.html

How can I prevent this? Currently, I have Netlify’s Pretty Urls disabled, so I’d like only /contact.html.

When I use ‘Hugo server’ locally, the /contact/ version of the page would 404, but that is not the case when deployed to Netlify

That is not something you can disable. If you don’t link to both, you won’t have any possibility for SEO penalty or for google discovering both.

@fool any particular reason why Netlify does this? Is there any way to create a rewrite/redirect to overcome the issue?

We do that so you can choose to use the shorter URL if you’d like.

I suppose you could create a redirect for every individual URL (there is no facility for *.html => *(without html), or vice versa), but that seems pretty painful, and I can’t see the point of doing it.

The real solution is as I mentioned: not to link to the one you don’t use; nobody is going to “guess” it, least of all search engines, whose opinions are the only ones that I can see that might matter…

If you have another concern besides the potential SEO hit for duplicated content, I’ll be happy to talk through it with you if you would elaborate.