Sub-domain hosting on a different server - iis

I have a domain with wildcard - *.mysite.com hosted on Server1
I am planning to host a sub-domain - sales.mysite.com on Server2.
Is this achievable? If yes I have a couple of questions on this.
How does DNS know to which server to point when sales.mysite.com is requested?
Does all traffic come to the Server1 and then redirected to Server2 if the destination calls for sales.mysite.com?

this is very easy to achieve. you need to configure your dns server that subdomain.mydomain.com points to server 1 and subdomain2.mydomain.com points to server 2. the traffic won't be routed via server 1. it will directly go to server 2. thats how DNS works. In the DNS server for each domain an ip address is stored. you just need to specify your 2 ip addresses the correct way for the subdomains and it should work. more infos you can get from wikipedia http://en.wikipedia.org/wiki/Domain_Name_System

Related

Bypass subdomain limit by hosting own DNS server

The following is more theoretical than practical, I want to test if I have understood the DNS system.
I'm currently renting a domain, lets call it example.com, from a provider.
I also own a server with a static ip.
Using the webinterface of my domain provider, I created an A-Record for my domain to point to my server.
Now everyone pinging example.com will find that A-Record (that should distribute itself to serveral more DNS servers) and thus ping my server.
Now I want a subdomain, which points to a different ip address.
My provider on the other hand won't let me create subdomains.
I can simply host an own DNS server at example.com, where I can add (arbitraryly) many records for any domain that is a subdomain to example.com (so not only subdomain.example.com but also subdomain.subdomain.example.com).
Now, if someone pings subdomain.example.com the following will happen:
They go to their favourite DNS server, which has an entry for example.com by now (due to distribution, see above)
Since there is no entry for subdomain.example.com, the will send an DNS request on udp port 53 to the A-Record ip behind example.com (my server)
My server will reply with the correct ip of subdomain.example.com
They send their ping to the correct ip
Is my understanding correct?
It's not far off, but there are more subtle things under the hood. If you want to host your example.com zone yourself, then you need to have your parent (.com) have NS records that point to your nameserver on your static IP. You would need to register that within your parent through your registrar that you bought the DNS registration with.
.com would need to host:
example.com. NS myns.example.com
myns.example.com. A YOURIP
And in your zone running on your machine, you would need something like:
example.com. SOA ....
example.com. NS myns.example.com
myns.example.com. A YOURIP
subdomain.example.com A SUBDOMINIP
If "subdomain" (your wording) is actually supposed to be in another zone enirely, then you need to use NS/A records to point to its DNS server (which can be the same).
You might go look for a good tutorial about how the DNS works in general. It will take you a lot further.

Making nameserver for put domain on server ip

I have a domain and i want to set it to my server(centos 7).
I made a dns server by bind on my server and made 2 nameserver (ns1.myDomain.ir and ns1.myDomain.ir) and set it in my domain configuration, But i cant ping to my domain.
What is the problem?
At the domain registrar, you need to specify the authorised DNS server for your domain. My suggestion is to use the domain registrar's DNS server for resolution and create a zone file there for your domain and enter the A records and other records for your use case.
To have a domain working you don't need to setup your on DNS (bind) server.

How to connect one of primary domain access with another subdomain

I have domain coupen.tk and a sub domain coupons.yadvi.com.I have web data in coupons.yadvi.com. i want so DNS configuration that if any one visit Coupen.tk they can see all information of coupon.yadvi.com but the link should be shown of coupen.tk not of coupons.yadvi.com
i have added the ip address of yadvi.com in coupoen.tk DNS A Record ,Ip Address of yadvi.com which will be same for coupons.yadvi.com.
coupen.tk needs to point to the same A record IP address as coupons.yadvi.com, so they both resolve to the same server. That server then needs to be configured to serve the same site for requests to both domains.
The usual way to do that would be to make coupen.tk the "master" A record and configure coupons.yadvi.com as CNAME coupen.tk, so it points to that master record. The web server still needs to be configured to serve the same site for either domain.
Failing that, you'll need to set up a reverse proxy server which literally forwards requests for one domain to the other.

