Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Uploaded files publicly accessible by URL: how to find and fix it

DLV-242High impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A visitor fills in a form and attaches a file: a CV, a passport scan, a medical letter, a project brief. Your site saves that file somewhere. If that place is public, the file has a normal web address, and anyone who knows the address can open it without logging in.

Why it costs you leads or sales

How a private upload becomes public
  1. Visitor uploads fileCV, ID or brief attached to a form
  2. File saved in public folderFor example /wp-content/uploads/form-files/
  3. Link shared or guessableEmailed, pasted in CRM, or predictable name
  4. Anyone opens the fileNo login needed; may be indexed

The break is where the file is saved to a public path.

How to check if your site has it

Check whether uploads are public
  1. Submit a harmless test file

    Fill in your own form and attach a dummy file with a clear name such as test-upload.pdf. Do not use a real personal document.

  2. Find the file's URL

    Open the notification email, the form's entries screen or your CRM record and copy the file link. If there is no link, check the storage location in your form tool's settings.

  3. Open it while logged out

    Paste the URL into a private window. If the file opens or downloads, it is public.

  4. Test the folder

    Remove the file name from the URL and load the folder, for example yoursite.com/wp-content/uploads/form-files/. If you see a file list, directory listing is on.

  5. Search for indexed files

    In Google, search site:yoursite.com filetype:pdf (repeat for docx, jpg, xlsx). Any private document in the results is already exposed.

  6. Check your storage bucket

    If you use S3 or similar, open the bucket's permissions and look for public read access or a public access block that is switched off.

How to fix it

Lock down uploads by platform
  1. Check your form plugin's upload setting

    Many form plugins have an option to store uploads in a protected folder or to deliver them only as email attachments. Look in the plugin's settings and the individual field's settings for the storage location. Menu names vary by plugin.

  2. Block direct access to the upload folder

    On Apache, add an .htaccess file in the form upload folder with the rules in the snippet below. On Nginx, add a deny location for that path. Ask your host if unsure.

  3. Turn off directory listing

    Add Options -Indexes to .htaccess, or autoindex off on Nginx.

  4. Remove old files

    Delete files from past test submissions and from leads you no longer need.

Apache: block direct access and listing for a form upload folderhtaccess
# Place in the form upload folder's .htaccess
Options -Indexes
<IfModule mod_authz_core.c>
  Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
  Order deny,allow
  Deny from all
</IfModule>
Nginx: deny public access to a private upload pathnginx
location ^~ /wp-content/uploads/form-files/ {
    deny all;
    return 403;
}

autoindex off;
Uploads before and after the fix

Public

  • Files open without login
  • Folder lists every file
  • Search engines can index them
  • Old test and lead files kept forever

Private

  • Files return 403 or need a login
  • Directory listing is off
  • Links are signed and expire
  • Files deleted when no longer needed

How to confirm it's fixed

Re-run the stranger test
  1. Open the old URL in a private window

    The file should return an access denied, 403 or login page, not the document.

  2. Load the folder URL

    You should see an error, not a file list.

  3. Submit a new test upload

    Confirm the new file is stored privately and that your team can still open it through the intended route, such as a login or signed link.

  4. Ask search engines to drop old results

    If files were indexed, use Google Search Console's Removals tool and make sure the URLs now return 403 or 404.

How to prevent it happening again

Upload security checklist
  • Only ask for files you truly need
  • Store uploads in a private folder or bucket with public access blocked
  • Keep directory listing off on every server and environment
  • Use signed, expiring links in emails and CRM records
  • Set a retention rule and delete files after processing
  • Restrict file types and size on the server
  • Re-run the logged-out test after plugin, theme, host or storage changes
  • Never send file URLs to analytics or ad pixels

How FunnelGuard handles this

What FunnelGuard does do is run your real lead journeys on a schedule, such as a form submission, and confirm the steps work and that the test lead reaches your inbox and CRM. That tells you the upload field still submits, but not whether the stored file is private.

To watch for this issue today, put a recurring reminder in your calendar to repeat the logged-out test above, especially after plugin or hosting changes. You can also run a Google search for site:yourdomain.com filetype:pdf each month, and review your storage bucket's public access settings in your cloud provider's console.

Questions people ask

Why are my form uploads publicly accessible?

Most form tools save files in a normal web folder, such as /wp-content/uploads/ on WordPress, or in a storage bucket set to public read. Any file there has a web address that works without a login. Move uploads to a private location and serve them through a login or expiring link.

How do I check if files uploaded through my form are public?

Submit a dummy file through your form, copy its URL from the email or entries screen, and open it in a private browser window where you are logged out. If it opens, it is public. Also load the parent folder to see if directory listing is on.

Can Google index files uploaded through my contact form?

Yes, if the files are publicly reachable and linked from somewhere crawlers can find, or the folder lists its files. Search site:yourdomain.com filetype:pdf to check. Fix access first, then use Google Search Console's Removals tool.

How do I turn off directory listing?

On Apache, add Options -Indexes to your .htaccess file. On Nginx, set autoindex off in the server or location block. Then load the folder URL to confirm it shows an error instead of a file list.

Is a public upload link a GDPR data breach?

It can be, if personal data was exposed to people who should not see it. Whether it must be reported depends on the facts, so take advice from your data protection contact or a lawyer. Closing the access quickly and recording what happened is the first step.

How do I share uploaded files with my team safely?

Use a login-protected area or a signed link that expires after a short time, rather than a permanent public URL. Give access by role, and delete files when the job is done.

Does FunnelGuard check whether my uploaded files are public?

No. FunnelGuard does not check this yet, though it is a possible future check. It does run your real form journeys and confirms test leads arrive, so you can pair it with a manual logged-out test of your upload links.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.