Hot answers tagged

34

To prevent your PDF file (or any non HTML file) from being listed in search results, the only way is to use the HTTP X-Robots-Tag response header, e.g.: X-Robots-Tag: noindex You can do this by adding the following snippet to the site's root .htaccess file or httpd.conf file: <Files ~ "\.pdf$"> Header set X-Robots-Tag "noindex, nofollow" </...


18

Normally, I recommend replacing fillable PDFs with regular web forms I think overall, yes, that would be the ideal solution, but you noted some of the the issues with this, which includes how to handle all the existing content already made. We run into issues constantly because web browsers love to open PDFs in browser instead of opening the files in the ...


10

You could try to force downloading of the PDF, so that it opens in the default application for viewing PDF files instead of the browser. See this question: How do I force files to open in the browser instead of downloading (PDF)?


9

Basically, you need to force the download of the PDF file. If you edit the .htaccess file and add this code, all PDF files should be downloaded instead of opened in your site. <FilesMatch "\.(?i:pdf)$"> ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch> If that's not an option, add a message ...


8

Google does read in your PDFs, even the spammers do!


5

Google treats the text content of PDFs just like normal web pages in most respects. The way they tell something is a PDF is by the HTTP headers the server sends, and just like with normal web pages they discover it with their web crawler based on incoming links. If the PDF is your own content from the same domain, they will probably be lax about the ...


5

There is no standard practise. You'll have to re-think your process: Why do your customers have to fill out PDFs in the first place? Do you just need structured data from the customer? Who needs the PDF later, a government agency? Do you have to provide the customer with the same PDF? Can your company create web forms instead of PDFs? Can you auto-generate ...


4

It's my understanding that we at Google don't use any of the language meta-information within PDF files. You can, however, use the hreflang information via HTTP header or Sitemaps file for non-HTML content too.


4

In the eyes of Google, a PDF is just another web page – a web page that offers a prime opportunity to boost your content ahead of your competitors and vice versa. The reason I say is that Google ranks PDF files in the SERPs. It is sure that it crawls the PDF files. If PDF content is fresh and relevant, it will increase your website reputation. It always ...


4

Yes, Google counts links in PDF files the same way they count links in HTML. We know this because an online retailer got in trouble with it. They have an educational discount program. They gave a PDF brochure with special prices to educational institutions. Many of those posted it on their websites for their staff to use. That PDF file included ...


4

I'd say it's more likely to be a 206 (Partial content) code. One PDF = one resource. But if the file is large and both the browser and the server support range requests, the file can be fetched over a sequence of multiple requests. (RFC 7233)


4

No-no-no, don't let Semrush misguide you. It is indeed only your decision about indexing/deindexing of PDF. In general, Google loves PDFs. I would noindex them only in case they dublicate the content of according HTML pages. If they are, as you said, useful for your users AND contain unique content - let Google index and rank them. About internal ...


3

Yes, you treat a .PDF as a regular URL. Googlebot crawl's PDF's just like any HTML page. You can see Google's own sitemap to verify that they do it the same way themselves.


3

Simply don't make your links advertiser1.com but instead use something like yourdomain.com/ad.php?redir=www.advertiser1.com then, have a simple ad.php (or whatever) script on your site which will increase view counter for given advertiser and then do a HTTP 301 redirect to site given as redir parameter.


3

You could have a look for some kind of PDF to HTML converter and perhaps this question on Stackoverflow might help? However, I have not tried something like this myself and I would be very sceptical as to the quality of the HTML/CSS produced. An automated tool might be able to make it look acceptable, but there is a lot more to creating a web page than ...


3

You will never find an application that does the job perfectly but their are some PDF to HTML convertors online that can convert simple to fairly complex PDF designs. The other option would be to pay a designer to take the PDF design and make it into a friendly HTML design that works as intended, AI/PDF/SVG > HTML convertors are not perfect and sometimes ...


