Welcome to WebmasterWorld Guest from 107.22.14.254

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Spammer linking to our IP address with his domain name

Spammer linking to our IP address with his domain name

     
6:14 am on Nov 5, 2006 (gmt 0)

10+ Year Member



Hello,

Spammer registered .info domain name with same name as our .com domain and is linking to our domain's ip so now we have duplicate sites on one IP address ex: mydomain.com and mydomain.info

I have sent repeated emails to change his dns settings but he wont listen.

Any ideas how can prevent this? Can something be done through mod_rewrite on apache?

Thanks for your help.
Regards.

9:27 am on Nov 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

The first line is needed for very old browsers (or robots) who don't support virtual hosting, so they won't cause infinite redirects.

9:30 am on Nov 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had this on a domain a while back and added the following to the .htaccess file:

Deny from baddomain.info

I'll leave it to the mod-rewrite experts to say if that is kosher, but it seemed to work for me.

9:21 pm on Nov 5, 2006 (gmt 0)

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 5+ Year Member



Deny from baddomain.info

All that is going to to is deny any requests made FROM the baddomain.info server. But they don't have one, so this does nothing in this case.

bird's solution is the correct one. It will rewrite to your domain and avoid a duplicate-content penalty. Not only that, but you pull one over on the bad guy - YOU get the credit for his traffic.

12:21 am on Nov 6, 2006 (gmt 0)

10+ Year Member



Hi bird,

Thanks for the rewrite code I am also using sub domains, would this code effect subdomains.

Could you please explain what does the second line do?

Thanks.

12:30 am on Nov 6, 2006 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Line by line:

# If requested hostname is NOT blank
RewriteCond %{HTTP_HOST} !^$
# AND requested hostname is NOT my canonical domain name
RewriteCond %{HTTP_HOST} !^www\.example\.com
# THEN redirect to requested page using canonical domain
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

Jim

[edit] Formatting [/edit]

[edited by: jdMorgan at 12:46 am (utc) on Nov. 6, 2006]

12:36 am on Nov 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for that explanation.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month