Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

aanchal-sikka
Community Advisor
Community Advisor
Dec 7, 2023 6:07 AM UTC

@rookie80 

 

You would need to add following headers to pdf in Dispatcher

<LocationMatch "^/content/dam.*\.pdf.*">
Header set X-Robots-Tag "noindex, nofollow"
</LocationMatch>

 

Translate
Aanchal Sikka
rookie80Author
Dec 7, 2023 7:38 AM UTC

so where do I do this in AEM? can you please provide screenshots.

Thanks Mansi

Translate
aanchal-sikka
Community Advisor
Community Advisor
Dec 7, 2023 7:45 AM UTC

This configuration is done in Dispatcher. Please check for any existing config in code base via <LocationMatch keyword

 

It should be configured in following module:

<IfModule mod_headers.c>

 

 

Translate
Aanchal Sikka
Mahedi_Sabuj
Community Advisor
Community Advisor
Dec 7, 2023 6:36 AM UTC

HI @rookie80, You can prevent PDF from being indexed by search engines using robots.txt file.

Disallow: /*.pdf

 

 

Translate
Mahedi Sabuj
kautuk_sahni
Level 9
Dec 11, 2023 8:19 AM UTC

@rookie80 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Translate
Kautuk Sahni