• Resolved dimakdoor

    (@dimakdoor)


    Hello,

    The PDF files are indexed by Google. The files are accessible via Download button.
    When I check visibility, it says noindex by default. However, they are still indexed.

    The Turkish language of the page is the following:
    https://www.dimak.com.tr/dokumanlar/

    The PDF files on this page are not indexed. Why am I having problems?

    If they have to be indexed, then how can I change the titles of them?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    TSF can prevent indexing of the WordPress attachment pages via its robots-settings — those are pages where you can see WordPress wrapped around an image, video, or PDF.

    However, that doesn’t affect the indexability of the attachments themselves. You can control those via various other methods on your server.

    Via .htaccess, you can use this to deindex the PDF files:

    <FilesMatch "\.pdf$">
        Header set X-Robots-Tag: noindex
    </FilesMatch>

    You can also control the indexability via a custom robots.txt file, which you can upload to the root directory of your website. Here’s an example of the robots.txt file’s contents that blocks PDF files from being crawled (and indexed):

    User-agent: *
    Disallow: /*.pdf$
    Disallow: /wp-admin/
    Allow: /wp-admin/admin-ajax.php
    
    Sitemap: https://example.com/sitemap.xml

    I’m not sure if you’re able to add titles to files displayed in the browser. Browsers supporting a preview of files is relatively new, and not according to any spec of which I’m aware.

    I hope this helps 🙂 Cheers!

    Thread Starter dimakdoor

    (@dimakdoor)

    Thanks a lot. I went with the custom robots.txt file.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Indexing PDF Files’ is closed to new replies.