1

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?

dbc
  • 104,963
  • 20
  • 228
  • 340
user1256378
  • 712
  • 2
  • 12
  • 31
  • Not sure this is on-topic here. You might also ask on https://webmasters.stackexchange.com. See: https://webmasters.stackexchange.com/help/on-topic – dbc Aug 14 '19 at 19:42
  • 1
    I think the user-agent is "Chrome-Lighthouse" for lighthouse, but I'm not sure how to write the syntax for robot.txt – user1256378 Aug 14 '19 at 19:48
  • 2
    OK, then maybe see [Disallow all for all user agents except one user agent?](https://stackoverflow.com/q/33617859). – dbc Aug 14 '19 at 19:55

1 Answers1

3

Thank you dbc the link gave me the answer

useragent: *
disallow= /

useragent: Chrome-Lighthouse
allow= /

Based on the comment it should be:

User-agent: *
Disallow: /

User-agent: Chrome-Lighthouse
Allow: /
unor
  • 92,415
  • 26
  • 211
  • 360
user1256378
  • 712
  • 2
  • 12
  • 31