What are the differences between the A and CNAME records?

Chris Worner

Well-known member
Registered
Joined
Apr 15, 2016
Messages
612
Points
28
I can not distinguish the differences between the A and CNAME records. Can any one explain me? to be honest when I created a sub domain on my hosting control panel and my main domain is using Cloudflare and Cloudflare guided me to create a CName or A record to point to my IP address to use my sub domain but seem they are similar in this case?
 

dhovorka

Member
Registered
Joined
Sep 25, 2017
Messages
15
Points
0
I can not distinguish the differences between the A and CNAME records. Can any one explain me? to be honest when I created a sub domain on my hosting control panel and my main domain is using Cloudflare and Cloudflare guided me to create a CName or A record to point to my IP address to use my sub domain but seem they are similar in this case?
Funny enough they both could nearly do the same but in general speaking a "A" record is a pure HOST entry while "CNAME" should be used to refer to a name (Alias) for example let's say WWW.EXAMPLE.COM would redirect with a CNAME entry to WWW.TARGET.COM, while WWW.EXAMPLE.COM and A record would point to the host IP address. In Summary

CNAME records (short for Canonical Name) map your hostname to another hostname. It is useful for pointing many hosts to the same place and updating them easily.

An A record is the actual record. The name is resolved to the corresponding IP address.
 

cyberpersons

Member
Registered
Joined
Jun 17, 2017
Messages
45
Points
0
If you have a server hosting your site with ip : 192.168.100.10.

Then you need to create an A record that points to: 192.168.100.10

example.com -> 192.168.100.10

And then if you want to visit www version of your site, you can add CNAME record which means www.example.com will point to > example.com

More detailed information on CNAME: https://support.dnsimple.com/articles/cname-record/
 
Newer Threads
Replies
7
Views
5,231
Replies
4
Views
1,748
Replies
30
Views
11,273

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top