I am having trouble updating the URL of my first uploaded website that I made from scratch. I have changed the the URL and have submitted to Google, but when I type in the name 'example' into Google my old website URL (www.example.com/example/) is displayed with the old title and meta tags. However when I type in example.com, which is the new URL, it shows first and it's the correct website with the correct tags and title.How can I make the old URL http://www.example.com/example to just example.com? I have taken out the www. from the new URL, would that be a problem? 
How to update my website's URL in Google from www to non-www
google search console;google search;url