Hello @metronomi,
We understand that you will like to noindex certain PDF files. However, individual media files like PDF files, cannot be “noindexed” using the Yoast SEO plugin. This is because, when you directly access these files, they are not served through WordPress.
To “noindex” PDF files, please look into using the “X-Robots-Tag”. We have an article explaining what this tag is and some examples on how to use it to noindex PDF files. You can find the article here.
Thanks.
Thanks for the quick answer !
I would first like to add pdf to my attachment sitemap because i don’t see how to add them in this sitemap ?
http://enov.fr/attachment-sitemap.xml
If i correctly understand i can’t add certain pdf to the sitemap, but i can add all of these type of media (pdf) in the sitemap ?
@metronomi,
Yoast SEO doesn’t include links to PDF files in the XML sitemap. However, if a link to the PDF file is not included in the sitemap, Google will be able to discover it when crawling the page where it’s embedded. So, you don’t have to worry about Google not being able to find the pdf files on your website.
Thanks