How would I block certain people from my site?
Asked by
programin (
10)
July 5th, 2008
from iPhone
If someone was abusing my site is there a way to find their IP and block it somehow?
Observing members:
0
Composing members:
0
11 Answers
Yeah.. sign up for a visitor tracking service like StatCounter. You will be able to see your visitors’ IP addresses, then you can narrow down the person you don’t want by comparing their visit times to their comment times.
Then, it depends on your software. Some software, including blog software, has IP blocking capabilities. If you run your own server, you could run an IP blocking program like PeerGuardian. You can Google search and find a Javascript IP blocker, it’s code that you insert on your webpage, so that if they have Javascript installed on their browser (you can probably see this in the tracking service information), they will be redirected. I believe the one I found allowed you to customize the text on the page they would see.
I ultimately didn’t use the script myself, so I don’t have the link or anything. It didn’t take me long to find it on Google, though.
Most hosts provide you with a “control panel” for your website, where you can block certain IPs from accessing your website. (A good way to obtain the person’s IP address is with AlenaD’s method.)
Though take into account that IP addresses often change, and often are shared between users with the same ISP – so you may be locking out some other people who happen to have the same IP address as the person you are trying to block.
edit: I see that you say this person is “abusing” your site – if by that you mean they are making comments or trolling or something, then the software your website runs on might allow you to block that person from doing whatever it is they are doing. What type of site is it and what software does it run, if any?
Omg thank you so much Alena!
You’re welcome! I had an unwelcome guest at my blog, too.. so I understand. :) If they’d kept up, I would have used the Javascript script I mentioned, but thankfully they buggered off without my having to take action.
So you block their IP with PeerGuardian by javascript?
The Javascript is for insertion on your website, in the case that you don’t have your own server. You didn’t indicate what kind of site it was or if you were hosting it yourself, so if it’s your own, you can block IPs with PeerGuardian.
If you don’t own the server, like you pay money to someone for hosting, or use a blog service, you will want to use the Javascript thing. You just insert the code on each of your pages.
Ok, so you’re saying that you only have your own server if you have a free website? Or if you pay?
It sounds like you probably don’t have your own server.
Do you pay a company for hosting your website?
No I’m using freewebs, but I used a service to shorten my URL.
Okay, well, you will just need to follow the Javascript directions, should you find the one I’m talking about.. it wasn’t very difficult. It would go in your main coding page if you have a blog, or every page if you have a regular website.
Response moderated (Spam)
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.