I have a webpage namely - https://example.com/url/

I have generated a pdf with the same content of the above webpage namely - https://example.com/wp-content/uploads/2018/11/url.pdf.

I have given canonical tag to the https://example.com/url/ itself.

Will giving alternate tag to pdf in the web page will rank my pdf?

Now it is indexed but not ranking.

I need to rank both of them like when they search for without pdf keywords my web page should rank.

if they search with pdf my pdf should rank.

Is there any other way than alternate tag?

Please guide me.

1 Answer 1


If the html page and the pdf document have the same content i see no possibilities to rank them both.

I would index and let rank the html page and canonicalize pdf document to the html page with something like:

<Files your-pdf-file.pdf>
Header append Link "<your according html page>; rel=\'canonical\'"
  • I do believe that all things being equal, where an HTML page content matches a pdf file, Google will prefer the HTML file. Where this is not the case is where there is enough difference between the two. I like your advice! The OP could also simply block the pdfs using robots.txt if they do not want the pdfs to rank at all. Cheers!!
    – closetnoc
    Commented Sep 17, 2019 at 16:48

Your Answer

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

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