robots.txt wildcard help

by sefu
2 replies
  • WEB DESIGN
  • |
Hi All,
I'm trying to block URLs such as

/-p-1002702.html

These files are in the root directly, they all start with -p- followed by a number. (-p-numberhere.html)
I am using the following wildcard in robots.txt

Disallow: /-p-*

Is this correct our is there a better command I can use?
#robotstxt #wildcard
  • Profile picture of the author mrshawn
    You can use the following:

    Code:
    Disallow: /-p-*.html$
    Let me know if it works.
    {{ DiscussionBoard.errors[8069700].message }}
  • Profile picture of the author singhabhishek251
    Originally Posted by sefu View Post

    Hi All,
    I'm trying to block URLs such as

    /-p-1002702.html

    These files are in the root directly, they all start with -p- followed by a number. (-p-numberhere.html)
    I am using the following wildcard in robots.txt

    Disallow: /-p-*

    Is this correct our is there a better command I can use?
    This is correct, there is no other command and this one line command is enough for you.
    {{ DiscussionBoard.errors[8070073].message }}

Trending Topics