Skip to content
Searcle Book a demo

Make the HTML Report Canonical Without Removing the PDF

Nina Okonkwo

How to canonicalize duplicate HTML and PDF reports, configure the PDF’s HTTP Link header, and handle noindex, sitemaps and testing.

When a B2B report exists as both a web page and a downloadable PDF, make the HTML page canonical if it contains the same substantive report. Keep the PDF available for downloading, but return an HTTP Link header with the PDF response that points to the HTML URL.

That setup gives buyers a practical file to save or share while indicating that the web page is the version you prefer in search results. Canonicalization is a signal rather than a guarantee: Google may choose a different representative URL. Google classifies redirects and rel="canonical" annotations as strong signals, while sitemap inclusion is weaker (Google Search Central).

The recommended configuration

Assume the report has these URLs:

  • HTML: https://example.com/reports/b2b-benchmark
  • PDF: https://example.com/reports/b2b-benchmark.pdf

Put a self-referencing canonical in the head of the HTML page:

<link rel="canonical" href="https://example.com/reports/b2b-benchmark">

Then configure the PDF response to include:

HTTP/1.1 200 OK
Content-Type: application/pdf
Link: <https://example.com/reports/b2b-benchmark>; rel="canonical"

A PDF has no HTML head, so its canonical must be delivered as an HTTP response header rather than inserted as an HTML tag or PDF metadata. Google explicitly supports the rel="canonical" HTTP header for non-HTML documents such as PDFs, recommends an absolute target URL and limits its stated support for this method to web search results (Google Search Central).

Use one canonical declaration method for each response. In this example, the HTML response uses the HTML element and the PDF response uses the HTTP header. Do not give either resource multiple, conflicting canonical destinations. The canonical-link specification describes the target as the preferred duplicate or content superset and recommends only one canonical relation per resource (RFC 6596).

Check that the versions are genuinely equivalent

This implementation is appropriate when the HTML page reproduces the report’s meaningful content: findings, methodology, supporting explanation, and charts or accessible equivalents. The presentation can differ.

Do not point a complete 40-page PDF to a thin HTML landing page containing only an abstract and lead form. Under the canonical-link specification, the target should duplicate or contain the source content. If the web page omits most of the report, choose one of these options:

  1. Expand the HTML page into a complete web version, then canonicalize the PDF to it.
  2. Keep the PDF independently indexable if it is the only complete public report.
  3. Restrict access to the PDF or exclude it from search if public discovery is not part of its job.

The first option often provides the clearest path for an ungated B2B research asset. The HTML version can support navigation, accessible reading, updates and conversion paths; the PDF still serves people who want an offline copy.

Canonical and noindex solve different problems

Do not add X-Robots-Tag: noindex to the PDF merely because it is a duplicate. Google recommends rel="canonical", rather than noindex, when the purpose is to select a canonical within a site (Google Search Central).

Use noindex when the requirement is stricter: the PDF should not appear in search at all. Non-HTML files must receive that instruction through the response header:

X-Robots-Tag: noindex

Google documents X-Robots-Tag as the method for controlling indexing of PDFs and other non-HTML resources. It also says crawlers can read these rules only when they are allowed to access the resource (Google Search Central). Do not block the PDF in robots.txt and expect Google to process either its canonical or its noindex header.

Align the supporting signals

Once HTML is the preferred version:

  • Include the HTML URL, not the PDF, in the XML sitemap.
  • Link to the HTML report from resource hubs, articles and campaign pages.
  • Keep a clearly labelled “Download PDF” link on the HTML page.
  • Point PDF variants on a CDN or media subdomain to the same canonical HTML URL.
  • Redirect obsolete report URLs only when they have genuinely been retired.

Google advises linking internally to the canonical URL and avoiding conflicting declarations across canonicalization methods. It also treats sitemap inclusion as a canonical signal, although a weaker one than a canonical annotation (Google Search Central). For broader sitemap hygiene, list only URLs intentionally eligible for search, as explained in this ecommerce sitemap guide.

Test the public PDF response

Check the final GET response rather than trusting a CMS field or origin-server setting:

curl -sD - -o /dev/null https://example.com/reports/b2b-benchmark.pdf

Confirm that the response is 200, the Content-Type is application/pdf, and the Link header contains the exact absolute HTML URL. Test the public CDN path as well as the origin if possible; a server rule does not help if an intermediary removes the header.

After Google has had an opportunity to recrawl the URLs, use URL Inspection in Search Console to review the available canonical and indexing information. Treat the declaration as a preference, not a command. If Google continues to select the PDF, compare the actual report content and recheck the sitemap, internal links, redirects and canonical declarations for inconsistent signals.