301 redirect of non-www URLs

I accidentally manually indexed a couple of URLs without the ‘www’ part and now have duplicate pages indexed.

Is there a way to redirect the non-www URLs to proper www URLs? Seems like this is not possible in the site SEO settings.

Not sure if relevant but all these URL are CMS pages.

This happens automatically when you set your www domain as the default domain.