Are you stymied by mydomain.com and www. mydomain.com ending up in different places, even though they should not? If your domain is on a server that uses Apache, and if you have access to the Apache directory (typically /etc/apache2), then it could be an easy fix.
In the Apache available sites directory (/etc/apache2/sites-available) should be an entry for each domain hosted on the server. It's common to copy and paste an existing one domain as a template for another.
Editing the file /etc/apache2/sites-enabled/mydomain.com shows the following:
Options Indexes FollowSymLinks MultiViews
allow from all
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
CustomLog /var/log/apache2/access.log combined
It's the serveralias line that is the important one. This line instructs Apache to accept the alias as an alias for the domain name. Without it, the web server could send the user to the server root directory, which on my server would be /var/www.
While you are checking settings, it could well be worth ensuring that the DNS settings for the domain contain an A or C record titled www that points to the same location as the domain record.