Sitemaps plugin
Hello guys,
I am running the Sitemaps plugin, which was last updated by Vanilla team in 2019. My forum version is newest one (2021.009). I have a problem that it adds a noindex tag to some URLs, like the following example: https://domain.eu/categories/archives/some-category-name/2021-05
The fix is mentioned here: https://open.vanillaforums.com/discussion/38465/robots-noindex-on-categories-archives-despite-being-used-for-sitemaps-plugin . However, I have tried to add it to: vanilla/applications/vanilla/controllers/class.categoriescontroller.php as mentioned here: https://github.com/vanilla/vanilla/issues/10970 , but it didn't fix the sitemap. Any ideas on how to workaround this? I'd prefer not to do any custom coding, as it will get overwritten by potential updates.
Answers
The fix has to be added to the class body of class.sitemap.php.
Note that sitemaps are not really needed for any relevant search engine to index your page.
If you want to prevent a category being marked with a "noindex" tag, I would suggest not archiving it but making it read-only using permissions instead.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
The thing is that my category was not even marked as archived at all. It's open and everyone can post to it.
I have added the code to "class.sitemaps.plugin.php" in the plugin's folder as I was not able to find a "class.sitemap.php" file and it resulted in error when viewing the category.
Yes, but you linked to the /categories/archive view, which is "noindex" and should stay that way because otherwise it would be duplicate content.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Ok, I understand.
However, with the code added to the end of the class.sitemaps.plugin.php I get an error when viewing the archives link:
Something has gone wrong.
We've run into a problem and are unable to handle this request right now.
Please check back in a little while.
You would have to add it before the closing
}
I just want to stress again: You do not need any of this for SEO. Just disable the sitemaps plugin and focus on content.
This is only an issue if you absolutely need to use both sitemaps and the archives functionality (which you said you won't be using).
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
I am sorry for the dumb question, but how do I disable archives? I really couldn't find it in the Dashboard.
https://open.vanillaforums.com/discussion/comment/263098/#Comment_263098
Or move them to a read-only category or use the "close" feature and leave them in place
This is a bit irrelevant, as I want people to be still able to post in the category - I do not want to mark it read-only.
Then just move to a category f.ex old.
We might need to know why it would be archeived in the first place, in order to understand what you where trying to achieve
It is not archived at all. I got the archive link from Google Webmaster Tools sometime after I submitted the sitemap, generated by the plugin. I didn't enable any archive, nor I want to have it read-only. It's a new forum.