deindexpages.com
Page types

How to remove a PDF from Google search results

PDFs rank, get linked and stay in the index long after the page that introduced them is gone. Because a PDF has no HTML head, the meta tag is not an option. You have three real choices: delete it, protect it, or send a noindex header.

Choose your approach

GoalMethod
File should disappear for everyoneDelete it and return 404 or 410
File must stay downloadable by those with the link, but not be searchableX-Robots-Tag: noindex on the PDF response
File is confidentialAuthentication, then delete or restrict; plus a temporary removal for speed
File was replaced by a newer version301 from the old URL to the new file or page, or update in place at the same URL

Option 1: delete and return a 404 or 410

This is the cleanest outcome. Google's documentation on HTTP status codes says it does not use content from 4xx URLs and removes already-indexed ones. Read 404 vs 410 for details. After deletion:

  1. Remove the file from the server or storage bucket, including any CDN copies. Purge the CDN.
  2. Check curl -I https://example.com/files/old.pdf returns 404 or 410, not 200.
  3. Remove links to the file from pages and the sitemap.
  4. Do not block the path in robots.txt, so Google can see the error.
  5. Use URL Inspection to request a recrawl.

Option 2: send an X-Robots-Tag noindex header

If the file has to remain accessible, serve it with the header. Google says X-Robots-Tag works for non-HTML files such as PDFs. See the X-Robots-Tag guide for server-specific code. Apache example:

<FilesMatch "\.pdf$">
  Header set X-Robots-Tag "noindex"
</FilesMatch>

Apply to a single file by matching its name, or to a directory by placing the rule there. The PDF must remain crawlable; do not disallow it in robots.txt.

Option 3: protect behind authentication

For documents that should never have been public, use a login, signed URLs, or a private bucket. Googlebot cannot index what it cannot fetch. Combine with deletion of public copies.

Speed it up with a temporary removal

When exposure is urgent, hide the URL while the permanent fix is applied. In Search Console, open the Removals tool, create a new request for the exact PDF URL, and keep the permanent fix in place. The hide lasts about six months, according to Google, and the file itself is untouched.

Handling multiple copies and variants

Replacing a PDF with an updated one

If a new version supersedes the old, keep the URL stable and overwrite the file where possible, so links and rankings carry over. If you must change the URL, 301 the old one to the new file or to a page that explains it. Google may take time to update the snippet; see cached and outdated content for options to speed that up.

Why a PDF "won't go away"

  1. robots.txt blocks it. Google can't see the header or the 404. See why robots.txt does not deindex.
  2. A CDN serves a cached response without your header or with the old file.
  3. Another URL variant is still live.
  4. The PDF returns 200 with an HTML error page (a soft 404).
  5. It has not been recrawled yet. PDFs can be crawled infrequently.

Work through the troubleshooting checklist for the rest.

Prevention

Verification

After changes, check the live response with curl -I, inspect the URL in Search Console, and monitor the Page indexing report. For approach and expectations, see how to verify a page is deindexed.

Worked example

A company accidentally uploaded /wp-content/uploads/2026/q3-board-deck.pdf, and it shows up for a branded search. The steps: delete the file and purge the CDN; confirm a 404 with curl -I; file a temporary removal for the exact URL; remove the link from the post that referenced it; and search for a distinctive phrase from the deck to find other copies, such as an attachment page or an email archive on the same domain. Finally, review who has upload permission and whether sensitive documents should have been stored in a private location in the first place.

Frequently asked questions

Can I put a meta noindex tag in a PDF?

No. PDFs have no HTML head. Use the X-Robots-Tag HTTP header.

Will deleting a PDF remove it from Google?

Yes, after Google recrawls the URL and sees the 4xx status. Use the Removals tool to hide it sooner.

Does robots.txt remove a PDF?

No. A disallowed PDF can stay indexed without a description, and Google cannot see a noindex header on a blocked file.

How long does it take?

A temporary removal is often within a day; header or deletion effects depend on recrawl. See how long deindexing takes.