Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 05-17-2009, 05:27 AM   #1
HyperActive Warrior
War Room Member
 
Join Date: Jun 2008
Location: , , .
Posts: 266
Thanks: 11
Thanked 4 Times in 4 Posts
Default How To Block a Visitor From Viewing My Site?

Hi warriors

I want to know how to block a person from viewing my site? can any body explain in detail as i don't know any thing about it? Please help me warriors. I am using wordpress so is there anyone knows how to block a person?

James
jamesjoin is offline   Reply With Quote
Old 05-17-2009, 06:11 AM   #2
HyperActive Warrior
War Room Member
 
Bujuk's Avatar
 
Join Date: Sep 2008
Location: East Coast
Posts: 136
Thanks: 4
Thanked 15 Times in 8 Posts
Default Re: How To Block a Visitor From Viewing My Site?

maybe you can be more specific. are you refering to one particular person? or are you referring to for members only? or are you referring the whole world not be able to see your site?

reason why I'm asking, the approach is different. the first one is bit difficult to do. the second and third one are quite easy.

if you can clarify, maybe we can help out the details.
Bujuk is online now   Reply With Quote
Old 05-17-2009, 06:14 AM   #3
Senior Warrior Member
War Room Member
 
jjpmarketing's Avatar
 
Join Date: Sep 2007
Location: Louisville, KY
Posts: 1,131
Thanks: 41
Thanked 90 Times in 71 Posts
Default Re: How To Block a Visitor From Viewing My Site?

If its a public site, about the only way to block them is by blocking their ip address. This will only work for so long if they have a dynamic ip. Eventually it will change and then they will be able to access your site again. If they have a static ip this will work really well.

If they are using proxies to view your site, then you will have to keep blocking proxy ip addresses.

That is about all you can do to block them, unless they are using a user name and password to login to your site. If that is the case, then you could setup a fake site and redirect their login to the fake site.

IT Security people use this method to prevent DDOS attacks and things like that. It is referred to as using a "Honey Pot".

Hope that helps.

Dennis

jjpmarketing is offline   Reply With Quote
Old 05-17-2009, 06:38 AM   #4
Senior Warrior Member
War Room Member
 
mmurtha's Avatar
 
Join Date: Dec 2005
Location: Hubbard, Ohio, USA.
Posts: 4,387
Thanks: 333
Thanked 113 Times in 89 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via AIM to mmurtha Send a message via MSN to mmurtha Send a message via Skype™ to mmurtha
Default Re: How To Block a Visitor From Viewing My Site?

Quote:
Originally Posted by jamesjoin View Post
Hi warriors

I want to know how to block a person from viewing my site? can any body explain in detail as i don't know any thing about it? Please help me warriors. I am using wordpress so is there anyone knows how to block a person?

James

James,

If you go into your host cpanel, you should see an icon with the words "Deny IP address" or something similar. Just add the IP address or block of addresses you want to deny. Once their IP address is added to this list, your server will deny it, and they cannot view your site or blog.

Just remember, if their IP address changes or if they are using a proxy, you will have to re-enter their new IP addresses. Proxies are a bit difficult to block, but you can block an entire IP block or group in one swipe.
mmurtha is offline   Reply With Quote
Old 05-17-2009, 06:42 AM   #5
HyperActive Warrior
War Room Member
 
CBSnooper's Avatar
 
Join Date: May 2009
Location: Bradford, UK
Posts: 204
Thanks: 17
Thanked 31 Times in 26 Posts
Social Networking View Member's Twitter Profile 
Default Re: How To Block a Visitor From Viewing My Site?

If you know their IP address you can block them using .htaccess - If you don't know, the .htaccess file is a file that lives in the directory of your website where your files are than can control how your site behaves (put simplistically!).

Check the root www directory. If there isn't a .htaccess file there, you can create one using your favourite text editor. It's a hidden file so make sure your ftp program is set to show hidden files.

Put it in the same directory as your index.php or index.html file. If there is, add it to the end of the file.

In the .htaccess file put the following:

<Files 403.shtml>
order allow,deny
allow from all
</Files>


deny from xxx.xxx.xxx.xxx

where xxx.xxx.xxx.xxx is the ip address you want to ban. If you want to ban more than one ip address, add more deny from lines.

CBSnooper is offline   Reply With Quote
Old 05-17-2009, 08:53 AM   #6
Chick Magnet
 
BurgerBoy's Avatar
 
Join Date: May 2009
Location: Kentucky, USA
Posts: 193
Thanks: 18
Thanked 22 Times in 19 Posts
Default Re: How To Block a Visitor From Viewing My Site?

You can block anything you want to with the following code in your .htaccess file.

Use the following code :

<Limit GET POST>
#The next line modified by DenyIP
order allow,deny
#The next line modified by DenyIP
#deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

<Files 403.shtml>
order allow,deny
allow from all
</Files>

SetEnvIfNoCase User-Agent .*Twiceler.* bad_bot
SetEnvIfNoCase User-Agent .*VoilaBot BETA 1.2.* bad_bot
SetEnvIfNoCase User-Agent .*libwww-perl/5.805.* bad_bot
SetEnvIfNoCase User-Agent .*Java/1.5.0_11.* bad_bot
SetEnvIfNoCase User-Agent .*Sogou web spider/3.0.* bad_bot
SetEnvIfNoCase User-Agent .*psbot.* bad_bot
SetEnvIfNoCase User-Agent .*Exabot.* bad_bot
SetEnvIfNoCase User-Agent .*Charlotte/1.0b.* bad_bot
SetEnvIfNoCase User-Agent .*boitho.com-dc.* bad_bot
SetEnvIfNoCase User-Agent .*ajSitemap.* bad_bot
SetEnvIfNoCase User-Agent .*bot/1.0.* bad_bot
SetEnvIfNoCase User-Agent .*panscient.com.* bad_bot
SetEnvIfNoCase User-Agent .*Java/1.6.0_11.* bad_bot
SetEnvIfNoCase User-Agent .*WebDataCentreBot/1.0.* bad_bot
SetEnvIfNoCase User-Agent .*Java.* bad_bot
SetEnvIfNoCase User-Agent .*SapphireWebCrawler.* bad_bot
SetEnvIfNoCase User-Agent .*Yandex.* bad_bot
SetEnvIfNoCase User-Agent .*Baiduspider.* bad_bot
SetEnvIfNoCase User-Agent .*Rankivabot.* bad_bot
SetEnvIfNoCase User-Agent .*DBLBot/1.0.* bad_bot

order allow,deny
deny from env=bad_bot
allow from all


These are the bots I'm banning right now. IP address does not matter - they will still be banned.

As you find new ones just keep adding new lines to the banned list.

As you add new lines remember to keep the .* at the front and ending of the item you want blocked.

BurgerBoy is offline   Reply With Quote
Old 05-17-2009, 12:06 PM   #7
Software Developer
War Room Member
 
jasonl70's Avatar
 
Join Date: Feb 2007
Location: Ohio , USA.
Posts: 2,273
Thanks: 416
Thanked 408 Times in 250 Posts
Default Re: How To Block a Visitor From Viewing My Site?

If you want to just block individuals (instead of building a membership type site), there is a plugin for WP that will do this. It's called "WP-Ban"

-Jason
jasonl70 is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum

Tags
block, site, viewing, visitor

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 06:57 PM.