0

I think I know what A record does and what DNS does, but I still don’t get it how they really work. So here is a scenario.

The domain is registered on X, and is been hosted on Y, so we are using the DNS that the host company has provided. At this point everything is working fine. www domain com working just fine as domain.com.

But now we want to use CloudFlare to host our app/website. So cloud flare doesn’t give DNS's... So you go to X to change/add an A record to point to your app/website on CloudFlare basically you are done, but then you notice that:

  • By typing foo.com it shows your new app/website but…

  • By typing www.foo.comit keep showing your old app/website.

So what else is there to change?

Some registrant give you the option of multiple A records (A1, A2, A3...) for each APP/SUB-DOMAIN withing the same DOMAIN, but some others only allow you to have 1 A record and 1 IP per domain(I personally think is not good enough 1 A record)...

So which one I better? an A record or DNS?

Which one should be use at all times?(I think i know the answer to that, a DNS?)

2
  • 1
    An A record is a type of DNS entry, one that maps a domain name to an IPv4. I'm not sure what the question means. Are you asking if you should host your DNS server yourself? Commented Dec 2, 2014 at 18:14
  • Remember also DNS does not change instantly. Records (including type A records) are cached at several different levels from the time they leave the Authoritative Nameserver. Once you make a DNS change it will take time until your change seems to be effective.
    – Tyson
    Commented Dec 2, 2014 at 18:55

2 Answers 2

1

When your browser does a DNS lookup, what it gets back is the A record. The A record needs to be the IP address of your server or web host provider.

A DNS or domain provider should provide some sort of interface where you may change this.

If you are using Cloudflare, you need to change the A record to point to an IP Cloudflare tells you to use. You may need to do something else on Cloudflare to tell Cloudflare the IP address of your server or web host provider separately.


You can have subdomains under a domain. They are separate from your main domain.

So, if you've registered mycoolsite.example, you may be able to register www.mycoolsite.example with a separate A record if you wanted.

It sounds like you might need to get back with your DNS provider and see if there's a subdomain www you need to change as well.


I personally think is not good enough 1 A record

If your site lives on a single server, with a single IP, then you have one A record. If your site is reachable via multiple IP's, then you have multiple A records. Cloudflare may have multiple IP's you can use and you should add alll of them.

So which one i better? an A record or DNS?

As you can see from above, DNS returns A records in response to requests. A records and DNS are not separate concepts.

1
  • I see, so every time a user goes to a website, the browser does a "look-up" to find where the site is been hosted and in return when it finds the DNS what it actually gets is the A record which gets translated to an IP, so we can say that the DNS is not so important as an A record... Thank you very much, now I know what to do... thank you!
    – Tanker
    Commented Dec 2, 2014 at 18:55
1

Most likely you have an A record for "www" still pointing to the old site.

Typically it is better to manage the DNS records at the place where you have registered the domain. And then point individual A or CNAME records to the appropriate addresses. This works only you have a valid IP address you can point to in the hosting provider (in some shared hosting services getting an IP to point to is problematic). You can have as many A and CNAME records as you want. Most of the major providers don't limit this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .