I am looking for a way to prevent HTML certificates from appearing in search engine results. I assume this happens when participants share their certificates on social media, making a robots.txt file less effective. I believe an HTML header like <meta name="robots" content="noindex"> is more suitable for this purpose. Does anyone have experience with blocking search indexing as described by Google here: Block Search Indexing with noindex | Google Search Central | Documentation | Google for Developers in Tutor?
I wonder if this topic would give you a starting point: Is there an easy way to add a robots.txt to a tutor-based OpenEdX deployment? - it discusses how to use a robots.txt file to avoid crawling the whole site, which I realize is not your goal, but it could be useful? I don’t know how to answer your question but figured I’d point you in a potentially helpful direction.
Thank you! I actually used the answer you linked to create a robots.txt previously. But yes, I am still looking for a way to achieve this with the HTML header.
Hi @fabiasto, this might be a crude approach but I believe you might be able to inject the meta into the HTML header using the header/footer plugin slots.
For example, in tutor-indigo, the footer slot is used to inject the dark theme code into the MFEs and the mako templates. Here’s some code from tutor-indigo that might be helpful: