robots.txt block all except lighthouse

I have a staging site, that I want to be able to test via google lighthouse - but do not want google to index it.

When I use this:

User-agent: *
Disallow: /

Lighthouse and google are blocked.

I think the user-agent is "Chrome-Lighthouse" for lighthouse (source), but I'm not sure how to write the syntax for robot.txt.

Any suggestions?

1 answer

  • answered 2019-08-14 21:30 user1256378

    Thank you dbc the link gave me the answer

    useragent: *
    disallow= /
    useragent: Chrome-Lighthouse
    allow= /