M
M
Max Ba2018-10-26 15:32:30
Search Engine Optimization
Max Ba, 2018-10-26 15:32:30

How to index and page with pdf?

Guys, a question. There are many pdf instructions on the site. The search engine often gives links to the pdf file itself in the search, but it is necessary that the page is displayed. What's the best thing to do?
Pdf files contain different layouts with pictures and tables, from 1 to 20 sheets. Of course, you can also convert it to html format, but it is long and cumbersome. That is, a person downloaded the file and did not even visit the site.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Yudin, 2018-10-26
@RotgarSett

On the pages, you need to close links to pdf files in nofollow, and also prohibit indexing pdf in robots.txt.
Unfortunately, this does not guarantee that search engines will follow noindex, nofollow recommendations. Therefore, the most reliable way is to prevent search bots from accessing pdf files using .htaccess

A
Alexander, 2018-10-26
@NeiroNx

Probably it is necessary to check the referrer (header) when submitting the file and redirect to the site if it is not a site.

B
bkosun, 2018-10-26
@bkosun

Import the contents of the file directly into HTML:
For example, with Object:

<object
  data="https://example.com/test.pdf#page=2"
  type="application/pdf"
  width="100%"
  height="100%">
  <p>Your browser does not support PDFs.
    <a href="https://example.com/test.pdf">Download the PDF</a>.</p>
</object>

Object + Iframe:
<object
  data="https://example.com/test.pdf#page=2"
  type="application/pdf"
  width="100%"
  height="100%">
  <iframe
    src="https://example.com/test.pdf#page=2"
    width="100%"
    height="100%"
    style="border: none;">
    <p>Your browser does not support PDFs.
      <a href="https://example.com/test.pdf">Download the PDF</a>.</p>
  </iframe>
</object>

JS:
https://github.com/mozilla/pdf.js
Optionally set a redirect so that the file cannot be viewed directly and/or prevent them from being indexed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question