How to map domain to hosting server

My client have a dedicated server on liquedweb cloud service and we my web app is hosted on that server. We want our users to map their domain to our server. So they can enjoy our web app by using their domain name. What information I need to provide to my user so he can map domain and what information I need from them?
I don't know much(in fact anything) about domain mapping
thanks
It depends if the server has a dedicated IP address or is natted.
If the server has a dedicated IP address you can ask your clients to point their entire domain to you server by adding the following A records:
Host TTL Protocol Type IP Address
# 300 IN A 1.1.1.1
www 300 IN A 1.1.1.1
Not all domain hosts ask for TTL,if not dont worry about it.
If you want just their subdomain to point to your server (subdomain.website.com)
subdomain IN A 0.0.0.1
TTL is optional in some systems, in this case the default will be used.
Generally it is recommended that you use an IP for the Apex record and not a domain name. EG: example.com is the apex, www.example.com is the www subdomain.
A typical configuration would be below:
Host TTL Protocol Type Result
# 300 IN A 1.1.1.1
www 300 IN CNAME example.com
This is the same config as the top example but using CNAME example.com. It is the same as using A 1.1.1.1, it just means you only need to change one record.
If your server details are a hostname and not an IP address, most systems will not let you use the hostname for the apex so you will need to find out the IP address. (A simple method is to use the nslookup command or dig command).
TTL is how long in seconds a record last before it expires. If you are unsure what you are doing I recommend lowering this so you can correct mistakes more quickly.
Different methods for the different servers. For most of the servers, you have to change the nameservers of your domain.
This mostly needs when your domain registrar and hosting provider both are different.
First Login into your hosting account, navigate to the account details,
then copy the nameservers from there...which would be like :- dns1.hostingprovider.com
dns2.hostingprovider.com
After that, Go to control panel of your domain. Navigate to the nameservers
You will see the link:- dns1.domainregistrar.com
dns2.domainregistrar.com
Paste the above links at the place of below links.
They need the IP address (and possibly instructions on how to configure their DNS servers (which means a variety of different sets of instructions for different servers and control panels)).
You need the domain name.

Is DNS server And Host file Are different?

I am unsure Whether both DNS server and Host file are the same or different.
I Hosted an application in IIS and created A host name as website1.domain.com and tried to browse it and it didn't work.
When searching on net i found that we need to make entry in DNS server or Host file.
As in most of the sites that I saw mentioned DNS server or host file. I am unsure Whether the both are same or they both are different.
A hosts file is used by Operating Systems to manually specify the IP addresses for specific domains/subdomains - think of it as an override.
DNS however is a server - think of it as a registry - that keeps track of records pertaining to domains, such as A records, MX records etc.
For the purposes of a local test site, an entry in your hosts file would be sufficient, however for a live site, a DNS entry relating to the domain you wish to have your site hosted on would be required.
Choosing which to use comes down to a few things. Does the server upon which your hosting the site use its own DNS server, i.e. a DNS server on the same network, which the connections to the server will be using as well? Does the domain name the site uses have its nameserver set to one that is externally available (i.e. 123-reg.co.uk). If either of these cases are true, you could probably use a DNS server.
If not, is the server hosting the site running on the same machine as the client that will be viewing the site? If so, you can probably use a hosts file, pointing your domains to the localhost IP of 127.0.0.1, ensuring the domains match the bindings in IIS.
Dns server is a server that will help to resolve dns names. ie when you type google.com in your browser , the name will be passed to the dns server provided by your isp. then it will be resolved to ip address by the dns server and your request will be routed to the google ip address by isp network. host file is different one. if you add www.mydomian.com entry in your host file and map it to an ip address 192.168.0.1 then your computer will check ion your host file when you type www.mydomain.com, whether there is any entry for mydomain.com in your host file, and if exists it will be routed to that ip address. in case if there is dns server and you set that server ip in your hnetwork configuration in your pc, then all the domain name request will be sent to that dns server(if there is no host entry exists)

Resources