I’ve modified a theme before for the /tag/ pages to include a meta but I was wondering if there was a way to to do this “built-in” without modifying the template.
Is there a way to omit a page from the sitemap? Let’s say I have a Page named “Secret page” only served for a specific integration that I do not want indexed. Can I mark it to be not indexed?
Edited: I solved my robots.txt problem… I think that was a stuck-in-the-CDN problem
Adding any meta information can be done through code injections - but these are only available on a global level, and on pages and posts. So, if you’re looking for a way to do this specifically for tag pages, the only way I’d know how to do it is through the template files.
Regarding the exclusion from the sitemap: also a negative, I am afraid. You could add a
<meta name="robots" content="noindex" /> tag through the page’s code injection, but it would still show up in the sitemap.
Everybody, correct me if I am wrong, because I’ve been looking for the same thing
So there’s a hack. Set the page’s (or post’s) canonical URL to itself. Having the canonical URL set causes Ghost to assume that the page/post is not the canonical version, and makes it disappear from the sitemap. This is more likely a bug than a feature, but that is how I’d do it currently.
Of course, this is security through obscurity. Fine if you just don’t want it indexed by search engines, but not sufficient if you really need it to not be available to anyone. (In the latter case, you might restrict it to a tier that doesn’t allow sign-ups, for example.)
I appreciate the answers provided.
I feel like the way forward is to just add /tag/ to robots.txt
As far as my extra page that I don’t want indexed goes… I will probably add that to robots.txt, too, I guess.