WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] I want to block one page with robots.txt (5 posts)

  1. jimmy506
    Member
    Posted 2 years ago #

    I want to block one page with robots.txt -Specifically the page blue-widgets

    Question:
    If I code the file like this, would I also be blocking other pages in the shop or products directory?

    In other words, would I also be blocking red-widgets because they are in the same directory .... /shop/products/red-widgets

    User-agent: *
    Disallow: /shop/products/blue-widgets

    Thanks for any help,
    Jimmy

  2. adpawl
    Member
    Posted 2 years ago #

    No, only blue-widgets is blocked

  3. jimmy506
    Member
    Posted 2 years ago #

    Thanks for the fast response!

    Could I use:
    User-agent: *
    allow: /shop/products/

    Just to be safe?
    Or is it not at all necessary...

  4. adpawl
    Member
    Posted 2 years ago #

    ...no, there is no need

  5. jimmy506
    Member
    Posted 2 years ago #

    Thanks very much adpawl-
    ... You are awesome!

    Have a good day!
    Jimmy

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags