It's a little unclear what you've got, but let's do some splitting up based on what I see in your question:
(1) You have a BIND9 DNS nameserver running for the site testshop.homes
. This nameserver sits at 81.171.5.222.
(2) You have an Apache webserver for your site at 15.235.51.16.
This is totally acceptable. Your BIND9 nameserver and your Apache web server do not need to exist at the same IP address. This is common-place because people run their websites and such on one server but use third-parties like CloudFlare or their domain registrars to run the DNS. However, if you change where your BIND9 server exists, you have to change a lot more to make the domain still resolve - this usually requires changes at the registrar / hosting provider depending on what you use to get it so nameservers are properly reached where the DNS records for your domain actually exist.
Real world example: my own domain - thomas-ward.net. (no this is not an advert).
If we look at the nameservers on the domain's configuration, they point at CloudFlare's DNS servers. That means that the nameservers are run by Cloudflare, and that I've configured this at my registrar so that DNS records properly reach CloudFlare for my domain's requests.
The actual webserver for my domain sits at 50.211.[NOPE].[SILENCE]. That's an individual A record in the DNS zone. This is NOT a cloudflare server and is the IP address at the location of my server cluster. These are completely different servers. However, this only works when the DNS servers for your domain are reachable and they are properly configured at your registrar.
Case in point: I have a local-only domain that exists ONLY on my laptop internally - static-local.lxd
(for my LXD containers that aren't ephemeral). This runs on the DNS nameserver of 10.10.1.0 which only exists on my laptop. In order to query static-local.lxd
, I have to have my computer's DNS set so that the first server it queries is that local container on my laptop here - that in turn handles all my DNS. If I change the IP address on the nameserver or change my DNS settings to NOT query 10.10.1.0 first, then I never see static-local.lxd
and my DNS system falls back to Google DNS - which in turn shows NXDOMAIN because that domain name doesn't exist in the real world of the Internet.
Note that I've done some digging in the Internet and your domain you've stated is already owned by someone, and does NOT have any DNS nameserver entries that correspond to either of the IP addresses you've stated - so the NXDOMAIN issues you're seeing are related to your DNS no longer resolving to the proper nameserver, AND because that domain owned by someone at Namecheap is wholly misconfigured to a dead nameserver and will never resolve properly if this is your actual site - you need to reconfigure it from scratch with proper web server / DNS practices to even begin to make things work right