1

I'm using download manager, that locks the downloading of PDF until the user fills out a lead form. But the data in PDF is valuable and should be indexed by search engines. Any idea how can I achieve it?

1 Answer 1

1

One way this could be done is through PHP user agent:

if(strstr(strtolower($_SERVER['HTTP_USER_AGENT']), "googlebot"))
{
    // what to do
}

If the user is Googlebot, display/redirect to the PDF file. If the user isn't Googlebot, show them the submission form to receive the PDF file.

However, it's worth noting that Google wants to know what you are showing its users. If it thinks you're linking to a PDF file but you're really serving up a form first it might not like that.

But detecting the user agent to determine if you're going to show the PDF or the submission form is probably the only way to accomplish what you're trying to do.

1
  • Allow Googlebot to access content that you hide from users is the definition of cloaking and doing so is likely to get your site banned from appearing in Google. Oct 28, 2019 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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