1

I'm setting up downloads functionality with form-locked PDFs - available after the user fills-out a form. I want the PDFs to be indexable by search engines though. Im trying to create a JSON-LD markup, that would allow the search engines index those PDFs. This is the code I came up with for the moment.

{
    "@type": "PresentationDigitalDocument",
    "name": "Name of the document",
    "author": "",
    "inLanguage": "";
    "encodingFormat": "application/pdf",
    "isAccessibleForFree": "False",
    "url": ""
}

The question is, if the search engine will actually go to the URL specified, crawl the PDF and index all of its content? Or shall I rather use cssSelector instead of URL and write the whole content of the PDF file in a hidden div as HTML - like this:

    {
    "@type": "PresentationDigitalDocument",
    "name": "Name of the document",
    "author": "",
    "inLanguage": "";
    "encodingFormat": "application/pdf",
    "isAccessibleForFree": "False",
    "url": ""
       "hasPart": {
          "@type": "WebPageElement",
          "isAccessibleForFree": "False",
          "cssSelector": ".css-class"
       }
    }
  • Search engines don't use JSON-LD to index PDF files as far as I'm aware - they only use old-fashioned links. Is there any other reason you want to implement JSON-LD? Because again - as far as I am aware - it has no effect on PDF SEO or indexing. – Maximillian Laumeister May 28 at 19:04
  • Thank you for the answer. What other way may I make search engines index PDFs, that are form-locked? I thought they would see the url in the JSON-LD and would follow it. But if it is not the case, how can I achieve it? Shall I copy the text from the PDF, put it into html and mark it in JSON-LD as "isAccessibleForFree": false? I have a huge knowledge base in PDFs, which I want to provide to users, but I would like them to leave their emails if they want to download the PDFs. If the PDFs will not be indexed, users will not know about the content. – ideapix May 28 at 19:15
0

Google’s documentation for subscription and paywalled content doesn’t mention that files are supported.

If files are supported, I would expect the following to work (based on the documentation for the usual case of HTML content):

  • Link the PDF in the HTML. Add a class to this HTML.

    <p class="registration-required">
      <a href="file.pdf" download>Download the PDF</a>
    </p>
    
  • Reference this class in cssSelector. Unfortunately, the documentation doesn’t say if all CreativeWork types are supported, or only some. I think WebPage would make the most sense in your case.

    {
      "@context": "https://schema.org",
      "@type": "WebPage",
      "isAccessibleForFree": "False",
      "hasPart":
        {
          "@type": "WebPageElement",
          "isAccessibleForFree": "False",
          "cssSelector" : ".registration-required"
        }
    }
    

    (It shouldn’t hurt to provide the PresentationDigitalDocument (with the url) in addition, I think.)

If files aren’t supported (so the Googlebot wouldn’t follow the hyperlink, or wouldn’t understand that this PDF isn’t supposed to be publically accessible), adding the content of the PDF in the HTML should certainly work.

However, note that you probably don’t want to visually hide this content, because visitors would be able to find it. Instead, you could deliver this content only to the Googlebot. The structured data has the purpose to prevent that Google considers it to be cloaking.

  • Thank you for your answer. I will try and if I find a solution, I will post it here. It will probably take some days to verify, if the PDF gets indexed, though. – ideapix May 31 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.