What is CNAME exactly DNS entries of Domain Hosting - hosting

In what purpose we have to configure CNAME entr in DNS entry. Is there way possible to configure 2 domains for single hosting. IN this scenerio, how CNAME help for us.
thanks.

A Canonical Name record (abbreviated as CNAME record) is a type of resource record in the Domain Name System (DNS) used to specify that a domain name is an alias for another domain, the "canonical" domain. All information, including subdomains, IP addresses, etc., are defined by the canonical domain.
This can prove convenient when running multiple services (like an FTP server and a webserver; each running on different ports) from a single IP address. One can, for example, point ftp.example.com and www.example.com to the DNS A record for example.com, which in turn points to the IP address. Then, if the IP address ever changes, one only has to record the change in one place within the network: in the DNS A record.
CNAME records must always point to another domain name, never directly to an IP address.
More info from https://en.wikipedia.org/wiki/CNAME_record

CNAME is just an alias. I can see it being useful in cases such that you want to hand out a bunch of subdomains to each client but they all point to the same source and that source is not necessarily an IP Address because it's load balanced between a few IP Addresses. I would say it offers different levels of abstraction in this case.
There is a way to configure 2 domains for a single hosting. I am assuming by hosting you mean a server hosting. You can use nginx to achieve this.
server {
server_name example1.com;
#proxy to appropriate port etc
}
server {
server_name example2.com;
#proxy to appropriate port etc
}
Take a look at this post which probably explains a bit more in detail for the handling of two domains/subdomains.
Hope that helps.

The CNAME record is the canonical name record which is used to create an alias name to other. For an example if a user has the data on the domain files.example.com and the other user is needed to search the same content which is with files.example.com from myfiles.example.com.
Then in this case the cname record helps. so one should point the domain myfiles.example.com to files.example.com in the DNS entries.

Related

How do I change my whm/cpanel to use a FQDN and SSL?

I have purchased a server through GoDaddy and when I access WHM or the CPanel, it uses the IP address of the server rather than the host name. How to I change this to use the host name and put SSL on that host name?
You could access WHM both on IP and hostname. Please check if your server actually has a valid hostname. If not, then you can't use WHM via hostname, so you'll have to configure a domain on that server and create a hostname for your WHM server.
Upon provision I was given a hostname of the form:
s192.168.2.###.secureserver.net This will not resolve in a browser. Nor will a ping -a to an IP address. It is a temporary hostname. It will work for creating resellers and putting up websites but you will not be able to secure it with an SSL cert as far as I know. You need a hostname that is also a domain that resolves to your server's primary IP address to allow login to WHM.
And the server has a requirement for hostnames as being an FQDN. The requirements for an FQDN are:
- Do not select a hostname that begins with www or a number, or a hostname that ends with a hyphen (-).
- You must use a fully-qualified domain name (FQDN) that contains two periods (for example, hostname.example.com).
- Do not choose a hostname that a cPanel account on your server will use.
- Do not choose a potential proxy subdomain as a hostname (for example, cpanel.example.com or whm.example.com).
- Do not select a socially-unacceptable hostname. The hostname will appear in mail headers.
- Only use lowercase, Latin-script letters in hostnames.
On the part that requires that you install an SSL for connecting to a URL and port number I cannot address yet but I purchased a cheam domain name from Godaddy, it was then auto parked.
Went into the DNS records for the domain and pointed the A record to the primary IP address of the server.
Record: A # 192.168.2.#### TTL: 18000
You will want to delete all the other records listed there as an FQDN cannot have any subdomain or potential proxy. So no CNAMEs allowed.
Leave Godaddy's name servers NS as they are.
Give the domain settings time to propagate. (i.e. 15min - 24hours)
Connect back to your WHM via ip (https://192.168.2.###:2087)
Navigate to Basic Setup or enter Basic Setup into the search and click on the link.
Change the NS servers at the bottom of the page to GoDaddy's name servers.
Save Settings change.
Enter the new hostname in the Set Up Networking section of WHM's Initial Setup Assistant interface.
Save your settings.
Navigate to your new domain name preceded by "https://" and followed by ":2087" (i.e https://mynewhostname.com:2087 ).
I believe this will get you at least that far for your process.

pointing Hostgator domain to Zerigo/DNsimple ALIAS

After reading about how a my-app.herokuapp.com cannot be referenced by an A Record by the simple fact that Heroku has a dynamic implementation of its servers, I chanced upon articles which extolled the uses of ALIAS functions in DNS services like Zerigo and DNsimple as a workaround for this issue.
This SO Post explains this problem has been solved, Point top level domain to heroku app
However I do not follow how exactly to implement the solution.
Assuming I have a functional ALIAS setup in Zerigo which points to my my-app.herokuapp.com how do I then have my current webhost point to this ALIAS for the root domain?
Here is my Hostgator Control Panel which shows how the root domain (fls.net) is directed to a particular server via an A Record. I would like to subistute that A Record with my Zerigo ALIAS. How do I do that? Do I change my A Record to a CName? and then just put the ALIAS name in?
Note:
This post: How to redirect a root (naked) domain to www - heroku and zerigo seemed to have the same issue, except I don't understand why he calls the solution of using an ALIAS as "temporary". Why would it be a temporary solution?
You have to change your domain's name servers to point to Zerigo's name servers. You do this through your HostGator config. Zerigo has an article on the name servers that your domain should use. This article from HostGator explains how to change your domain's name servers. Basically, you want to log in to the HostGator portal and change the name server's to the one's listed in Zerigo's article.
Zerigo can handle the DNS for your domains, but only if DNS resolvers know to look at Zerigo instead of HostGator. Right now, when a DNS resolver (such as the one used by your computer's operating system) looks up the IP address to which yourdomain.com resolves, it first looks for the name servers that handle yourdomain.com, and then queries them. If the name servers point to HostGator, it doesn't matter what records you put in Zerigo, because HostGator will be queried for the domain's associated IP address. If you want Zerigo to handle the DNS resolution, you have to point the name servers to those managed by Zerigo instead.

how to set up a cdn?

I just bought a cdn from ovh.ie for my website example.com
Here are the instructions. however, i am unable to set up it. Can someone guide me on how to set it up step by step?
1) Report the Backends (IP of your servers) ;
2) Declare the domain/sub-domains that you want to intergrate with the CDN ;
3) Point your domain to the CNAME created after your domain is registered;
4) Add your first cache rule.
Adding a domain on the CDN generates a CNAME with the format yourdomain.ext.web.cdn.anycast.me, you need to point the DNS of yourdomain.ext to this CNAME to activate it.
Once configured, a time delay is necessary so that all of your CDNs are operational. Otherwise, it will reach its full performance with progressive caching as set by your rules
You need to edit the DNS details for yourdomain.ext so that it points to yourdomain.ext.web.cdn.anycast.me for example.
There are typically two types of DNS records that you need to worry about, A records which point to an IP address and CNAMEs which point to a URL.
The root/apex of a domain can only point to an IP on most systems.
The root domain in your case is example.com and can only use an A record.
Subdomains can use both CNAME's and A records.
Apex A record example (example.com):
Hostname Type Target
-------- ---- ---------------------------------
# CNAME 1.1.1.1
WWW subdomain CNAME example (www.example.com):
Hostname Type Target
-------- ---- ---------------------------------
www CNAME yourdomain.ext.web.cdn.anycast.me
The advantage of using the cname is it can hold a number of IPs that can change, if you simple pointed your site at one of their IP addresses they could disable it and take your site down, so it you are given a URL always use a CNAME to it instead of an A record to an IP.
This is why many websites use WWW.example.com or subdomain.example.com.
It is worth noting that using a cname as an apex is not RFC compliant and some hosts do not allow it or offer an alternative proprietary record type to achieve this on their internal system.
Another way around this if your nameserver provider is RFC compliant is to have to apex be an A record and point to a page with a redirect to the CDN or to use a service like wwwizer.
DNS Glossary

adding DNS entry (ex. server.domain.com) to domain controller

