Strange DNS behavior - fallback to other IP

Operating system: ubuntu
OS version: 20.04

ISSUE & Question:

I have a script (bot.php) which need to run curl requests at api.superservice.com - which is managed at the same server (server2 12.12.12.12).
Most of the time it works like expected and resolve to:

api.superservice.com to 12.12.12.12.

But sometimes it resolves to

api.superservice.com.mydomain.com to 1.1.1.1

If the wrong request is executed, Curl show, that the response came from port 9097, instead of Port 10050 - which is the Port if the request was resolved to the right IP.
image

I wonder why does the curl-request (only sometimes) fail and resolve to an wrong subdomain at the mydomain.com-Domain.

The Setup / Enviroment

I’ve setup my Virtualmin-Server on a subdomain of an existing domain I still use (following is demo-data):

I use the DNS at server2 (12.12.12.12) as primary nameserver for all the Domains I do manage with virtualmin.
For example there is an virtualserver named api.superservice.com

The main-domain mydomain.com is managed by an external NS-Server.
Here are some example entries, how the Main-Domain is configured:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.