: Robots.txt file Question User-agent: Mediapartners-Google Disallow: User-agent: * Disallow: /account.php Disallow: /cart.php Is the above actually blocking crawlers? i just saw the extra "disallow" after
User-agent: Mediapartners-Google
Disallow:
User-agent: *
Disallow: /account.php
Disallow: /cart.php
Is the above actually blocking crawlers? i just saw the extra "disallow" after the Google
More posts by @Jamie184
3 Comments
Sorted by latest first Latest Oldest Best
Note that this is not a valid robots.txt. Parsers may understand it anyway, but you can’t be sure, especially not for the future.
Each record needs to be separated by at least one blank line.
So your robots.txt should look like:
User-agent: Mediapartners-Google
Disallow:
User-agent: *
Disallow: /account.php
Disallow: /cart.php
Meaning of this robots.txt:
the bot Mediapartners-Google may crawl all resources
all others bots may crawl all resources except those whose URL paths start with account.php resp. cart.php.
When you have Disallow followed by nothing, that effectively means "allow all":
Disallow:
If you want to block all, that's:
User-agent: *
Disallow: /
So, in your example, you are allowing Mediapartners-Google access to everything, and then disallowing all other crawlers from these two pages:
User-agent: *
Disallow: /account.php
Disallow: /cart.php
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.