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 ?

3 Answers 3

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.

8
  • 1
    Can you point me to a link on how to do that? I tried setting the ServerName and ServerAlias in my only Virtual Host *:80, to no effect?
    – Arcymag
    Oct 31, 2012 at 22:19
  • Yep, "someone" is in for a surprise the next time they look at that. Oct 31, 2012 at 22:24
  • And if you really wanted them to get the hint, you could add another VirtualHost entry for kapparate.com and serve up whatever you'd like those visitors to see :)
    – Jim G.
    Oct 31, 2012 at 22:42
  • 3
    @JimG. That's the valid domain. Though I do like the idea of creating a special virtual host for the invalid domain and redirecting it to goatse... Oct 31, 2012 at 22:45
  • Whoops. My mistake!
    – Jim G.
    Oct 31, 2012 at 23:07
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.

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();
            }
        }
    ?>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .