I think I found a solution. Leave it as it may be useful to others.
I need to wait now for Google to reindex, but it needs to. In accordance with this question and this google article, the canonical link tag in your head should fix it.
<link rel="canonical" href="http://www.[website-url]"/>
I also added the js redirect trick to redirect people from google.
if ( window.self === window.top ) { // console.log("not in a frame") window.location.href = 'http://www.[website-url]'; }
source share