Mobile app version of vmapp.org
Login or Join
Megan663

: Explicitly whitelist every page using robots.txt I need to allow only specific pages at some site. Let's say: / /page1 /page2 ... Now I don't get how to whitelist the root page at robots.txt

@Megan663

Posted in: #RobotsTxt

I need to allow only specific pages at some site. Let's say:

/
/page1
/page2
...


Now I don't get how to whitelist the root page at robots.txt

Disallow: / # block everything
Allow: /page1
Allow: /page2
Allow: ? # how to allow the / ???


And I'm stuck here, because Allow: / will allow everything back

Is it even possible?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Megan663

1 Comments

Sorted by latest first Latest Oldest Best

 

@Rivera981

You should be able to use a $ sign which indicates the end of the string.

For example

Allow: /$

If you go to the bottom of Google's robots.txt help, you can see a similar example.
developers.google.com/webmasters/control-crawl-index/docs/robots_txt

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme