/book/export/html/NID pages should have rel="canonical" pointing back at the real page. It doesn't have any.

I've found that Google is indexing some of these in preference to the real page, because they have neither rel="canonical", nor are they nuked by robots.txt.

I think this is actually a bug. It's definitely the wrong thing, and causes a bad user experience. A case could be made that it's a feature request, though, I suppose!

Comments

Anonymous’s picture

As a work-around, I have added

Disallow: /book/export/

to robots.txt.

If it's hard to fix core with rel="canonical", this would be an interim solution, but (per Google) it's not The Right Thing.

Anonymous’s picture

Category: bug » support

This sounds as if it should be a contrib module. Certainly not a bug. What is the canonical link for /book/export/html/NID that you think should be added? I tend to use Global Redirect module for redirecting to a common URL when multiple URL is possible.

Anonymous’s picture

Category: support » bug

I'm sorry, I think you may be missing the point here. (Perhaps I misunderstand you.)

/book/export/html/NID is the "printer-friendly version" of /node/NID, provided by the book module. It has the same content but without most theming. /node/NID is the canonical version.

Global Redirect would be entirely the wrong thing. The printer-friendly version is a desired feature, a distinct URL with different HTML, and should not be 301'd to the actual page.

Anonymous’s picture

Issue summary: View changes

Removing note that I will separately report the robots.txt thing as an issue. It's a less good solution.

Version: 7.14 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.