Custom Domain in IBM Bluemix - dns

How to add our own domain? Do we need to setup any environment like Node?There is an automated domain generated but I want the web app to run my personal domain.

After you've configured the custom domain in Bluemix, you must map the custom domain to the Bluemix system domain on your registered DNS server:
Set up a 'CNAME' record for the custom domain name on your DNS server\domain host.
Map the custom domain name to the secure endpoint for the Bluemix region where your application is running. Use the following region endpoints to provide the URL route that is allocated to your organization in Bluemix:
US-SOUTH: secure.us-south.bluemix.net
EU-GB: secure.eu-gb.bluemix.net
AU-SYD: secure.au-syd.bluemix.net
more information here: https://console.ng.bluemix.net/docs/manageapps/secapps.html and here https://console.ng.bluemix.net/docs/manageapps/updapps.html

Related

Map two different subdomains to a one Azure App Service Plan (with two different App Service inside)

Let me get this out of the way, I am not that familiar with DNS setup. But I am wondering if I can have this setup. I cannot test this right now because I control the our Azure portal but not the domain name provider.
We will have 2 subdomains. For example, api.contoso.com and app.contoso.com
We currently have a single Azure App Service Plan with two apps inside. One is the frontend SPA, and the other is the backend.
Checking the IP address and Custom Domain Verification ID of the two services, they are the same! So I am wondering if the setup of the two subdomains is possible. If not I'll consider moving out one of the App Service to its own App Service Plan or maybe Just map a single custom domain to the frontend. Any tips or suggestion?
Yes this is completely possible and a very standard setup. You will use CNAME records in your DNS setup which means you won’t use the IP address of the VM that your app service plan is on. Instead a CNAME DNS record maps your custom domain to another domain - in this case the domain name of an app service.
You will configure a different custom domain on each app service (and ideally a certificate to protect it).
E.g. your DNS might look like this:
app.contoso.com CNAME myapp.azurewebsites.net
api.contoso.com CNAME myapi.azurewebsites.net
I.e. when a request is made for a domain on the left it will be forwarded to the domain on the right.
When a request is made for either of your custom domains the custom domain will be in the host header. This request will be routed to the app service gateway which will look at the host header in order to know which VM to route the request to and once on the correct VM which app service to serve the actual request.
Once you have the above setup you can query the DNS system to see the complete route that a request would take, e.g.:
nslookup app.contoso.com
may return:
Name: waws-prod-xyz-123-1234.uksouth.cloudapp.azure.com
Address: 99.99.99.99
Aliases: app.contoso.com
myapp.azurewebsites.net
waws-prod-xyz-123-1234.uksouth.cloudapp.azure.com
With this command you'll see the actual VM that your app service plan is on (I've made up the IP and VM name here!).

Azure app service custom domain is not working with www prefix

I have a custom domain within my app service, but can't access my web app with www prefix only without. I get error ERR_NAME_NOT_RESOLVED when trying to access with www prefix. I define my custom domain as subdomain.domain.com
Most commonly this is caused by a one of the below:
Is your App Service Plan scaled to allow Custom Domains / SSL?
Have you mapped the Custom Domain to the Domain?
For Example: have you created a CNAME or A Record on Azure DNS or your DNS Server?
Has it been added to the Custom Domains setting of the App Service?
Microsoft documentation for this is pretty good and the link for this is:
https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain
Assuming, that you already own the Domain etc etc

Custom domains with Azure Websites (Multi tenant)

This article - https://msdn.microsoft.com/en-gb/library/hh534477.aspx#sec7 explains the below approach on how to let customers add custom domains and map to your application.
As an alternative you could allow each tenant to create its own DNS entry that maps a domain or subdomain owned by the tenant to one of your application’s DNS names. For example, Adatum could create the following DNS entry in its DNS configuration:
surveys.adatum.com CNAME adatum.tailspinsurveys.com
Or Adatum could create the following entry:
surveys.adatum.com CNAME www.tailspinsurveys.net
In either case you could use the custom domain name in your ASP.NET routing by using the technique suggested in option 3 above, or use the Request.Url class in your code to identify the domain.
I can achieve this so far with subdomains but when I create the CNAME below to my application I end up with a 404 (Web App not found). I don't want to have to add a custom domain inside azure for each customer. I'd like to automate the process for my SaaS site.
Thanks
when I create the CNAME below to my application I end up with a 404 (Web App not found)
It seems you do not configure the custom domain correctly. I would suggest you use Dig Web interface to trace your DNS domain. Please also check your steps from this article to ensure the custom domain is configure correctly.

