[SOLVED] What is the correct way to setup DNS zones in ISPConfig while primary NS are on Cloudflare?

Discussion in 'Installation/Configuration' started by zikamatej, May 15, 2022.

  1. zikamatej

    zikamatej New Member

    I've been struggling for a while now with ISPConfig on a virtual server on Azure. All my subdomains end up showing the website that is on the main domain. I've come to know that it's essential to have DNS set up in ISPConfig to make it work correctly.

    Nameservers at this moment are on Cloudflare, they're set up throught my domain's registrar.

    Now, I did set up a DNS zone in ISPConfig with all the DNS records I need (copied them from Cloudflare) but I am quite confused at how to convince the internet, that the name servers are now located on my own server. On Cloudflare I set an A record (ns1.domainname.xxx - leads to my server's public static IP address) and an NS record (domainname.xxx - leads to ns1.domainname.xxx). But this doesn't seem to do the trick.

    I've done a lot of research and still can't find a way to make it work correctly.

    Thanks in advance.
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Why do you need to build dns server when you already have and use CF as your dns server?
     
  3. zikamatej

    zikamatej New Member

    Because all my subdomain websites end up showing the main site (second-level domain) and this was one of the ways to fix it according to multiple threads on forums. But if you have a more clever way to fix it, I would be grateful!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no need to set up DNS in ISPConfig when you use Cloudflare. To be more accurate, you may not set up DNS records at all in ISPConfig when using cloudflare, so the first step in fixing your issue is that you remove any DNS records that you might have added for these Cloudflare managed zones in ISPConfig.

    The next step is to read the 'Read before posting' post as it has a chapter on that topic "When visiting domain B, domain a shows up":

    https://www.howtoforge.com/community/threads/please-read-before-posting.58408/

    It's best to set up all sites to '*' in the IPv4 field. When using Cloudflare proxy, you can't use the free let's encrypt SSL certs, so you must either create a self-signed SSL cert or buy a cert or you must redirect to HTTP instead of HTTPS from Cloudflare (using HTTP is not recommended of course).
     
    ahrasis likes this.
  5. zikamatej

    zikamatej New Member

    Oh god, so it's all because of Cloudflare DNS proxy?
    Well, it did work, but I think this should be written somewhere very clearly, I've been looking for a solution for months...
    Thank you for the solution!
     

Share This Page