Woho! You can now host your static assets or website on Skygear.io cloud with custom domains. Perfect for users who wish to use their own domain.
The default domain of your assets hosted on Skygear is
<myappname>.skygeario.com/static. Now you can make it myappname.com by setting your own domain instead. You can set the custom domain under ‘HOSTING’ in Skygear.io Developer Portal.
You will need to verify the domain and configure an A/CNAME record to use a custom domain.
Verify your domain
Let’s say you are the domain name owner of myappname.com, by entering the domain at the Skygear developer portal, you will be instructed to verify the domain by adding a TXT record with value generated from the portal, at your DNS provider.
After adding the TXT record at your DNS provider, you can come back and click verify.
It may take a few minutes to hours for the TXT record to be effective. So if you have problems verifying the domain, please try again a few minutes later.
Add the A/CNAME Record
Once the TXT record is verified, you need to add an A or CNAME records depends on if you’re using a root or sub-domains. Add the A record value to your DNS provider, come back and click configure to configure the domain.
Host static assets or redirect the domain
When everything is set, you should be able to visit the static content hosted at Skygear with myappname.com (i.e. your domain).
Moreover, you can select whether you want this domain to serve static content on your Skygear app or redirect to other website (or a simple
www to non-www redirect). For example, you can further redirect your domain myappnameapp.com to github.com/your-project-name by setting it up at Skygear.
Give us a shout if you have any questions!