it seems nowadays its better to redirect www.mydomain.com to mydomain.com ? google like which one due to the latest SEO updates
The important thing is to have a universal URL structure, although i think it's better to redirect to www since that is how most webmasters link to sites.
you can redirect all pages to www or to non www. Its your choice and there is no SEO good or bad for it.
I personally hate the www. It is technically a subdomain and is unnecessary. I never type it in when navigating to a URL. I depend on the server to direct me to the www if it is used. So I never type in the http(s) or www part, assuming I will be redirected to the https or www if the admin has things configured correctly. Whatever you do, pick ONE version (with or without www) and set up a redirect (htaccess if you have it) to 301 redirect requests to the one you are not using to the one you are using. So if you decide not to use www, you would do a 301 redirect to the non-www version so all visitors and search engines will be redirected permanently to the version you use. There are literally hundreds of tutorials on the net of how to do this. Also, be sure that your DNS is set up to resolve both www and non-www to your server. Both the www and non-www should be set as A Records to your server's IP address.
You can use 301 redirection. Also you could do this by using Google web-master preferred domain feature. Here you tell Google what version you prefer.