I have a server that I have assigned an external IP address to it and NAT'd through in my firewall. Then I have assigned with my domain host provider and made a DNS name to point to that external. All is great from the outside, and inside if I point to the local IP address of that server.
My problem is that the software that is on the server I cannot access certain Java features outside of the network because the local IP address is hardcoded into the software and Java wont read both internal and external IP address. So tech support on the software said we can put in a DNS name into the software.
So I went into the DNS of my domain controller and put in an Host (A) entry of subdomain.domain.com and the local IP address. Well it doesnt resolve right because DNS made the entry I put in as subdomain.domain.com.local so again Java doesn't read it right. How do I make DNS read this entry right as subdomain.domain.com?
Is this a windows DNS solution and domain controller? if so, the A record should just be "subdomain" (windows will add on domain.com since that is the domain for the domain controller). If this is the case, try that A record, and it should work.
UPDATE
Based on comments below, it sounds like you need to do this:
Create a new zone using your external domain name.
Open DNS console.
Click on Forward Lookup Zones.
Right-click, choose new Zone, type in the name of the external
domain name (srb1.com).
Once created, right-click the zone you just created, choose New Host
Record.
Type in 'software' (without the quotes), and provide the internal Private
IP address of your internal webserver.
These instructions were pulled from here: Scenario 2

Custom root domain on Heroku

I have a domain, example.com, that I want to use for my rails-app that resides at example.herokuapp.com and I'm pretty confused how to go about to do this.
Heroku says
"Zone apex domains (aka "naked", "bare" or "root" domains), e.g.,
example.com, using conventional DNS A-records are not supported on
Heroku." And then they go on explaining workarounds (using ALIAS or
ANAME).
I have spent a good hour reading up on the subject (here on SO and elsewhere) but still don't get my head around this.
Are there any alternative ways or explanations on how to acomplish this for "a dummy"?
I'll take a stab at this as it's a frequent question.
Ok, so assuming you have a domain example.com and you want to use www.example.com to host your site. In traditional hosting you'd probably have a virtual server which has been assigned an IP address, in this case you would use a host record, otherwise known as an A record in DNS control panels to map www.example.com to the IP address. In this case, since you have now set www.example.com to a fixed IP address should that IP address ever change you will need to update your DNS yourself.
Also, with traditional hosting you could have example.com set to the same IP address so www.example.com and example.com would work for naked domains.
Ok, so what's a CNAME record. A CNAME record rather than mapping to an IP address maps the record to another DNS entry. So, www.example CNAME'd to example.herokuapp.com means that Heroku can and may move where example.herokuapp.com is pointing at but you don't have to update anything as you're using an CNAME record and Heroku are managing where example.herokuapp.com is pointing (which can and may be another CNAME or an IP address). The problem with CNAME records is that they CANNOT point to an IP address, which is fine for www.example.com but a problem with example.com. Heroku previously published IP addresses to be used for naked domains but problems ensued when they suffered DDOS attacks and couldn't replace those IPs with new ones as they were published IP addresses. For the new EU region, Heroku ARE NOT publishing IP addresses for use with naked domains.
What several DNS providers (DNSsimple I know is one) have done is add their own ALIAS records to their DNS servers to allow you to use CNAME's with naked domains so both www.example.com and example.com will work as now supported by Heroku. If you DNS provider does not support ALIAS records then it's worth moving the domain to a DNS provider that does support it. DNSsimple also supports redirect records so you can have www.example.com redirect to example.com at the DNS provider level and not at your application layer.
Found this:
http://blog.cloudflare.com/zone-apex-naked-domain-root-domain-cname-supp
CloudFlare provides a whole bunch of other benefits as well. I've been using them for all of my Heroku apps and I'm quite pleased to be honest.
They provide a lot value for free from my experience with them thus far.
If you look at DNS records specification you'll find no such record as ANAME.
The best way to solve this problem is:
Make CNAME entry for www subdomain to your heroku app, and CNAME record for root domain to www subdomain.
www.domain.com. 3600 IN CNAME app.herokuapp.com.
# 3600 IN CNAME www.domain.com.
P.S. It works, and do not make you waste money for mystic DNS records

Resources