Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have some PDF documents that I offer users once they have subscribed to my newsletter. Well, Google found them, and other people are posting them on various sites.

I'd like to take advantage of Google ranking my PDF documents and redirect users that click on those links to an html or php page.

How do you automatically redirect hotlinked PDF clicks (on Google search and other sites) to a relevant page (i.e. domain.com/PDFdoc1.pdf redirects to domain.com/PDFdoc1.html or domain.com/PDFdoc1/)?

I want to keep the PDFs ranked where they are on Google, and keep the PDF documents exactly where they are on my site, but just redirect hotlinked clickers to a page instead of the PDF.How can this be done?

share|improve this question
add comment

1 Answer 1

You should edit your (or create a) .htaccess file to allow for hotlink protection.

I would recommend using this tool: http://www.htaccesstools.com/hotlink-protection/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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