Search code examples
sslibm-cloudcloud-foundryclient-certificates

Bluemix Cloud Foundry App with custom domain uses bluemix certificate


I have a Node JS Cloud Foundry app deployed to IBM Bluemix (IBM Cloud) and I am using my own personal domain for it. Using letsencrypt to create a certificate, I have provided Bluemix the ssl certificate for my domain which covers the DNS name of my domain, and also the subdomain www.

I have configured the DNS for my domain to use:

  • A NAME record for @ pointing to 5.10.124.142
  • C NAME record for www pointing to secure.eu-gb.bluemix.net.

The problem is when I navigate to https://www.example.com the site shows and uses my custom certificate. But when I navigate to https://example.com I see a certificate mis-match error:

This server could not prove that it is example.com; its security certificate is from *.eu-gb.mybluemix.net. This may be caused by a misconfiguration or an attacker intercepting your connection.


Solution

  • I think that the problem is the A Name record. Let me share a link with you so that you can be up to date with the procedure to follow for custom domains. https://console.bluemix.net/docs/manageapps/secapps.html#securingapps

    I think the best soultion is to create another CNAME Record for the example.com URL pointing at the secure.eu-gb.bluemix.net In the docs, as far as I could see, there is no mention of A record for DNS. Let me know if you solve this issue I can give you more help if needed.