Can robotx.txt block specific IPs/domain names?

Discussion in 'robots.txt' started by philipseocc, Jan 25, 2011.

  1. #1
    We are seeing this hit our site in awstats: *removed hostname* (edit>> Thank you for the help, elicitservers)

    We aren't entirely sure what it is but we think it is a bot and it is hitting us a lot. We want to stop it. Can this be done via robots.txt? OR do we need to block this at our server?

    Any help would be appreciated. Thanks.
     
    Last edited: Jan 25, 2011
    philipseocc, Jan 25, 2011 IP
  2. elicitservers

    elicitservers Peon

    Messages:
    714
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Blocking it at the server/firewall level would be best, I don't think you can block it in robots.txt. You can however likely block it in an .htaccess file, but as usual at the firewall would be best.
     
    elicitservers, Jan 25, 2011 IP
  3. Suimme

    Suimme Well-Known Member

    Messages:
    119
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    143
    #3
    I prefer .htaccess file. Its very easy to block several ips with it.
     
    Suimme, Jan 28, 2011 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    robots.txt is just a site preferences file to tell the crawlers which pages you would like them not to visit. Its up to the crawler to honor it or not. In your case, you need to enforce the things not to tell your preference. The only solution to restrict them in .htaccess or firewall. The easies way to do is .htaccess.
     
    mwasif, Jan 29, 2011 IP
  5. allthewebsites

    allthewebsites Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    In CPanel, you can block the IPs using CSF (Config Security Firewall). Firewall would be efficient.

    If you do not have access to CSF, then go via .htaccess.
    Either you can block by IP or UserAgent ( which is less reliable, since it can be spoofed).
     
    allthewebsites, Jan 29, 2011 IP
  6. philipseocc

    philipseocc Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I was able to block it with .htaccess by using the following code:

    
    order allow,deny
    deny from 123-456-123-456-comcast.com
    allow from all
    
    Code (markup):
    Of course, the above address is just an example... Thanks everyone.
     
    philipseocc, Jan 31, 2011 IP
  7. brad.smith4321

    brad.smith4321 Peon

    Messages:
    249
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Robots.txt file can't block perticular IPs
     
    brad.smith4321, Feb 1, 2011 IP
  8. philipseocc

    philipseocc Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yeah... we know. We already figured that out. But thanks for posting your worthless signature links about loan modifications.
     
    philipseocc, Feb 1, 2011 IP