Setting up a custom domain, or subdomain, is easy to do and can be configured in just a few minutes. You will need access to your domain name's DNS configuration area to set custom DNS records. This is done through your domain registrar, which is where the purchase and renewal of your domain name is managed.
When you have access to configure your DNS records, simply add a new CNAME or A record for your domain or subdomain, and point it to your Commerce Ray hostname.
For example, if your Commerce Ray hostname is
delightful-promise.commercerays.com you can create a CNAME or A record for
shop.mydomain.com to point to
delightful-promise.commercerays.com. Any traffic for
shop.mydomain.com will then be directed to your Commerce Ray.
Here are some useful links for setting up DNS on various common hosting providers: