Skip to content

How to block User-Agent in robots.txt? #836

Closed

Description

@munkerjs

Hello,

We want to block some bots as User-Agent in the robots.txt file. How do we do this?

User-Agent: W3C-checklink
Disallow: /

User-Agent: W3C_Validator
Disallow: /

User-Agent: W3C_CSS_Validator
Disallow: /

These are a few examples. When we write these examples from the management panel, the result is as follows;

Adsız

How can we block this type of User-Agent data?

Activity

  1. Michael-Herzog commented on Sep 29, 2023

    @Michael-Herzog
    Contributor

    Currently this ain't possible by out of the box settings. We would have to add onther setting for this purpose. Until we have done this you could edit ths RobotsTextFile Action in the CommonController.
    Regards,
    Michael

  2. added this to the 5.1.0 milestone on Sep 29, 2023
  3. muratcakir commented on Sep 29, 2023

    @muratcakir
    Contributor

    I added the setting in a quick and dirty way. ExtraRobotsLines is a string setting and will be appended to the output as is, without prefixes.

    The setting is currently hidden and must be added/edited via Configuration / Settings / All settings.

  4. Michael-Herzog commented on Oct 4, 2023

    @Michael-Herzog
    Contributor

    Replace button Show items for 'Allow' below the textarea with a button group.

  5. added a commit that references this issue on Oct 10, 2023
    919478d
  6. added a commit that references this issue on Feb 6, 2024
    91146a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions