iFrame PDF workaround using canonicalization
I have an iFrame of a PDF with my domain name on it in order to capture the SEO juice instead of it going to the Duda CDN. Duda doesn't allow access to the root directory, so the original PDF is there and my iFrame page is referencing it. I thought I had come up with the perfect workaround for the PDF problem with Duda until it was brought to my attention that there is a possibility that Google will index the CDN copy of the PDF and not the iFrame version on my website.
I will need to canonicalize the iFrame PDF page. I want the page with my domain URL and iFrame canonicalized by adding code to the header HTML. I cannot use robots.txt. Do I use rel=canonical <link> or do I use rel=canonical HTTP header. Technically the page I want to be canonicalized is not a PDF, but an iFrame of a PDF. The page I want noncanonicalized is a PDF. I am not sure how to proceed with this. Any thoughts? I have 26 pages like this to canonicalize. Duda tech support has not been able to help me with this. They showed me where to put the code but can’t tell me which code option is best to use.
I hope this is clear and there is someone who can help me out with this.