WP Engine PDF Redirects + Exclude PDFs from search engines

WP Engine Redirect PDFs #

WPE has a redirect tool:

https://my.wpengine.com/installs/____/redirect_rules
(This is not htaccess, as WPE no longer supports htaccess)
My initial test showed it did not work for the PDF files, but I got on chat with WPE and they added an “nginx rule to proxy rule to read the pdf as a static file” according to support contact. This is now working and future PDF redirects should work using this tool as well.
If this comes up in the future, contact WPE to ask for this customization.

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”; }

 

Powered by BetterDocs

Newsletter

Subscribe and stay connected through our Newsletter. We send out important news, tips and special offers.

  • This field is for validation purposes and should be left unchanged.