[Article] SEO Tips and Tweaks for XenForo

Status
Not open for further replies.

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,100
XenFans.com Article: SEO Tips and Tweaks for XenForo?
Copyright (c) 2010-2011 http://xenfans.com, author: Iestyn

This short guide helps you understand XenForo's use of SEO and helps youto get started with customizing it to your needs for your board.


Search Engine Optimization (SEO) is a growing business in the developer world. Although many aspects of SEO are unclear and unconfirmed, people can only go by their personal experiences. In this article, I plan to share some of the tips and tricks that have worked for me in the past.

Although XenForo works hand in hand with search engines and even though SEO is not a necessity, there some extra tweaks that can be done to help it along and speed up the process.

Robots.txt:

A robots.txt file sits in the root of your public_html folder and it’s main primary objective is to controls what page bots view. Disabling bots from crawling pages such as the member list, who’s online section and any other third party application you have installed on your website will force them to index threads and posts, which is more important as fresh content is what is really going to make your site rise above the rest.

XenForo does not come with a robots file as standard, so here’s a little helping hand. If you want to stop a bot from indexing a certain page follow these steps:
Code:
User-agent: *
Disallow: /help/
Disallow: /online/
Disallow: /member-map/

User-agent: * - This tells all bots that you want them to follow the same set of rules.
Disallow: /help/ - This tells bots not to index the help page. You can also add third party plugins to the robots file too; Just follow the same rules as above.

Site Title:

Another good little tweak is removing your site name from title. Here’s an example of what we’ll be working on:

xenfans_article_xenforo_seo.png


This little tweak will remove the title from two pages, the thread list and thread view:

Open up PAGE_CONTAINER and find:
Code:
<xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

Replace with:
Code:
<title>
<xen:if is="{$controllerName} == 'XenForo_ControllerPublic_Index' AND {$controllerAction} == 'Index'">
{$xenOptions.boardTitle}
<xen:else />
<xen:if is="{$title}">
{xen:raw $title}
<xen:else />
{$xenOptions.boardTitle}
</xen:if>
</xen:if>
</title>

Save the template and that’s it. The above edit removes the site name when someone views the thread list and the actual thread itself.

Redirection Scripts:

For those of you who have migrated over to XenForo from another community software, it is important that you also take a look at the redirection scripts. Currently only certain forum softwares are supported. Here are the links to those scripts:

Redirection Scripts for Invision Power Board 3.1.x
Redirection Scripts for vBulletin 3.x
Redirection Script for vBulletin 4.x (Not Supported)
Redirect Scripts for vBSEO (Not Supported)

Keep in mind that even though SEO isn’t mandatory, all websites will index over time, and SEO will just speed up the process :)
 
Status
Not open for further replies.
Top