I am currently working with BIND9 DNS and I am trying to assign webspace to clients on sub-domains without needing to wait for DNS propagation when creating a website on a sub domain.
Example
I have created the A Record *.mydomain.com pointing to IP 192.168.1.1. The server 192.168.1.1 is an NGINX web server.
When adding the sub-domain website site1.mydomain.com the site will be associated with the NGINX server IP 192.168.1.1.
This works fine initially with the site being immediately available; however using the one server will reach capacity within the next few months.
I would like to create additional records (if that the best way to go) for the additional NGINX servers allowing for scalability to add more sites on additional servers:
192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.4
I have tried adding multiple A records as in the following example:
*.mydomain.com 192.168.1.1
*.mydomain.com 192.168.1.2
*.mydomain.com 192.168.1.3
*.mydomain.com 192.168.1.4
The problem with this DNS configuration is that it acts like a round-robin load balancer. For example, the website site2.mydomain.com which is running on 192.168.1.2 will not always resolve to that server. It could resolve to any of the 4 servers.
I am using ISPConfig; however I expect it will be a similar situation with Cpanel and Plesk etc.
When I add the site under the sub-domain I am selecting the respective NGINX server on which the site files are created, but DNS is essentially not playing ball.
Does anyone know how to fix a server IP to a specific site as in the sub-domain situation above?
Thank you