Once you have gone through the trouble of setting up your static website on Bluemix, you’ll obviously want to set up a custom domain for your application. While the URL with the xyz.au-syd.mybluemix.net sounds exciting, you obviously will want to point your custom domain to it – this post quickly touches on that.
The next step now is to get the custom domain working for your site. To get the custom domain working, basically, there are 3 things to do:
- Register a domain some place and know how to update records there – we’ll assume for now that you already have a domain registered some place
- Set up the domain within Bluemix so that the Bluemix system
- Register the domain in Bluemix
- Connect your application’s route to this domain
- Update the settings on your domain provider so that requests go to the Bluemix host now
For Step 2 above, the Bluemix page about updating applications is extremely well written and has instructions that are very accurate and easy to follow. So, I won’t duplicate that information here. The article will take you through the process of configuring Bluemix. Just remember that if you’re not in the US region, you’ll need to move to console for your region.
For Step 3, most domain providers will have a way to manage the DNS records. If you’re using GoDaddy, you just need to log in to your account page and click on the “Manage DNS” button for your specific domain under the “Domains” page.
You need to add a CNAME record that links from your custom domain (e.g. notepad.onghu.com) to the target domain (e.g. xyz-123.au-syd.mybluemix.net) – create a new CNAME record and point it to the URL for your application on Bluemix. If you followed the discussion on the previous page, the domain you’d point it to would be appname.region.mybluemix.net
Once that is done, you will just need to wait for the DNS changes to propagate through.
Note: You will probably have to update the
url parameter in your
_config.yml to your custom domain, and re-generate and push the site again.