You probably want Google and other search engines to show most of your content in search results. But websites also have PDFs and other media that don’t need to be featured in those search results. So how do you tell Google what pages to show and which ones not to?
1) Navigate to the Media Library in the backend, hover over the PDF file you wish to edit and click on the pencil icon in the top left corner of the file.
2) An Attachment Details pop up will appear. Scroll down the bottom so you see Edit more details.
3) You are now in the attachment's page where you can edit the SEO for that media item. Scroll down to Yoast SEO and click on the Advanced tab. Here you can allow or block search engines from showing this content in search results and allow or block search engines from following links in a post or a page.
4) Once you have made your changes, scroll back up to the top of the page and click on the blue Update button.