Can I use a custom root domain for a bluemix CF application?

I want to use a bare domain with a bluemix CF app. (A bare domain is also known as a zone apex, usually the domain you bought with nothing on the front of it, e.g. "azquelt.co.uk")
The bluemix docs for configuring a custom domain say you must configure a CNAME record for the hostname that you want to associate with a bluemix application.
However, you cannot create a CNAME record for a bare domain (e.g. something like "azquelt.co.uk"). This is a limitation of DNS.
Is it possible to use a bare domain name with a bluemix application or is this not supported?
Yes, you can use a bare domain name in Bluemix. Basically you have to set the A record for your bare domain to point to the Bluemix domain IP address for your region. To find the IP address simply ping the hostname corresponding your region. For example for US South region you should user 75.126.81.68:
$ ping secure.us-south.bluemix.net
PING secure.us-south.bluemix.net (75.126.81.68): 56 data bytes
The link you mentioned has the hostnames for other Bluemix regions as well.
To configure your application:
1) Create a custom domain in Bluemix using your bare domain (for example azquelt.co.uk
2) In your Bluemix application add a new route and select this new custom domain for the route and leave the host field empty. In this case your application will be reachable in your bare domain.

Use custom domain with IBM Bluemix website

I want to reuse my existing domain (managed by IBM Hursley, but that shouldnt matter I think) with my new Bluemix website. What should I ask the team who manages my domain name and what I have to set in the Bluemix app/site?
Thanks,
Pimmy
To integrate the answer from #umberto-manganiello you can also setup on your Registrar DNS configuration an 'A' Record instead of a 'CNAME' record, and making it to refer to the following IP addresses according to the Bluemix region where your application is running:
US-SOUTH: 75.126.81.68
EU-GB: 5.10.124.142
AU-SYD: 168.1.35.169
This solution actually is working better that the CNAME one.
Edit Aug 24th 2016:
the IBM Bluemix platform added the following hostnames in order to allow customers to setup their custom domains (used with their IBM Bluemix applications) as CNAME of the following hostnames
US South: secure.us-south.bluemix.net
United Kingdom (EU-GB): secure.eu-gb.bluemix.net
Sydney (AU-SYD): secure.au-syd.bluemix.net
The customers now can use the right hostname as CNAME value of their custom domain, according to the IBM Bluemix region their applications are running on
To do this you have to perform two steps:
First is the configuration on Bluemix:
From your Bluemix Dashboard, click your org's dropdown and choose Manage Organizations. Then click domains, and add domain. The domain is organization wide, which means you can link different subdomains to different applications. This can be useful if you have different components (e.g: blog, web application, web service).
Once you’ve created the custom domain go back to your dashboard and select an application. Then on top you'll see a “Routes” label followed by a pencil icon (Edit routes and App Access). Click on the pencil button and add a route for www.yourdomain.com.
Second is the DNS settings and URL forwarding you'll need on your existing domain.
Now that Bluemix side is all set, ask your domain manager to forward yourdomain.com to www.yourdomain.com and to add a CNAME record in DNS settings which points www.yourdomain.com to the appname.mybluemix.net that BlueMix provides by default.
If you need additional information please take a look at Bluemix Docs - Creating and using a custom domain
Here is an example:
My app name in Bluemix = askwatsonto
My route in Bluemix = askwatsonto.mybluemix.net
My domain name = askwatsonto.com
My org = carlos.ferreira#something.com
Steps using the CF CLI:
Download CF CLI: https://console.ng.bluemix.net/docs/cli/index.html#downloads
Add your domain to your org: $cf create-domain carlos.ferreira#something.org askwatsonto.com
Add route to your app: $cf map-route askwatsonto www.askwatsonto.com
Add CNAME to your DNS provider. I used domainmonster.com:
My application was deployed in US-South. Use a different address for the following other regions:
US-SOUTH: secure.us-south.bluemix.net
EU-GB: secure.eu-gb.bluemix.net
AU-SYD: secure.au-syd.bluemix.net'
Debug DNS using this web site http://simpledns.com/lookup-dg.aspx
Read the doc: https://console.ng.bluemix.net/docs/manageapps/updapps.html#domain

Resources