Protect Files on Kinsta Managed WordPress Hosting

Here’s how to make our Prevent Direct Access (PDA) Gold work properly on Kinsta who uses Nginx webserver to power its hosting.

Add PDA Gold Redirect Rules

  1. Log into your Kinsta
  2. Select your domain, then click on “Redirects”
  3. Add these 2 new redirect rules as follows:

Private links

Redirect From: ^/private/([a-zA-Z0-9-_]+)$
Redirect To: /index.php?pda_v3_pf=$1&pdav3_rexypo=ymerex


Protected links:

Redirect From: ^/wp-content/uploads(/_pda/.*\.\w+)$
Redirect To: /index.php?pda_v3_pf=$1



  • You may want to escape special characters such as /private\/ or ^\/wp-content/
  • You don’t have to implement our rewrite rules under Kinsta’s Nginx config file, i.e. nginx_custom.conf

There you go. Now our PDA Gold should work properly on your Kinsta-hosted websites.

If you’ve changed Prefix for Private URL on our PDA Gold Settings page, you need to replace the word private accordingly.

Don’t forget to clear cache if you’re enabling CDN and/or Site cache.

Clear Site cache
Clear CDN cache
Lasted updated on August 3, 2022