1. Go to https://accounts.google.com/ManageDomains.
  2. Write your domain name without the subdomain in the field (eg: mydomain.com, not gallery.mydomain.com) and click on Add domain.
  3. Click on Manage [mydomain.com] and agree with the ToS.
  4. Write your domain name WITH the subdomain (even if it is www) and the http:// prefix in the first field and save.