3

See How to force files to open in browser instead of download (pdf)? which has an answer from ColinM that tells you exactly what the headers should be: To indicate to the browser that the file should be viewed in the browser: Content-Type: application/pdf Content-Disposition: inline; filename="filename.pdf" To have the file downloaded rather than ...


3

You have done your research and seem to have a good handle on the situation. To sum up: Using robots.txt would prevent search engines from crawling the PDF files. If third party sites linked directly to the PDF files, then search engines might include the URLs in the search index (but would still not be able to index their contents.) Using X-Robots-Tag ...


3

Your way of thinking is good for development and testing purposes, Not in production level as you are making external calls, every time users visit a product (Even if they don't actually want to get the file!) Which is horrible. I would suggest hosting all PDF files on your own server (If it is not against the manufacturer copyright policy). Two ...


3

To get the .pdf extension on the file after download, it needs an HTTP header like: Content-Disposition: attachment; filename=some-file.pdf; With this header it will be saved as some-file.pdf even if served from the URL /pdf-download.php See on StackOverflow: How to Use Content-disposition for force a file to download to the hard drive?


3

Without putting wordpress or any of those CMS's into the picture, the answer is clear. If you upload a file to a server that is the exact same filename referenced by a link from any page on the web, then there is no need to update any of the links. As much as I'm taking shortcuts here, this answer is easy to verify. Simply create a simple HTML file with ...


3

To install mPDF root privileges are not required, FTP access will be sufficient and it should work fine on shared hosting environments. Simply unzip the files and subfolders and then copy them into a folder called mpdf, then you can use the mPDF library by using a line like require_once('mpdf/mpdf.php'); to load the functionality. To clarify, mPDF is a ...


3

The trivial fix to this is to just re-word the text on your website so that the link text says "my curriculum vitae" instead of just "here". The current text on your site says: My CV can be downloaded in PDF format here, and is embedded below You might consider changing it to something like this: View my CV below, or download the Curriculum Vitae PDF....


2

The ranking benefit is essentially that you prevent duplication. For example, you have a page of content, example.com/page, but for whatever reason, the same page exists with parameters, e.g., example.com/page?param=123. The fist is crawled, indexed and ranked because your site navigation links to it. The parameter isn't linked to, but is produced when the ...


2

You should consider a content management system, which allows this feature. - While many do not include this feature out of the box, many of these open source CMS engines have vast amounts of useful plugins that can extend the engine to support or this type of things. Using two of the most popular CMSs as an example As I mentioned in the previous paragraph ...


2

Thought about doing it in HTML/CSS then converting it on the FLY to PDF? Take a look at http://pdfcrowd.com/ It's very easy to convert HTML and PSD to PDF on the FLY.


2

I think it really depends - but if you are not able to accomplish the PDF Design, they wanted, then it somehow defeats the purpose of PDF (which allows you to ensure that the product looks the way you want it on any PC). So under that circumstances, the PDF Version might not bring any advantages. Nevertheless, PDF has its own pros - and for example if you ...


2

I vote yes. I personally find it useful when sites have printer friendly pages... not only for printing but also clipping content into Evernote. Another reason that I vote for a printer friendly page is because it is much more secure. Adobe readers are littered with vulnerabilities.


2

If you change the parameter on the end of a URL, browsers will "know" not to cache the result. Rather than change the name of the PDF you can just add a parameter onto the end of the URL that references it. First: foo.pdf?revDate=20130916 and then foo.pdf?revDate=20131007 etc.


2

If you've got some kind of control over said site you should indicate the file is not to be cached by stating so in the headers. The basic headers (in pseudo, for HTML/1.1) you'd need would be: Pragma: no-cache Cache-Control: no-cache, must-revalidate Expires: {current_time} For more info on the first two headers look at RFC2616 14.32 Pragma and 14.9 ...


Only top voted, non community-wiki answers of a minimum length are eligible