/print/pdf content appears in search engines

Created on 21 June 2024, 10 months ago

Problem/Motivation

I had many of my site's "print/pdf" URLs indexed by Google and Bing. In my attempts to remove them and stop this from re-occurring, I wonder if there are some features the module could make available, perhaps.

For example, could we add options in the UI to let users turn on things like:

- adding nofollow attribute to Entity-Print-generated links

- adding nofollow and noindex headers to Entity Print routes

- adding noindex meta tag to entity-print.html.twig (not sure if does anything)

I'm not sure this has happened to others but it could be a nice feature to let users enable these or have them enabled by default so that search engines don't view the PDFs.

Steps to reproduce

Enable the module and add links to PDF URLs on content pages without adding "nofollow" attribute to the links.

Proposed resolution

Add elements to the UI to allow users to enable noindex and nofollow attributes where needed. Or add these attributes as a default and add element to UI to allow them to be disabled.

I was able to use the patch from https://www.drupal.org/project/entity_print/issues/3202847 ✨ Possibility to alter http headers when we generate PDF Postponed: needs info to allow me to add the X-Robots-Tag HTTP header. Perhaps this could be something users could turn on via the UI?

✨ Feature request
Status

Active

Version

2.14

Component

Miscellaneous

Created by

πŸ‡¨πŸ‡¦Canada endless_wander

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024