Redirect domain to www

Hi,

I have recently installed Mail-In-A-Box on my server and except problem with my reverse DNS configuration on OVH, it works fine.

However, when I try to acces mydomain.net it redirect to box.mydomain.net. I would like to redirect mydomain.net to www.mydomain.net.
Is it possible ?
I tried CNAME redirection but it does not the job.

From my setup @joshData told me that i need to make domain alias and pointing A www to the ip. So it will work. I also do like that. Work like charm.

This is how to have your www.mydomain.net pointing to an IP, not mydomain.net pointing to www.mydomain.net.
Perhaps I don’t understood your answer.

if you want like that just edit your nginx config (for mydomain.net config)

put in your ssl and tls (80 and 443)

remove return 301 https://mydomain.net$request_uri; //make sure your comment your return 301

and replace

location = / {
return 301 https://www.mydomain.net$request_uri;
}

do you just copy and paste the SSL cert in the directory?