A public PDF can remain downloadable while you ask Google not to show it in Search. Put the indexing instruction on the response that delivers the PDF itself. A setting on an HTML download page does not automatically apply to the linked file.
This example concerns a fictional, non-sensitive folding template at https://example.com/downloads/folding-template.pdf. The aim is search exclusion, not restricting who can download it. A confidential document needs an access restriction instead.
Find the request that delivers the PDF
Open the download link with browser developer tools available. In Network, distinguish the HTML guide or viewer from the actual PDF request. Record the requested URL, any redirect destination and the response delivering the file.
For this example, the HTML guide is /folding-guide/ and the PDF is /downloads/folding-template.pdf. They are separate resources. Confirm that the final file response delivers the intended document rather than an HTML login page or error message.
Google’s noindex guide supports an X-Robots-Tag response header for non-HTML resources, including PDFs. Google must be able to crawl the resource to discover that instruction.
Keep the HTML tag separate from the file header
To see the HTML form, open the Meta Tag Generator. Enter Folding Template Download as Page title, select noindex, follow under Robots, leave the optional social tags off and select Generate Meta Tags. The relevant output line is:
<meta name="robots" content="noindex, follow">
That is markup for an HTML document. The generator does not configure file responses or attach headers to a PDF. Putting this line on the HTML guide controls that guide; it does not establish a noindex instruction for the separate download.
For the PDF, configure this response header at the server, application, storage service or CDN that actually serves the file:
X-Robots-Tag: noindex
The MDN header reference describes this as an indexing instruction delivered through HTTP, including for non-HTML documents. It is not text to insert into the visible PDF page.
Apply the rule to the intended file and test its scope
Use the serving system’s response-header configuration, with a rule scoped to the intended file URL. Review an existing rule before adding another one. A CMS setting for an attachment page may affect an HTML page while leaving a directly served upload untouched.
For a controlled local test, we served a small synthetic PDF and added the header only to its exact path. The PDF bytes stayed identical before and after the change. These are delivery checks, not observations of Google’s indexing:
| Request checked | Response | PDF indexing instruction delivered? |
|---|---|---|
| HTML guide with a robots meta tag | 200 HTML; linked PDF still had no header | No |
| Target PDF after the file rule | 200 PDF with X-Robots-Tag: noindex |
Yes, on the target response |
| Unrelated catalog PDF | 200 PDF without the header | No; the rule stayed limited to the target |
Repeat those checks on your own staging setup. A rule matching every PDF could exclude documents you want in Search. Also verify that the intended download still opens correctly; a successful header check alone is not a document-content review.
Inspect the final response after deployment
This GET command follows up to five redirects and prints the received response headers. Replace the fictional URL with the public file address you control:
curl -sS -L --max-redirs 5 -D - -o /dev/null "https://example.com/downloads/folding-template.pdf"
On Windows, use curl.exe and replace /dev/null with NUL. The curl manual documents header output, redirect following and body-output options. Check the response block that delivers the final file, rather than stopping at a redirect’s headers.
For our intended PDF, the relevant final response fields should look like this manually prepared excerpt:
HTTP/1.1 200 OK
Content-Type: application/pdf
X-Robots-Tag: noindex
Request a neighboring PDF too and confirm that its indexing policy is unchanged. If storage or a CDN delivers the final file, inspect that public response after your normal deployment and cache-update process; an origin-only check may miss what visitors receive.
Keep the target crawlable so Google can read the header. Do not add a robots.txt block and expect it to convey the exclusion. The separate robots.txt versus noindex guide explains that distinction.
An already indexed PDF needs another crawl and processing before the instruction is reflected in Search. There is no fixed removal deadline. Keep the response evidence and monitor the result rather than treating a local test or generator preview as proof that Google has processed the file.