Chinese sites stealing my IP address


Recommended Posts

I have a few sites from China that must have their DNS pointing to my site’s IP address. If you enter their domain into the address bar of a browser, you get my site but their domain in the address bar. I’m not sure what their purpose of doing this is, but they have three of the top four search results when I search for my site on Google. Frustrating.

Using the .htaccess file I’ve put in a rewrite condition and rule so if the incoming domain is NOT mine it will basically refresh to my domain.

RewriteCond %{HTTP_HOST} !^(www\.)?myDomainName\.com$ [NC]

RewriteRule (.*) http://www.$1 [R=301,L]

But I don’t want to do this. I’d rather have anyone coming from those Chinese sites get a 404 Not Found message. I don’t really want to use a custom 404 page because – if I have this correct – they will still get to my site for the custom 404 page to be shown. I don’t want them on my site at all – I just want them to get the browser’s 404 message like the site does not exist.

So, my question is what is the syntax for the RewriteRule to do this? Something like RewriteRule (.*) 404/$1 [R=301,L] ?

I’ve searched Google, but haven’t come up with anything definite, so I really could use some help.

Thank you for your help.

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.