2 domain names at 1 ip address

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

Previous topic - Next topic

Novel Web SolutionTopic starter

"Example.com" website can now also be accessed through "anothersite.com". This is not a copy or a redirect. When contacted, the hosting support team clarified that both domains share the same IP address.

The experts are being asked the following questions: 1. What is the significance of this situation? 2. How did it occur? 3. What is the solution? It's an interesting situation to understand for self-development purposes.
  •  

fix.97

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).
  •  

JimyChen

Encountered a similar issue where an alias from IP to domain in the local area network is not functioning properly. The domain name can be accessed without problems through the IP on local machines, but additional domains cannot be set up.

In Denver, the issue was resolved by creating a folder with the IP and adding folders with the domains inside. As a result, it was possible to access different domains from the same IP via paths such as 192.18.4.5\site1 and 192.18.4.5\site2. Is there a similar solution for this problem in OpenServer?
  •