sites-available/mydomain.com = your domain specific rules; it is what old school guys like me call a "vhost file"
nginx.conf = the default configuration of Nginx, out of any vhost file
sites-available/default = the vhost file for the "default" website, i.e., any domain name that resolves to the server but has no specific vhost file
That's why you had to to put your custom redirect in
/etc/nginx/sites-available/default, because this is the vhost file for the default site with no custom vhost.
I think I was not that clear, so please don't worry about asking again.