WP Engine Redirect PDFs #
WPE has a redirect tool:
Rules to redirect specific PDFs (no regexp) #
Source (origin): Just add a ^at the beggining of the URL (without the domain). For example, if you want to redirect from https://www.mightyminnow.com/test/my-test.pdf you would add ^/test/my-test.pdf
Destination: Just add the full URL of the destination.
Example:
WP Engine Exclude PDFs #
NGINX rule that has been applied to specific client sites to exclude PDFs from search:
location ~* (.*\.pdf) { add_header X-Robots-Tag “noindex, nofollow, nosnippet, noarchive”; }
9/10/24 update: they no longer were helpful about this. The way to ASK google not to index pdfs is by creating a custom robots.txt file in Yoast:
/wp-admin/admin.php?page=wpseo_tools&tool=file-editor
That states:
User-agent: *
Disallow: /*.pdf$