• Resolved kevindp

    (@kevindp)


    It doesn’t appear that the canonical information is affecting my PDF. Both the PDF and the original webpage are still indexed in Google results. I have set up the plugin so that my htaccess file has the following entry:

    # BEGIN Canonical 4028
    <Files “MyFile.pdf”>
    Header add Link “<https://www.website.com/my-webpage/&gt;; rel=\”canonical\””
    </Files>
    #End Canonical 4028

    However, when I fetch the PDF as Google in Google Search Console, the downloaded HTTP response reads:

    # BEGIN Canonical 4028
    <Files “MyFile.pdf”>
    Header add Link “<https://www.website.com/my-webpage/&gt;; rel=\”canonical\””
    </Files>
    #End Canonical 4028

    HTTP/1.1 200 OK
    Server: nginx
    Date: THE DATE
    Content-Type: application/pdf
    Content-Length: NUMBER
    Last-Modified: THAT DATE
    Connect: keep-alive
    Keep-Alive: timeout=20
    ETAG: “SOME NUMBER”
    X-Type: static/known
    Cache-Control: public, max-age=SOMENUMBER
    Vary: Accept-Encoding
    Access-Control-Allow-Origin: *
    Accept-Ranges: bytes

    Followed by garbled text from the PDF.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kevindp

    (@kevindp)

    Following up on this. Thanks for any help you can provide.

    Plugin Contributor Jake Bohall

    (@jblifestyles)

    Hey @kevindp, my apologies for the delay. I didn’t get a notification of this for some reason.

    Were you able to resolve the issue, or do you still need assistance?

    The line should read

    Header add Link "<https://www.website.com/my-webpage/<strong>></strong>; rel=\"canonical\""

    With the difference being the > character vs. > … Was this a manual add to htaccess, or generated when you designated the canonical in the main UI?

    Thanks,

    Jake

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No Canonical in HTTP Header’ is closed to new replies.