I want to block search engine crawler, by my want, through custom script.
I searched for this, and I found that if I insert this tag to head, I can do it.
<meta name="robots" content="noindex">
So I tried these:
First try
var norobotmetatag = document.createElement('meta');
norobotmetatag.name = 'robots';
norobotmetatag.content = 'noindex';
document.head.appendChild(norobotmetatag);
Second try
var norobotmetatag = document.createElement('meta');
norobotmetatag.setAttribute('robots', 'noindex');
document.head.appendChild(norobotmetatag);
Third try
var norobotmetatag = document.createElement('meta');
norobotmetatag.setAttribute('name', 'robots');
norobotmetatag.setAttribute('content', 'noindex');
document.head.appendChild(norobotmetatag);
All try failed. I assume that this is prohibited act in writefreely now.
Am I right?
After this, I found Publicity setting, So I set the Publicity setting as Unlisted now.
But I want to know that is this technically possible.
For example, I may want to block some AI LLM crawler by similar way.
Thank you :D!