How to set custom domain name for nodejs app hosting on azure linux VM - azure

I am hosting my nodejs project on microsoft azure. Now i wanted do custom domain but i don't know how to do, I have external go daddy domain.
Presently my project running on azure vm's default DNSName.southindia.cloudapp.azure.com domain, now I wanted to change my goDaddy domain. How can I do that, Can anyone help to do this
below is my vm's configuration.

According to your description, we can add A record to map your domain name to this VM's public IP address, or you can add CNAME to map your domian name to this VM's DNSName.southindia.cloudapp.azure.com.
About add an A record.
More information about add a record, strong textplease refer to this link.

Related

How to change the DNS Zone nameserver in Azure?

How do I change the nameserver in a Microsoft Azure DNS Zone to be something else? I'd like to use Cloudflare for my nameservers instead of the default Azure ones.
As far as I know, you can not change Microsoft azure DNS name server. Azure DNS is a hosting service for DNS domains that provides name resolution by using Microsoft Azure infrastructure. But Azure DNS supports co-hosting domains with other DNS services.
To set up co-hosting, modify the NS records for the domain to point to the name servers of both providers. Read here.
For example, you can add name servers from Cloudflare in the additional name servers in the NS record on the Azure portal.
The Name Server (NS) update are done on the domain registrar side. In 'Azure DNS', Microsoft just manages the domain they are not the registrar.
If you want Cloud Flare to manage your domain the NS record needs to be change on the domain registrar side.
If you bought an Azure App Service Domain, you get a DNS Zone (mine didn't work properly, and that's how I got to my solution). You also get a second resource from the domain itself (the App Service Domain resource). If you there click on the tab Advanced Management portal you will be redirected to a different site. From there you can go to the DNS tab at the top, select Manage Zones and fill in the domain you want to control.
From there, scroll down, and you'll see something like this.
As you can see, there are two nameservers. Those nameservers point to Azures DNS system. But here, you can actually change the nameservers.

How to have domain for Azure VM

I did a research a few days about this. But still do not find any solution yet.
I have vm that host a website. The IP address for this website able to access from outside. But now i want to have custom domain for this vm.
Anyone know where I should refer to? Please share any link etc.
just create a A DNS record with your domain name registar, or use Azure DNS (you would need to delegate your domain to Azure DNS), or use Azure built-in DNS for your VM. If you dont have a domain - you need to buy it first.
https://serverfault.com/questions/143411/godaddy-linking-domain-name-to-ip-address
After you deployed an Azure VM, you also could configure an FQDN for this VM so that you can access the VM via Azure Provided DNS resolution which is mapped to the public IP address of Azure VM. Read how to create a FQDN. If so, you could directly access the VM via this FQDN.
Otherwise, you need to purchase a domain then use a CNAME to redirect your custom domain like www.example.com to this FQDN or use a A record mapping to the public IP address in your domain provider.

How to set up Azure IP alias directly using DNS name?

I'm setting up my website on Azure service. My DNS zone is 'xxx.io' (for example). I can create address such as 'main.xxx.io' or 'web.xxx.io' using Alias record sets and they work well. But I can't access the website directly using 'xxx.io' as address. How do I achieve this?
PS: my colleague says it used to work but now it doesn't, and he doesn't know how either.
you can create a A record called # with the value being IP address of your website. you cant have CNAME for # (root domain). Well you can, but its against the rules (afaik).
If your website is hosting on Azure service like virtual machines. You could just add an A record named # to point to the public IP address of Azure VM.
If your website is hosting on Azure web app service, you have to add an A and TXT type records in the DNS zone for using root domain. The app service plan(non-ASE) is multiple-tenant, you have to use TXT record to validate which website will be using the domain hostname.
The TXT record named #, the value is mywebapp.azurewebsites.net; The A record named #, the value is your website public IP.
You could refer to this picture and get more details here.

How to apply custom domain to Azure Linux server

New to Azure.
I need to point a custom domain to a Linux based Resource Group (Not sure if Resource Group is correct nomenclature).
Here are my steps.
I created a new Linux Virtual machine. (works great!)
It has a built in url: http://mysite.cloudapp.net/. This was
provided during the creation of the resource by Azure, is publicly
available, and works great. I want to customize the url and could
not find any DNS type settings for this particular resource.
In order to customize the domain I created a new Web App and pointed
it to the MySite Resource group, purchased a new domain
(MyAwesomeSite.com) within Azure and associated it to
the Web App. My hope here was that the new domain would magically
point to the MySite resource, it didn't.
When I go to the new url (MyAwesomeSite.com) I see a standard 'Web app successfully
created' message not the Linux server.
Can someone point me in the right direction.
You're misunderstanding some things. Resource groups are simply a container and don't have runtime implications. A Web App is a completely different resource from a VM, it is just an self-contained website, and doesn't affect the VM at all.
To give your VM a custom domain name: make sure your Linux VM has a public IP address, and then go to your registrar and create an A record to that IP Address with host #. Then create a CNAME record with host www to whatever the URL of the machine given by Azure is.
This should work although you may need to change your Apache or Nginx config.
Ok 2 things here, you have 2 resources here
1. A Linux VM
2. A Web App - which is a PAAS based service
Both provide a default URL from azure
your site could be at either , I am not sure where but lets wager that you have it at the LinuxVM which has this default url all you need to do is go to your domain provider and create a CName which points to the "Azure Default URL" of this VM and then go to the Dashboard->Configure->Manage Domains and provide the CNAME here.
These steps do well if you are using manage.windowsazure.com , if you are using the portal.azure.com then select your app or the VM - go to settings->Routing->customdomains & SSL settings.
This link should be able to help you http://candordeveloper.com/2013/04/16/how-to-forward-a-godaddy-domain-to-azure/
Know more about VM and Webapps
1. https://azure.microsoft.com/en-in/documentation/articles/choose-web-site-cloud-service-vm/
2. https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-dotnet-create-visual-studio-powershell/

How to connect existing hosting account with new domain

i have bought a domain(adspace.lk) and hosting from the same service provider (lankahost.net). but now my domain has expired and my hosting account is still available with all my files.
now i have bought another domain (.com) at name.com .i want to connect my new domain name.com to the existing hosting account.
Is there any way to do it.
sort of, yes. Assuming that the machine you're hostin your files on has an ip address set aside for your exclusive use - that is, not "shared" hosting - you can simply create an A record with the new new, and that ip address. You must also change your webserver config - if you're using any web related stuff - such that the webserver can associate your web site files with the new name. Usually, a web host can have multiple names at the same time, so you could simply add a new name to the existing configuration.
It's hard to answer without knowing the details of your domain and hosting settings, but I'll try to give a generic but hopefully useful answer.
You should first get the ip(s) of your hosting. Then point the new domain to that ip(s) using the dns panel provided by the registrar. If you use your own dns (unlikely), set the ip there.
After this, you should configure some rules on your hosting. It's likely that you have to set some sort of virtualhost settings. In particular, you should associate the new domain name to the hosting: probably the hosting service provides you a control panel for this task.
It will be done easily from your domain control panel, just update your dns settings for your new domain name.com. Update your nameservers or A record to point the hosting account. So that it will be linked with your existing hosting account files.

Resources