David R. Heffelfinger

  Ensode Technology, LLC

 
Bookmark and Share

Blocking External Domains Pointed to Your IP Address


Last night I realized some bozo decided to point his domain name to my site. I don't know exactly what he was thinking, or what benefit he could possibly get from doing so. The only thing I could think would happen is that all my content would have an exact duplicate in Google, and we all know Google doesn't like duplicate content.

I contacted eApps,my hosting company, they contacted the owner of the intruding domain, and he refused to remove his domain name from my IP address. Tech support suggested I could set up an Apache rule to serve only my domains from my IP address.

I googled around to see how to go about this, but came out blank. Most issues I found were about preventing specific hosts to link to my site, which is not what I was trying to do. Once again I asked eApps support, and they came up with a solution.

I needed to add some rules to the Apache .htaccess file that would result in only my domains being served from my IP address:

SetEnvIfNoCase Host "mysite1\.com" local_sites
SetEnvIfNoCase Host "mysite2\.com" local_sites
Order Allow,Deny
Allow from env=local_sites

Adding the above lines to .htaccess did the trick. The bozo is no longer serving my content from his domain.

 
 
 
 
Comments:

Post a Comment:
Comments are closed for this entry.
 

« April 2018
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today

 
© David R. Heffelfinger