Results 1 to 5 of 5
  1. #1
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,100
    Thanks
    433
    Thanked 2,333 Times in 1,555 Posts

    Default Robots.txt syntax question

    I have a site that's using software throwing out some extra pages that I want to get rid of, but they're two folders deep so I wanted to double check the correct syntax.

    So, if the site is in this format:

    example.com/folder1/folder2/

    And I want to block folder2 but not folder1 would it be:

    User-agent: *
    Disallow: */folder2/

    Note: /folder2/ appears at the end of many URLs not just folder 1.
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding - see the spreadsheet here.

  2. #2
    xecutable's Avatar
    xecutable is offline Private Member
    Join Date
    March 2011
    Location
    Zurich, Switzerland
    Posts
    1,979
    Thanks
    583
    Thanked 1,225 Times in 708 Posts

    Default

    According to Google's Help Files located right here: http://support.google.com/webmasters...rom=40364&rd=1

    User-Agent: Googlebot Disallow: /folder2/ In this example only the URLs matching /folder2/ would be disallowed for Googlebot.
    therefore I believe the * will match any URL that contains folder2 and that your syntax is correct. BTW blocking directly example.com/folder1/folder2/ will also block only folder2, but since folder 2 is at the end of many URLs you wouldn't want to put them all in the robot.txt I guess.

  3. #3
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,100
    Thanks
    433
    Thanked 2,333 Times in 1,555 Posts

    Default

    Awesome, thanks for the reassurance!
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding - see the spreadsheet here.

  4. The Following User Says Thank You to baldidiot For This Useful Post:

    xecutable (6 August 2012)

  5. #4
    universal4's Avatar
    universal4 is online now Forum Administrator
    Join Date
    July 2003
    Location
    Courage is being scared to death...and saddling up anyway. John Wayne
    Posts
    34,083
    Thanks
    4,573
    Thanked 9,327 Times in 6,004 Posts

    Default

    One way you can test it is if you have phpsitemapng, you can scan the site, even if its from another server, and then check the files it would add to the sitemap.

    Since it's crawler listens to robots.txt directives, it's a pretty good test.

    Rick
    Universal4
    Gambling World Online Roulette Online Blackjack Live Online Games Sports Betting Horse Racing
    Casino Affiliate Programs
    Hosting and Domain Names
    Gambling Industry Association
    GPWA Moderation by Me and My Big Bad Security Self
    If an affiliate program is not small affiliate friendly (especially small US Affiliate), then they are NOT Affiliate Friendly!

  6. #5
    xecutable's Avatar
    xecutable is offline Private Member
    Join Date
    March 2011
    Location
    Zurich, Switzerland
    Posts
    1,979
    Thanks
    583
    Thanked 1,225 Times in 708 Posts

    Default

    Quote Originally Posted by halliadam View Post
    Robots are becoming increasingly sophisticated and lifelike. Learn about robots, the latest robot technology and how close we are to artificial intelligence.

    thanks for sharing.
    Yes..... the robots.txt is very sophisticated and lifelike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •