Could someone explain the difference between an A Record and a CNAME, and what I should be telling my users to do if I am building a site that allows for custom domains to point to a subdomain on my hosted service?
A record... www.rabbot.com -> 123.123.123.123 (ie. an actual IP address)
CNAME record... www.philip.com -> www.rabbot.com (ie. more like an alias)
Your life will be much simpler if you have your users to use a CNAME as they can point their domains to yours. Then if you need to update your server's IP address you can simply update the single A record you have instead of making all your users update their DNS entries.
This is true regardless of what web framework you are using...
Related
Hello I will get a access to a subdomain division.company.com and I will have to name where to point it in contract. I don't want request for contract update because where subdomain has point to every time I need to switch a server.
I am looking to have a top level DNS like control for a subdomain.
a) Do I use some kind of routing/proxy server?
b) Is there a way to have a dynamic DNS assignation (single time minimal configuration on the top level domain side)?
c) Is what I am looking for possible with DDNS providers like https://www.dynu.com/ ?
I tried using dynamic with a test domain but it did not seam to function properly.
On test domain I added CNAME DNS record b.a.com pointing to b.dynamicdns.com and then on dynamic DNS'es DNS records I pointed a CNAME record of www.b.dynamicdns.com to a website's server then on website server side I tried www.b.a.com but it did not seam to work.
Top level domains has to add NS (name server) records for the subdomain pointing to a DNS management provider
https://www.dynu.com/ has and add own domain where subdomain can be entered and configured but other providers should work too.
NS b.a.com NS1.provider.com
NS b.a.com NS2.provider.com
That will delegate subdomains DNS record management to it and will allow for full control of it. Including adding CNAME records pointing to any server.
I'm trying to deploy my website and bind dns to this website. So, the dns was used by the old website and now I need to access the dns setting page and modify its A Record and pair its domain name to its new ip address. The domain name is managed by yahoo small business. So I log in and done the changeup like this.
however, When I type the "vbridgetech.com" it does show the apache default page. But when I type "www.vbridgetech.com" it still goes to the old webpage. I thought the only thing I have to do is to change the old ip to new ip. Anyone has idea about it?
If 59.120.185.12 is you new site's IP address, then just add another CNAME record:
CNAME record www.vbridgetech.com vbridgetech.com
(There are other ways to do this, but this should be the safe one)
I think I have just successfully connected my domain to my web host and have done so by following an article. There seems to be 2 different ways of doing so and I wonder if there is a difference between the two.
method 1
Go to your domain provider. Create an A record that points to your web host's ip address.
method 2
Go to your domain provider and edit the nameservers according to what your web host indicated. Go back to your web host and add a DNS record indicating the domain.
I have followed method 1 and it works. Is it any different from the second method? In addition, when typing out a record at the domain provider, what does #, www, and * mean?
The A record maps a name to one or more IP addresses, when the IP are known and stable.
# * are same as known as domain name (e.g. yourdomain.com) some domain registrar using # instead of entire domain and some uses *. In hosting control panel under DNS records there domainname is mentioned instead of # OR *
If you work with method 1 and changing A record then you will have to change A record to WWW as well to work your domain with www else your domain with www will ended up with no result. You will also have to change all required records such as CNAME (if you have any subdomain), mail (if it is working through hosting provider).
So best practice is to use namererver so you don't need to change every record under Domain Control Panel.
I have a domain name (somename.com) registered at godaddy and i am using godaddy DNS Manager. But i am hosting my website with hostinger.com. So i have created a subdomain (sub.somename.com) on hostinger which by default points to same IP as a domain.
Now i have entry on godaddy DNS for my domain and subdomain name which points to hostinger server address where my website hosted. But when i access my subdomain (sub.somename.com) it goes to my somename.com. I have to refresh it to load sub domain page correctly.
Godaddy DNS Entry
domainname -- somename.com -> IP address of hostinger.com
subdomain -- sub.somename.com --> IP address of hostinger.com (same as above)
Hostinger DNS Entry
subdomain -- sub.somename.com --> IP address of hostinger.com(same as above)
Is above entries is correct ?
Should we need to have entry for domain and subdomain both on godaddy DNS ?
Do we need to have a entry for subdomain in hostinger.com also ?
In order to create a subdomain correctly you have to go through 2 steps:
1. Update your DNS records, so they accept your subdomain (sub.somename.com).
You should have these records for your setup:
A: # -> IP of hostinger.com (this is to connect the domain with hostinger)
A: sub -> IP of hostinger.com (only put the subdomain name)
CNAME: * -> somename.com (so that everything before somename.com goes to somename.com)
CNAME: *.sub -> sub.somename.com (so that everything before sub.somename.com goes to somename.com)
There are different types of DNS Records, the one's you mentioned are all A Records, you have to use CNAME Records as well.
2. Creating a virtual host (on the hosting provider)
The previous step was so that the Domain Name Servers know to which ip to point when the subdomain is used. From this side we have to point the subdomain address (sub.somename.com) to a specific folder that contains the different website. Most host providers, when you create a subdomain automatically create a new folder you can put your content at and point at it.
So to answer your questions.
No you have to change your DNS Records so they match the information above. Let me remind you that changes in the DNS Records might take a while to take effect (1-2 hours).
Your DNS entries should be at one place. Usually they are provided by the hosting provider (hostinger in this case), but since they are also provided by GoDaddy as well feel free to update them there.
There is no need to have a DNS entry in hostinger if you update them in GoDaddy.
P.S. Since I haven't used hostinger before, feel free to update me if you have more info, like if you're using CPanel.
If you intend to host a subdomain at an IP different than your main site, the records should look like this.
Main Site (mysite.com)
Type: A
Name(Host): #
Value(Points To): 192.168.1.1
Blog Site (blog.mysite.com)
Type: A
Name(Host): blog
Value(Points To): 192.168.1.2
As a reference, you only need an A record to host a subdomain. CNAME record is an alias. www records are usually CNAME records to the root domain as they are the same page.
Hope this helps!
What is the difference between a CNAME and a Subdomain?
I understand that the a cname (the left side of a domain) can point to the domain, so you can two different urls point to the same address, ie.
ex1.mydomain.com - if setup as a CNAME can return the IP of mydomain.com
If ex1.mydomain.com is setup as a subdomain, does it have a different IP?
Another question is what should the ideal setup be in this situation:
I have IP1:80 for a web app
I have IP2:80 for another app
Can I point both of these IPs to the same A record, with perhaps a different cname or subdomain?
Thanks for any help?
CNAME is agnostic about name topology - it simply provides a way to alias a lookup for one name into a lookup for another name. So it may be in a subdomain context, or not.
Your second question doesn't make any sense to me. An A record maps from a domain name to (a single) IP address. So normally, in this situation, you'd have two domain names with an A record for each.