2 domains at 1 ip address

Started by Novel Web Solution, Jul 15, 2022, 11:58 PM

Previous topic - Next topic

Novel Web SolutionTopic starter

There is a site with a domain, let's call it "example.com", suddenly, it became available at one more address "another site.com".

This is not a copy or a redirect. We wrote to the hosting support, they answered the following:

"Domain "othersite.com" has the same IP address as the web server serving "example.com" "

Questions to experts:
1. What is the essence of this situation? 2. How could this happen? 3. How to solve the problem?

First of all, it is interesting for self-development, what is it?


If you have your own server (sometimes a dedicated IP is enough, if the hoster is completely stupid or deliberately provides this opportunity) and there is no control over the host name, at least a million domains "to any interested person" can be connected to it.

To avoid this, in Apache, for example, you need to create a default virtual host to catch all not own calls and the main virtual host for the site itself.
You can filter out the strange hosts directly on the site (in .htaccess for example).