Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Advertise on LowEndTalk.com
DNS/(a/mx)records/Cloudflare Questions
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

DNS/(a/mx)records/Cloudflare Questions

decaydecay Member

So, sorry if i shouldn't ask these questions here, if so pm me and delete this thread...

Im quite new to this, and wanted some help/opinions on setting up my servers/domains properly. So, i read somewhere that people were recommending cloudflare as a great dns manager, so i thought i would give them a try.

What i did/already-have:
mydomain.com (lets say this is my domain 1) registered at godaddy, nameservers setup to use cloudflare, and setup the domain at cloud flare. all the correct a records etc on cloudflare for that domain is pointing to 1.2.3.4 (lets say this is my server ip). So, all is working fine/great.

Now my question is, if i ever change my server, and if i own more than 1 domain (i do), i would go through and change all the ip addresses of every domain to the new servers ip address (say 5.6.7.8). To me, this sounds like a pretty terrible way of doing this. Is there no way to define the A/MX (or what ever else) records in the form of server1ipaddress.myotherdomain.com (assuming this domain/A-record is set to the correct ip address)? And this way, all i need to do when migrating servers is to change the ip address on that one place and everything will be fine..

Anyone have any experience and solution for my problem?

URL Shortner: https://ur.lk (Analytics, tracking, QR codes, passwords and whole lot more...)

Comments

  • pkr5770pkr5770 Member
    edited August 2013

    Hey

    What your looking to do is add CNAME Records so for example:

    CNAME www.domain2.com alias of www.domain1.com

    You can see this option in the dropdown menu for cloudflare instead of A record choose cname and type the domain you wish the ip to be copied from in the second box.

    pkr

  • DNS zone for each domain, needs to separately edited. (atleast in cloudflare), not sure if there are any batch edit mode available with others either.

    tutorials & rumblings on technology trends - nimidam.com

  • Exactly why I'm not using CloudFlare and other DNS host provider. There was no batch edit function, which is a PITA when changing VPS and need to move sites. I'd rather setup my own DNS server and use something like PowerAdmin.

    I'm here to collect your heart

  • decaydecay Member
    edited August 2013

    So, if i do this, do you think it will work?

    Remove all the A records/CNAME records (starting fresh). lets say the domain is mydomain.com, and the server it needs to be hosted is at is 1.2.3.4

    Records (So these are the only records i will add):

    A - server.mydomain.com - points to 1.2.3.4

    CNAME - mydomain.com - is an alias of server.mydomain.com

    CNAME - www - is an alias of server.mydomain.com

    So you are saying this should work?

    And later on, when i want to change servers, i simply change the first line to:

    A - server.mydomain.com - points to 5.6.7.8

    URL Shortner: https://ur.lk (Analytics, tracking, QR codes, passwords and whole lot more...)

  • Yes this should work exactly the way you have stated, try it with one domain before you do them all though :)

    pkr

  • decaydecay Member
    edited August 2013

    @pkr5770 said:
    Yes this should work exactly the way you have stated, try it with one domain before you do them all though :)

    pkr

    So what exactly is the difference between a A record and a CNAME then? O.o
    Im just curious.. i should probably google this..

    URL Shortner: https://ur.lk (Analytics, tracking, QR codes, passwords and whole lot more...)

  • pkr5770pkr5770 Member
    edited August 2013

    Im just checking if you can infact use it for root domains "example.com" im not sure if that is possible and its not recommended if it is. how many domains do you have?

  • pkr5770pkr5770 Member
    edited August 2013

    Okay i've tested it and it seems to work fine for me

  • @pkr5770 said:
    Im just checking if you can infact use it for root domains "example.com" im not sure if that is possible and its not recommended if it is. how many domains do you have?

    I have few. And i also have couple of client ones. I want to try route all my/client domains through cloudflare if possible. But saying that, once setup, if i ever change servers, the current approach would be extreamly difficult, since i would then have to login to every client domain and change every relavent ip address... =/

    URL Shortner: https://ur.lk (Analytics, tracking, QR codes, passwords and whole lot more...)

  • @pkr5770 said:
    Okay i've tested it and it seems to work fine for me, the complications could be on the mail records etc Ill test that now

    I plan on putting all my mail stuff through outlook.com.

    URL Shortner: https://ur.lk (Analytics, tracking, QR codes, passwords and whole lot more...)

  • Ill send you pm to show you the setup i have

  • You can also setup a DNS server for yourself, and then changing an IP would be as simple as running a single line of sed.

    C, Bash, Perl, Python, PHP, and JS hobbyist. VPS collector. Blog

  • gbshousegbshouse Member, Provider

    Switch to us and wrap our API with some custom tool so you can automatically change the IPs if necessary :) I know, I know I have bad habit of self-promoting

  • DroidzoneDroidzone Member
    edited August 2013

    @decay said:
    Now my question is, if i ever change my server, and if i own more than 1 domain (i do), i would go through and change all the ip addresses of every domain to the new servers ip address (say 5.6.7.8). To me, this sounds like a pretty terrible way of doing this. Is there no way to define the A/MX (or what ever else) records in the form of server1ipaddress.myotherdomain.com (assuming this domain/A-record is set to the correct ip address)? And this way, all i need to do when migrating servers is to change the ip address on that one place and everything will be fine..

    If you wish to redirect your primary domain, domain.com, and www.domain.com to the correct server, I dont see how you can do anything else. Granted, a www. cname can be made to point to another dns. But I think that's a rather twisted way of doing it. For one, it'd going to take additional lookups to finally identify the proper server (think delays). For another, there's no way domain.com can be pointed via a cname entry. If managing a lot of domains is an issue for you, you need to think of directly editing the records as a batch, which is what personal nameservers help you do.

    C, Bash, Perl, Python, PHP, and JS hobbyist. VPS collector. Blog

  • gbshousegbshouse Member, Provider

    @joelgm - I mean skip CloudFlare and use only Rage4 DNS :)

  • Sorry. I seem to have quoted the wrong person.

    C, Bash, Perl, Python, PHP, and JS hobbyist. VPS collector. Blog

Sign In or Register to comment.