9

This is kind of a weird request. For some reason whoever owns safeandbuy.com has pointed their domain at my IP address. The reason it's a problem is that I'm having all kinds of crawlers that are trying to crawl my site with that domain name.

Is there anything I can do about this?

2
  • I am having the same issue. In fact when I look up the domain of the other guy, dnsdo2.com it seems he has his A record set to my IP. dnswatch.info/dns/… I already wrote to the registrar but they are out of China and I am not sure they will do anything about it. I also do not want all of the crawlers trying to crawl with that domain. Some additional info: Initially, my server admin set me up with 4 name servers ns1, ns2, ns1.name.domain, ns2.name.domain which was assigned to two sets of IP's (one of which was to the Mar 12, 2011 at 5:29
  • 3
    Some SEO scammers will point their domain at your site, and use your content to get their domain into the search engines. After a while, they will point their domain back at their own scam site, and will reap the visit traffic they get via the search queries. Mar 14, 2011 at 4:04

4 Answers 4

27

You could set up a virtualhost on your webserver for safeandbuy.com to grab all that traffic, and just have an index page that says "I am not safeandbuy.com". That would at least pull the hits out of your actual domain.

The whois information for safeandbuy.com has a contact phone number, address and email. You could try to contact them and let them know they are pointing to the wrong IP.

5
  • 2
    +1 This would be the most ideal method May 30, 2010 at 5:12
  • 9
    and, if they fail to correct the situation, you can always setup a redirect to your favorite porn site =) Jun 2, 2010 at 3:43
  • 1
    Throw in a robots.txt to (hopefully) prevent the crawlers from trying to access anything else, and that's perfect.
    – devicenull
    Apr 6, 2011 at 3:12
  • Or even better: make sure your default name based virtualhost does not provide useful content that can help them gain search engine reputation.
    – Andrew B
    Jun 2, 2015 at 2:50
  • To optimize the solution, you'd wan't to send as little data as possible in the response. I'd say to setup @Alex virtual host, but have the only response be a HTTP 403. Not a custom "forbidden" file, just a plain HTTP /403 and let the web browser do the rest. Then any query to *.safeandbuy.com will return an instant 403. Minimal server impact, no SEO help given, and real admins who goofed tend to figure this out FAST. (in apache this would be a RewriteRule of [F] )
    – Ruscal
    Apr 20, 2017 at 20:33
2

Ok here is something that can be very good to do:

Add this under your "header" section at the top of your index page:

<base href="http://www.mydomain.com" target="_top"/>

(Complements of BillThor whos is a very senior member on this site)

By doing this, the person who has his domain pointed to yours .. once someone gets there and clicks on a link, it will redirect them to use your links so they only can steal the home page link and nothing else).

Unfortunately there is no way to stop these kind of people. but all you can do is do a redirect back to your links from his domain.

Another permanent fix to this pesky problem.

It depends on what server program you are using, but for, apache2 has its virtual host settings in the '/etc/apache2/site-enabled' directory. Basically, it has a default virtual hosts ('000-default') and this is set for the mydomain.com site for now. Thus, here is my approach.

  1. Copy the current 000-default to 010-somename. (Please be careful, 000-default is usually symbolic link file so you have to copy it from ../site-available/default.)

  2. Set the virtual host setting in 010-somename. Add these two lines below the first line

    '<VirtualHost *:80>':
    ServerName www.mydomain.com
    ServerAlias mydomain.com
    
  3. Make 000-default points to other directory (elsewhere). In '000-default' file, change 'DocumentRoot /var/www' to point other location like 'DocumentRoot /var/www-test'. The directory /var/www-test don't need to exists, If it is not exists, the connections using other domain name will get error.

  4. Restart apache2 : "sudo /etc/init.d/apache2 restart"

I hope this is helpful.

2
  • 000-default is an ubuntuism and does not hold true for all distros. Other than that it's good advice.
    – Zypher
    Apr 6, 2011 at 3:02
  • Correct. This is for Ubuntu. For Cent/OS and other software the 000-default may be something else. However, if you are using Apache2, the approach will be the same using a different convention. This solved my problem permanently. Apr 6, 2011 at 3:13
0

Adding a default virtual host that redirects to a 403 or 404 as others have stated is a solid option. If you want something you can quickly add to your .htaccess file you can do the following to block unofficial domains (requires Apache 2.4 and having mod_rewrite enabled):

# Send requests that don't match domain name to a 404 page
<If "req('Host') !~ /your-domain-name.com/i && req('Host') != 'your.ip.address'">
  RewriteRule ^ - [R=404,L]
</If>

Note: If you have multiple spellings of your domain name pointed to the same IP address you would need to modify the expression to include all valid domain names for the IP address.

-2

Try using Php to identify the URL of the webpage

if(strpos( $_SERVER['HTTP_HOST'], 'yoururl.com') !== false){
    echo "This is Genuine Yoururl.com";
} else {
    header('Location: http://www.yoururl.com.com/'); exit; // Someone has opened your site as iframe or is using A record to point toward your website
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.