Accepting an external domain name (not mine) on my default virtual server

OS type and version Debian 11
Virtualmin version 2.101

Someone added my IP address in his DNS record (A)
As a consequence, when someone tries to access this domain, he arrives on my default virtual server.
How can I block that and be sure that only http/https requests access my virtual server.
Thanks for your anwser

Assuming the error is accidental contact the domain’s “administrative contact” (from WHOIS) and thank them for all the extra visitors/customers to your website and suggest they correct it.

Alternatively identify the error on the website and send them to a simple page to inform them of the mistake, or redirect them to some other evil place.

This is a common problem the only negative is the use of your bandwidth. All the positives are potential new customers for you.

How did you work that out?

Thanks for you answer.
But I see more drawbacks than benefits. That means anybody can setup a domain name very similar to mine, add my ip in his A dns record and fool any visitor who will think he/she is on my website.
How can I block that.

But they are reaching your server so all uses/customers are seeing only what you choose to display on your website (not what the spoofer has set up on theirs) - the spoofer will not be receiving any traffic → so their loss = your gain.

Like @stefan1959 has asked I’m also curious how you have discovered it has happened? Did you lookup the spoofer’s domain (a guess?) and find their ip pointing to you?

you can always change your DEFAULT website to be something … different. How different or insulting or comical is up to you :smile:

That is, as you may already be fully aware, Virtualmin lets you create many domains/websites/virtual servers — once you have more than one, you can choose which one is the DEFAULT — the default one of course is displayed when none of the other domain names match the incoming URL.

Short answer: Create a default domain that redirects the user to somewhere else, such as

Hi everybody
I wish I found the problem because I’m a super geek :slight_smile: but the truth is more simple. One day, I’ve checked how my website Google SEO was, And I’ve found that domain name with my content. After verifications, I found out the reason in the DNS record of this domain.
I use a VPS of OVH in France in the owner of this domain must have had this IP a long time ago and didn’t update its DNS record when he abandoned his hosting solution.

Thanks for the info
I finally created this virtual server: and set it up as the default server.

That’s what I’ve done :slight_smile:

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