A PDF price list appears in search, although the team wants to direct visitors to a service page. In another section, a PDF contains the only complete set of instructions, which is convenient to download and print. Applying the same rule—“exclude all PDFs”—solves the first problem at the cost of harming the second. Choose a policy based on the content and user scenario for each document type.
Start with a small inventory: the file URL, its purpose, its HTML version, differences in content, and the expected visitor journey. Then choose a primary version, exclusion from search, or retention of both as independent publications. Verify the actual configuration in the public file’s HTTP response, not just in the CMS interface.
Determine the document’s purpose for readers
A PDF may be equipment instructions, a contract appendix, a catalog, a report, or a copy of an article. For each purpose, ask whether people need the entire file and whether the site provides enough context. A long technical manual has different value from a price list with no effective date.
Assess how often the content changes. For terms that change frequently, it is more convenient to maintain a single source and clearly identify archives. For a completed report, a stable PDF version may be part of its purpose. The format alone does not indicate how current or useful the information is.
Don’t start with directives. First, record the content owner’s decision: what people should find, where they can read the current terms, and which file they should save. Without that decision, technical configuration merely locks in an arbitrary choice. For material with outdated information, see how to handle outdated pages.
Compare HTML and PDF content
Open both versions. Compare the headings, main sections, tables, prices, and dates. A two-paragraph HTML announcement and a full PDF report are not automatically equivalent copies. Choosing a canonical requires a meaningful comparison of the content, not just a shared topic.
If the versions are nearly identical, choose a preferred URL and explain why. For HTML, this might be convenient navigation and a current description. For PDF, it might be the official complete publication that users already link to. Record which external and internal links you can check; don’t assume that unknown connections don’t exist.
If there are duplicates, follow the process for checking duplicate content. First confirm the similarity, then align the signals for the primary URL. Renaming a file or changing its extension does not fix contradictory content or automatically determine which version should appear in search.
Choose a solution using the scenario table
The table helps define a policy for a group of documents. The examples are illustrative and require checking the actual content before implementation.
| Scenario | Preferred solution | What to check |
|---|---|---|
| Full report available only as a PDF | Keep it available as a publication | Title, date, links, and content |
| Article published identically in two formats | Choose a primary version | Similarity and canonical consistency |
| PDF for a completed promotion | Update the context or restrict it from search | Dates and a link to the current offer |
| Internal file for partners | Restrict access | Authorization and separate copies |
| HTML announcement and detailed PDF instructions | Evaluate them as different materials | The independent usefulness of each |
Don’t apply a rule to every file with that extension until you’ve made a list of exceptions. A single folder may contain both public instructions and outdated terms. The content owner needs to confirm the action for each group of files and identify documents for which the decision is still open.
Set the canonical in the file’s HTTP header
You can’t add an HTML tag to the beginning of a PDF as an ordinary part of the page. For documents outside HTML, Google supports specifying the primary version using the HTTP header Link with rel="canonical"; this is described in Search Central. The value must be the agreed-upon absolute URL.
In this illustrative example, the PDF duplicates the guide page chosen as the primary version:
HTTP/1.1 200 OK
Content-Type: application/pdf
Link: <https://example.com/manual>; rel="canonical"Add this configuration to the response from the server or layer that serves the file. If the PDF is hosted on separate storage or a CDN, check whether the header can be set there. A canonical on the page with the download link does not replace the header on the PDF itself.
A canonical indicates a preference; it does not set a password or prevent access. Don’t describe it as a security measure. After implementation, check the target URL, make sure there are no loops, and confirm that the chosen version is accessible. Whether the search engine selects that URL is monitored separately from whether the signal was sent correctly.
Use X-Robots-Tag to exclude a file from search
If the decision is to exclude a specific public PDF, pass the directive noindex through X-Robots-Tag in the file’s HTTP response. Google documentation describes this method for resources where HTML meta tags don’t apply. The crawler needs access to the response to read the directive.
HTTP/1.1 200 OK
Content-Type: application/pdf
X-Robots-Tag: noindexAgree on the exact paths or group of documents. A rule covering all PDFs, without an inventory, may exclude useful instructions and research. Don’t combine changes with different goals out of habit: canonical selects a representative for duplicate content, while noindex excludes a URL from the results of a system that supports it.
If the file contains confidential information, restrict access using authorization or another form of protection. Excluding it from search does not make the document inaccessible to someone with the URL. The differences between managing crawling and indexing are described in the guide to robots and X-Robots-Tag.
Check the real URL’s public response
Retrieve the file using the address available to visitors, retaining the status, headers, and final URL after redirects. If the file is downloaded through an application, check that route. Headers from a different address or a local server do not confirm the CDN response on the public domain.
For a technical check, you can make an agreed-upon GET request and save the headers without outputting the document. Don’t rely on HEAD alone: some applications handle methods differently. Also open the file to confirm that the address returns the expected PDF, not an HTML error with the same name.
For a single URL, you can start with a technical page analysis, supplementing it with a check of the file’s HTTP headers. If the tool you use doesn’t show the required headers or support that document, state this limitation of the check. An unavailable check does not confirm that the directive is absent.
Align links and update procedures
If HTML is chosen, the link to the PDF should explain its purpose: a printable copy, a full report, or an archive. If the PDF remains primary, provide a clear title and date on the page that links to the download. Internal links should help readers while remaining consistent with the chosen version.
When updating a file, check whether its URL will remain the same and what copies exist in a cache or other storage. Replacing the document at the same address requires checking the actual content. A new address requires reviewing links and header rules. The technical team and editor should understand this process in the same way.
Don’t promise that adding a canonical will cause the PDF to be replaced by HTML in search results immediately. First confirm the published signal, then monitor how search processes it. The log should record two states: “configuration checked” and “search engine selected a version.” Some time may pass between them.
Confirm the outcome for each document type
For each selected group, confirm the purpose, the owner’s decision, the actual response, and the correctness of the content. In a sample, check both files that are excluded and files that should remain available to search. This helps catch an overly broad server rule.
The acceptance record should include the PDF URL, associated HTML, expected headers, received headers, and time of check. Separately record the search indexing status, if it was investigated. If it hasn’t changed yet, mark monitoring as incomplete while retaining confirmation of the technical configuration.
A good solution preserves useful documents and resolves specific conflicts. For one file, that may mean canonical; for another, noindex; for a third, access protection. An inventory with verified responses makes it possible to change rules selectively and check the consequences the next time the catalog is updated.