13

Someone has pointed their domain (www.bomberball.net) to the same IP as my domain (www.kapparate.com) , and Google is now showing the former when searching for Kapparate, rather than the latter. What's the best way to block requests coming from www.bomberball.net ?

Falcon Momot
  • 25,244
  • 15
  • 63
  • 92
Arcymag
  • 233
  • 2
  • 5

3 Answers3

11

You should put your actual web site in an Apache <VirtualHost> block, and have the default host serve only the Apache test page.

If you are using name-based virtual hosts, like most people, then just ensure that the default virtual host appears first in your configuration. You can check your configuration with a command such as httpd -S.

See also Apache's examples for more information.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
0

If you are using Plesk panel, you are exposing yourself to this site duplicate issue if you have a "default site" selected for your IP address under "Tools and settings > Ip addresses". That is... if you enter your IP in browser and you see your domain.

Fix this by selecting none as default site for your IP; then that external domain will display a default Plesk page.

adrianTNT
  • 1,077
  • 6
  • 22
  • 43
0

Same thing was happening with my website but I decide use it in my benefit increasing the number of access in my website, when someone access that strange domain, it redirects to my official website, follow the PHP code that worked for me:

    <?php
    //insert this code in the very begin of the page
        if ($_SERVER['SERVER_NAME']) != "www.sample.com"){
            if ($_SERVER['SERVER_NAME'] != "sample.com"){
                echo "
                    <script>window.location.replace(\"https://sample.com/\")</script>;
                ";
                //if the script fails for some reason, the follow link will appears.
                echo "<a href='https://sample.com'>Click here </a>to go to the official website ";
                die();
            }
        }
    ?>