Bullk edit crawlability of pdf's in AEM | Community
Skip to main content
New Participant
August 22, 2022
Solved

Bullk edit crawlability of pdf's in AEM

  • August 22, 2022
  • 2 replies
  • 2993 views

Hi

 

Is there a way to bulk edit a few hundreds of pdfs - we want search engine bots not to crawl them but still searchable in internal search. But instead of doing it manually, is there a way we can bulk edit them in cUrl or any other easy way?

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sachin_Arora_

You can use Assets API if you want to update metadata using server scripts. Sample Command to update title.

Request: PUT /api/assets/myfolder/myAsset.png -H"Content-Type: application/json" -d '{"class":"asset", "properties":{"jcr:title":"My Asset"}}'

Link : https://experienceleague.adobe.com/docs/experience-manager-65/assets/extending/mac-api-assets.html?lang=en#update-asset-metadata

You can also use CSV file to do update of Asset metadata using Metadata Import in AEM.
https://experienceleague.adobe.com/docs/experience-manager-65/assets/using/metadata.html?lang=en#import-metadata

Please disable launchers/processing profiles while running scripts to avoid changing of lastModified property of asset and overload on AEM.

 

2 replies

HeenaMadan
New Participant
August 22, 2022

You can do bulk updates of Asset metadata using a CSV file. Refer https://experienceleague.adobe.com/docs/experience-manager-65/assets/using/metadata.html?lang=en#import-metadata

 

To prevent your PDF file from being listed in search results, use the HTTP X-Robots-Tag response header, e.g.:

X-Robots-Tag: noindex

OR 

rel="nofollow" on links to those PDFs

<a href="mypdf.pdf" rel="nofollow">Download PDF</a>

Refer https://developers.google.com/search/docs/advanced/robots/robots_meta_tag 

Sachin_Arora_
Sachin_Arora_Accepted solution
New Participant
August 22, 2022

You can use Assets API if you want to update metadata using server scripts. Sample Command to update title.

Request: PUT /api/assets/myfolder/myAsset.png -H"Content-Type: application/json" -d '{"class":"asset", "properties":{"jcr:title":"My Asset"}}'

Link : https://experienceleague.adobe.com/docs/experience-manager-65/assets/extending/mac-api-assets.html?lang=en#update-asset-metadata

You can also use CSV file to do update of Asset metadata using Metadata Import in AEM.
https://experienceleague.adobe.com/docs/experience-manager-65/assets/using/metadata.html?lang=en#import-metadata

Please disable launchers/processing profiles while running scripts to avoid changing of lastModified property of asset and overload on AEM.