Robots.txt allow assetlinks.json

Viewed 363

I want to allow robots.txt for https://myhostname/.well-known/assetlinks.json but disallow everything else.

I'm using this:

User-agent: *
Allow: /$
Disallow: /

or this:

User-agent: *
Allow: /.well-known/assetlinks.json
Disallow: /

Which one of them is the correct one? Thanks.

1 Answers

This is enough:

User-agent: *
Allow: /.well-known/

You don´t need to use "Disallow" if you don't want to prevent that the engine crawlers access on your site.

Related