• Hi, How can I block/disallow .PHP Page of my website (ending on .php) in Robots.txt.

    (I am receiving a lot of robot attacks) Anyone please give me the code so I can add that in robots.txt.

    Thanks For The Help.

Viewing 1 replies (of 1 total)
  • Moderator threadi

    (@threadi)

    It should work like this:

    Disallow: /*.php$

    But that doesn’t matter for your actual problem. The robots.txt is intended to inform search engine bots about how they can handle URLs under the domain. Whether a bot adheres to this is up to it.

    If you are attacked by bots, however, they don’t care about this file at all. They simply crawl your web for possible URLs and send certain requests to URLs that they recognize. Only a security plugin can help here. Take a look at this article: https://developer.ww.wp.xz.cn/advanced-administration/security/hardening/

Viewing 1 replies (of 1 total)

The topic ‘How To disallow PHP in Robots.txt?’ is closed to new replies.