Hi guys, how are you?
Today we will see how to make a PDF file that we have in our WordPress media library not be indexed by Google search engines.
To do this we will have to follow the following steps:
1- Let's download the WordPress Yoast SEO plugin:
We install and activate it:
2- Upload the PDF file to the media library:
3- Select the file already uploaded and click on Show more details:
4- In the Yoast SEO settings for the media element click on the gear icon and select NO in: Allow search engines to show this media in results?
If this Yoast option does not appear by default, do not worry, it is a configuration issue.
Go to SEO in the menu on the left and select Appearance in search engine and click on the Media tab:
and on the question: Redirect attachment URLs to the attachments themselves?
Select NO
The other options must be as in the image.
Once you've completed these steps, click Update and you're done.
Your PDF file will not be indexed by Google search engines.
See you in the next one 😉