Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

if I want to filter out all the search engine bots for example for a script that counts users that are online is there website or a list which is allways up to date and includes the ip addresses of all the bots? Because if I put them into my script manually I will have to change it every day since there are new ips coming.

Thanks for your help!

share|improve this question

migrated from stackoverflow.com Mar 15 '11 at 16:59

This question came from our site for professional and enthusiast programmers.

2 Answers 2

You should filter search engines by looking for user agents, not by IP.

share|improve this answer

From John Conde's reply to a question of mine, see IP Lists. That site lists known IPs used by each search engine.

Filtering by user-agent is not reliable because it can be faked extremely easily. Google suggests looking at the user-agent and then doing a DNS lookup. This way, if they add new IPs, the filtering does not break. You obviously have to update your DNS valiation code when new search engines or bots appear by that would not be too often.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.