Publishing a PDF on your website: what search engines can read in it
A PDF is not just a picture of a page. Learn what Google can index in a PDF, how to test one before you publish it, and how to fix a mistake.
Yes, and more than most people expect. Google can read the text inside a PDF, not just its file name. A paragraph under a black box, an old document title, or a scanned page with an invisible OCR layer can all surface in search results. This guide shows what Google actually reads in a PDF, how to test a file before you publish it, and what to do if one already leaked.
What can search engines actually read in a PDF?
Google treats a PDF much like a web page. Its documentation lists Adobe PDF among the file formats it can index, and its systems extract the human-readable text inside the file with a dedicated parser. Every word the file contains, not only the parts a reader notices, can end up searchable. Google's own guidance on redacted content adds that images embedded in a document get indexed too, the same way images on an ordinary web page do.
- The full text of the file, pulled out by a PDF-specific parser.
- Links inside the file. Google's rule for blocking link-following, nofollow, applies to PDFs too, so by default it can follow them.
- Images embedded in the PDF, indexed the same way as images on a normal web page.
- The file name and the URL path, which can appear in search results even for a page Google was told not to crawl.
How does hidden text end up searchable?
A document can carry information a reader never notices. Say a hiring report draws a black rectangle over a paragraph naming Jane Example. Google's own guidance is direct about this method: the rectangle does not remove her name underneath. The words stay in the file, so a search engine's parser can still read them, even though a person looking at the page sees only a solid bar.
- A black rectangle placed on top of the text layer, instead of deleting the text.
- An OCR text layer behind a scanned page: the image looks blank of anything sensitive, but the invisible text layer under it is exactly what gets indexed.
- Metadata in the file's properties, such as an old title, an author name, or the name of whoever last edited it.
- A saved change history, kept by some formats, which can expose a version of the text an editor thought was gone.
How do you test a PDF before you publish it?
Before a PDF goes live, run it through the same checks a crawler would. Each one takes a minute, and together they catch most mistakes.
| Step | How to do it | What it catches |
|---|---|---|
| Select all the text | Open the PDF, press Ctrl+A (Cmd+A on a Mac), and paste into a text editor. | Text hidden under a black box or a covering image: anything selectable is anything indexable. |
| Search the file | Use your PDF reader's search bar for a name or term you meant to remove. | A leftover mention a visual check misses, especially in a long report. |
| Check the properties | Open the Properties or Document Info panel and read the title, author, and company fields. | An old working title or a staff member's name left from an internal draft. |
| Check the file name and URL | Look at the exact file name and folder path before you upload it. | A client's name or a case number typed straight into the file name. |
ONYRI Sanitize takes a different route for a document you plan to publish. It exports every anonymized file as a flattened PDF built from page images. That way, no text layer is left under a mask for a crawler to read, and the original's title and author properties are not carried over. The trade-off is real: a flattened PDF is no longer searchable text, which does not suit every public document.
How do you keep a PDF out of Google Search?
Two tools sound similar but do very different jobs, and mixing them up is the most common mistake: robots.txt and a noindex rule.
| Method | What it actually does | Why it is not enough alone |
|---|---|---|
| robots.txt | Tells Google's crawler which URLs not to request. | Google calls this not a mechanism for keeping a web page out of Google. A blocked URL that other pages link to can still appear in results, just without a description. |
| X-Robots-Tag: noindex | An HTTP header your server sends with the file, telling Google not to show it in results. | Google must crawl the file first to read the header. Block that crawl and the noindex rule is never found, so never combine the two on one file. |
In practice: leave the PDF crawlable, and add an X-Robots-Tag: noindex header for that file, or a whole folder, on your server. Then remove any robots.txt rule that blocks the same path. For a file only certain people should reach, put it behind a login instead, and give that login page its own noindex tag.
What do you do after a PDF mistake is already public?
If a PDF with the wrong content is already indexed, move fast, and follow this order.
- Take the file down, or replace it with the corrected version, right away.
- In Search Console's Removals tool, ask for the exact URL to be hidden. For a verified site this usually works within a day and lasts about six months.
- Publish the corrected file at a new URL, so the version Google finds next is not confused with the old one.
- If another site copied the file, ask them to remove it too, or use Google's tool for outdated content if you do not own that site.
- Check a web archive such as the Wayback Machine; some let an owner request that a page be excluded.
Frequently asked questions
Does deleting a page from a PDF remove the text Google already indexed?
No, not on its own. Removing a page changes the file you host now, but Google may keep showing an older cached version for a while. Publish the corrected file, then use Search Console's Removals tool to ask for the old result to be dropped.
Can Google index a scanned PDF that has no text layer at all?
A plain scan is only a picture, so there is no text for Google to extract on its own. But if you, or a PDF tool, run OCR on it, the invisible text layer that gets added is exactly what becomes searchable.
Does noindex work the same way on a PDF as on a normal web page?
The rule is the same, but the delivery differs. An HTML page carries a meta tag in its head section. A PDF cannot hold that tag, so you send an X-Robots-Tag: noindex header from your server instead, and Google still needs to crawl the file once to see it.
Is a generic file name enough to protect a name inside a PDF?
No. A generic name only hides the risk in the URL, not inside the file. Google's guidance notes a file name or URL can expose information on its own, so pick a neutral name and still check the text inside.
Does a password on a PDF keep it out of Google Search?
A login page in front of the file is one of Google's own suggested options, as long as that page itself carries a noindex tag. Without a login, Google's crawler can reach the file directly, no matter how obscure the name is.
Sources & references
- File types indexable by GoogleGoogle Search Central
- Keep redacted information out of Google SearchGoogle Search Central
- Robots meta tag, data-nosnippet, and X-Robots-Tag specificationsGoogle Search Central
- Introduction to robots.txtGoogle Search Central
- Removals tool and SafeSearch reportingGoogle Search Console Help