HTTP Header Canonical Generator for PDF

Easily generate PDF http header canonical for apache and nginx servers.

This is how you create the HTTP headers:

  1. Create Excel file with two columns (or download the sample file here).
    1. Column A contains the full path to the PDF file, column B the target URL for the Canonical
    2. Add more PDFs and URLs as separate lines.
      Column A: the path to the PDF file, column B: the target URL of the Canonical tag (the page that should rank in Google instead of the PDF)

      Column A: the path to the PDF file, column B: the target URL of the Canonical tag (the page that should rank in Google instead of the PDF).

  2. Upload the Excel file below this list & then press the “Generate” button.
  3. Copy the ready-made code for the .htaccess (Apache Server) or for the nginx.conf (Nginx Server), set it in the respective files on the server and save it.

Canonical tag in http header vs tag in head of html pages

Canonical tags are great, but they are mostly used only on HTML pages. It is also interesting to use them for other file types. For example, a PDF file could “link” to the HTML version via a Canonical tag. Google visitors would then see the HTML page and not the PDF.

This is interesting, but also involves some configuration effort, because the tag has to be inserted into the HTTP header. Of course, this can be done by configuring the web server, but it’s a bit inconvenient.