Skip to the indexed answers
Digital Marketing Index

usdigitalmarketingindex.com SEO

How should a PDF and its equivalent HTML page avoid competing for the same search intent?

By deciding which of the two should be the version found in search, and signalling that choice consistently. Where an HTML page and a PDF carry the same content, the HTML page is generally the better search destination: it has navigation, it adapts to the screen, it can be updated, and it can be measured. The PDF remains as a download for people who want to print or keep the document. The preference is declared with a canonical HTTP header on the PDF pointing to the HTML page, since a PDF has no HTML head to hold a canonical tag. Google’s documentation says the link element method works only for HTML pages, “not for files such as PDF”, and that in such cases the canonical HTTP header can be used (Google’s documentation on consolidating duplicate URLs). Where the PDF holds something the site has nowhere else, it is a resource in its own right, and the question of competition does not arise.

HTML and PDF use cases

Each format has uses.

Need Better format
Reading on a phone HTML
Landing from search and continuing to other pages HTML
Content that changes HTML
Forms, interaction, embedded media HTML
Accessibility with assistive technology HTML, built properly; PDFs need tagging to be accessible
Measuring visits and conversions HTML; a PDF opened directly from search runs no analytics tag
Printing with fixed layout PDF
Offline reference PDF
Signed, official, or legally fixed documents PDF
Long reports, manuals, data sheets as issued PDF
Material supplied by a third party as a file PDF

The cost of a PDF as a search landing page: the visitor arrives in a document viewer with no site navigation, no route to a next step unless links are inside the file, and no measurement.

A decision tree:

1. Does an HTML page on the site carry the same content as the PDF?
     Yes -> the two are equivalents. Go to 2.
     No  -> the PDF is a unique resource. Go to 5.

2. Which should be found in search?
     The HTML page (the default choice) -> go to 3.
     The PDF (the document is the official version, and the HTML
     is a summary or a copy)          -> go to 4.

3. HTML preferred:
     - PDF sends a canonical HTTP header naming the HTML URL.
     - HTML page links to the PDF as a download.
     - Internal links and the sitemap use the HTML URL.
     - Optionally, if the PDF must not appear at all:
       X-Robots-Tag: noindex on the PDF, instead of the canonical.

4. PDF preferred:
     - HTML page is a landing page that describes the document
       and links to it; it should say something the PDF does not,
       or else carry a canonical to the PDF.
     - Sitemap lists the PDF URL.

5. Unique PDF:
     - Let it be indexed.
     - Give it a descriptive file name, a document title, and
       real text.
     - Create an HTML landing page for it where the document
       matters: a summary, the key facts, and the download link.
     - Link to the PDF from relevant pages.

Equivalence is a matter of substance. A PDF that reproduces an article is an equivalent. A 60-page technical manual with a 200-word HTML summary is not: the manual is unique, and the summary is its landing page.

Canonical HTTP header options

For a PDF that duplicates an HTML page, the server sends a header with the PDF.

HTTP/1.1 200 OK
Content-Type: application/pdf
Link: <https://www.example.com/guides/boiler-pressure/>; rel="canonical"

Points about this signal:

Point Detail
What it is A statement of preference. Google's documentation describes canonical annotations as a strong signal, and lists the methods "in order of how strongly they can influence canonicalization"
What it is not A command. Google chooses the canonical using several signals, and can choose differently if they conflict
Target An absolute URL that returns 200 and is indexable
Consistency The HTML page's own canonical tag is self-referencing; the sitemap lists the HTML URL; internal links go to the HTML page
Where to set it Web server or CDN configuration, per file or by rule
Redirect instead Not suitable where the PDF should remain downloadable

The options side by side:

Aim Method Effect
HTML is preferred; PDF may still exist in the index as a duplicate consolidated to it <!–INLINECODE0–> header on the PDF A canonicalization signal
PDF must not appear in search at all <!–INLINECODE1–> header on the PDF Removes it from results once recrawled
PDF should not be crawled robots.txt disallow Stops crawling; not a reliable way to keep a URL out of results, and prevents the headers above from being seen
PDF replaced by the HTML page entirely 301 redirect from the PDF URL The PDF is no longer available at that address

Choose one. A PDF that is blocked in robots.txt cannot have its headers read, so combining a block with a canonical or noindex header defeats the header.

Because a canonical is a signal weighed with others, the surrounding signals should agree. If every internal link points to the PDF, the sitemap lists the PDF, and other sites link to the PDF, a header pointing elsewhere is one voice against several.

Linking and document downloads

How the two are connected on the site matters as much as the header.

Practice Reason
Link to the HTML page in navigation, body text, and sitemaps The preferred URL is the one the site itself uses
Offer the PDF from the HTML page as a labeled download: format and size stated Readers know what they will get
Put a link back to the HTML page inside the PDF, on the first page A visitor who lands on the file has a way into the site; Google's 2011 post on PDFs says links in PDF files are generally treated similarly to links in HTML
Include the organization's name, the document title, and a date in the PDF The file identifies itself when separated from the site
Keep the two in step When the HTML page is updated, regenerate the PDF, or mark the PDF with its date
Use one stable URL for the PDF Replacing the file at the same address keeps links working
Ask sites that link to the PDF whether the HTML page would serve their readers better Only where the HTML page is the fuller, current version

The statement about links inside PDFs is from Google’s 2011 post on PDFs in search results, and is dated accordingly.

Drift is the hidden problem. An HTML page revised three times and a PDF generated once say different things, and the older one is the one people saved.

For a unique PDF, make the file itself findable and readable: set the document title in its properties, use real text and not scanned images, give it a descriptive file name, and structure it with headings.

Verification

Check Method Pass condition
Header present Request the PDF and read the response headers Link header with the HTML URL and rel canonical; or the X-Robots-Tag, as chosen
Target valid Request the HTML URL 200, indexable, self-canonical
Through the CDN Request the public URL, not the origin Header survives
Not blocked Test the PDF path against robots.txt Allowed, if a header is relied on
Internal links Crawl; list links to the PDF Download links only, from the HTML page
Sitemap Search for the PDF URL Absent, where HTML is preferred
Google's choice URL Inspection on the PDF URL Google-selected canonical is the HTML page; or the PDF is excluded by noindex
Search results Performance report filtered to the PDF URL and to the HTML URL Impressions moving to the HTML page over time
Content parity Compare the two Same content, same date
File properties Open the PDF's document properties Title set; text selectable

If URL Inspection shows that Google selected the PDF as canonical despite the header, look for the signals pulling the other way: internal links, sitemap entries, external links, or an HTML page that is thinner than the file.

Allow time. The change is seen when Google next fetches the PDF, and PDFs may be fetched less often than pages.

All of this assumes the PDF contains real text. A scanned document, which is a picture of text, raises a prior question about whether its words are readable at all, covered in the guide to how to tell whether text in a scanned PDF is accessible to search engines.

The rule: where a PDF and an HTML page say the same thing, prefer the HTML page, declare it with a canonical header on the PDF, link to it everywhere, and keep the PDF as a dated download.

Link trail

Reader comments on this answer

Add your comment to this answer

Your email address will not be published. Required fields are marked *