XenForo creates RSS feed files (index.rss) for a few different types of pages. Off the top of my head, I think there’s a primary top level feed and then there are separate feeds for the forum pages. If you’ve got a limited number of forum pages, you might not want to concern yourself with removing those feed URLs. If you’ve got lots of forum pages though and if you don’t use RSS feeds for anything on your website, it might be a good idea to reduce the number of useless URLs Google knows about. When it comes to SEO, the fewer low quality URLs you have on your site, the better. But then again, Google doesn’t really do anything with these URLs, so none of this is a big deal. It’s up to you if you want to disable and get rid of them or not. In either case, maximizing your website’s crawl budget is good practice.
It’ll take a few steps to remove the feed references from your source code via template edits. After that, you’ll need to add some code to your website’s .htaccess file so when the feed file is accessed, it’ll return a 404 status. Once Google sees this status, it’ll drop the URL from its index.
Please find the template edits below.
Code:
TEMPLATE "FORUM_VIEW" (INTERNAL LINK IN SOURCE CODE TO .RSS FILE)
<!-- REMOVE RSS LINK -->
(REMOVE CODE BELOW AND REPLACE WITH COMMENT)
<li><a href="{{ link('forums/index.rss', '-') }}" target="_blank" class="p-footer-rssLink" title="{{ phrase('rss')|for_attr }}"><span aria-hidden="true"><xf:fa icon="fa-rss" /><span class="u-srOnly">{{ phrase('rss') }}</span></span></a></li>
<!-- REMOVE RSS LINK -->
Code:
TEMPLATE "PAGE_CONTAINER" (INTERNAL LINK IN SOURCE CODE TO .RSS FILE)
<!-- REMOVE RSS LINK -->
(REMOVE CODE BELOW AND REPLACE WITH COMMENT)
<xf:head option="rss_forum"><link rel="alternate" type="application/rss+xml" title="{{ phrase('rss_feed_for_x', {'title': $forum.title})|for_attr }}" href="{{ link('forums/index.rss', $forum) }}" /></xf:head>
<!-- REMOVE RSS LINK -->
Code:
TEMPLATE "FORUM_LIST" (INTERNAL LINK IN SOURCE CODE TO .RSS FILE)
<!-- REMOVE RSS LINK -->
(REMOVE CODE BELOW AND REPLACE WITH COMMENT)
<xf:head option="rss_forum"><link rel="alternate" type="application/rss+xml" title="{{ phrase('rss_feed_for_x', {'title': $xf.options.boardTitle})|for_attr }}" href="{{ link('forums/index.rss', '-') }}" /></xf:head>
<!-- REMOVE RSS LINK -->
Editing the above templates will remove the references to the feed files from your pages’ code. It’s also important for those URLs to return 404 status codes, so this is what you’ll need to do to accomplish that. Add the following code to your site’s .htaccess file:
RedirectMatch 404 ^/forum/forums/.*/index.rss.*$
It’s that simple.
One thing you want to be aware of – I’ve seen this “solution” a lot on the XenForo forum itself. When people ask how to remove RSS completely from XenForo or how to disable the RSS feeds on their websites, others have responded by offering CSS code to “hide” the small RSS icon at the bottom of their pages. While this solution may seem effective, it does nothing to kill off the URLs itself in the eyes of Google and the other search engines. Again, minimizing junk pages is the goal.
If you have any questions, please let me know. Thanks!
Leave a Reply