I have a webbook that is freely accessible. However PressBooks still generates a URL in the form
https://my.website.org/title-of-book/buy/
This web pages says “BUY THE BOOK It’s coming”
Although there is no link to this URL, Google sees it and it appears in Google search results.
Is there a way to prevent this URL from being generated?
Thanks.
in your robots.txt
#google close pages
User-agent: *
Disallow: /buy/
that is my robots.txt
#google close pages
User-agent: *
Disallow: /front-matter/*
Disallow: /back-matter/*
Disallow: /h5p-listing/
Disallow: /authors/
Disallow: /buy/
Disallow: /access-denied/
Disallow: /chapter/null-*
@Paul456h I’ve just opened a PR to change this behaviour: fix: improve buy page display conditions by SteelWagstaff · Pull Request #1379 · pressbooks/pressbooks-book · GitHub. This was included in pressbooks-book 2.30.3 (released in early October 2025)