Answer: You have to implement a checkbox for the assets, Now your next task should be to implement a event handler / workflow / scheduler which will update the robots.txt file dynamically.
Example: Whenever user check/uncheck the custom implemented checkbox, it will get store in JCR. Now any of event handler / workflow / scheduler will take that stored property and updated the robot.txt file accordingly.
For PDF we do not have <meta> tag like we have for pages.
Here is more for you:
1) Use robots.txt to block the files from search engines crawlers:User-agent: * Disallow: /pdfs/ # Block the /pdfs/directory. Disallow: *.pdf # Block pdf files. Non-standard but works for major search engines.
2) Use rel=”nofollow” on links to those PDFs<a href="something.pdf" rel="nofollow">Download PDF</a>
Complete Documentation: http://www.robotstxt.org/robotstxt.html
AEM Community Thread Link 1, Link 2
No comments:
Post a Comment
If you have any doubts or questions, please let us know.