Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Setting noindex on specific pages


Go to End


9 Posts   2406 Views

Avatar
perrybernard

Community Member, 5 Posts

12 January 2017 at 11:48am

Is there a CMS function to do this without having to edit robots?

Avatar
martimiz

Forum Moderator, 1391 Posts

3 February 2017 at 3:22am

Did you install the GoogleSitemaps module? That should take care of that:

http://addons.silverstripe.org/add-ons/silverstripe/googlesitemaps

Avatar
perrybernard

Community Member, 5 Posts

3 February 2017 at 8:58am

Thanks for the reply, but how does this sitemap module set a robotos noindex tag?

Avatar
martimiz

Forum Moderator, 1391 Posts

3 February 2017 at 11:22am

No, it creates a sitemap.xml that Google and other engines use to index pages. You can add priorities 1 to 10, and noindex.

Avatar
perrybernard

Community Member, 5 Posts

3 February 2017 at 11:38am

OK thanks. But Google may not use the sitemap file as an entry point to the page, nor does it translate robots directives from a sitemap file. The robots directive must be either in the root as a robots.txt file - which controls crawl to folders of files, or via the page html head to request noindex. Unless you can teach me something new about this topic....

Avatar
perrybernard

Community Member, 5 Posts

3 February 2017 at 12:11pm

I see the info about this module states:

"SilverStripe support for the Google Sitemaps XML, enabling Google and other search engines to see all urls on your site. This helps your SilverStripe website rank well in search engines, and to encourage the information on your site to be discovered quickly."

This is somewhat misleading as sitemaps have no effect on ranking at all. Furthermore, the sitemap is an unlinked file and is not discovered unless submitted to search engines. Crawl rate is determined by crawl budget and the amount of external referral, so the sitemap alone doesn't cause crawl, rank, or page priority in search results.

Avatar
martimiz

Forum Moderator, 1391 Posts

4 February 2017 at 4:51am

OK, well, I can't really comment on that as I'm no SEO expert, I just do the programming :)

There is this module http://addons.silverstripe.org/add-ons/nobrainerweb/silverstripe-robots-noindex but it looks as if that one will only change robots.txt if you're in dev mode so nothing gets indexed...

Shouldn't be too hard to add a textfield to SiteConfig settings, containing the robots text, and updating from there - onAfterWrite(). And if you want page-specific settings it would be a bit more work, but not really complex...

But I think

Avatar
perrybernard

Community Member, 5 Posts

7 February 2017 at 12:52pm

Thanks Martine.
Yes, at the moment we have decided to address this with writing our own code for it. I just thought that because it was such a common requirement that a module or native function might already exist. I'm no coder. Maybe this is harder to build than I realise.

Go to Top