Setting Up Xenforo


Staff member
  • #1
In this thread, I'll be writing exhaustive instructions, tips, and tricks for setting up a brand new install of the world's best forum software, Xenforo. I'm not sure if you know this or not, but some of the largest forums on the web run Xenforo. Here are some examples:

AVForums -
Black Hat World -
Bushcraft USA -
The Admin Zone -
Physics Forums -
MacRumors -
ForumWeb.Hosting -
Centmin Mod -
NeoGAF -
Adventure Rider -
Digital Point -
ResetEra -

Some of these sites are running older versions of this forum software and some are running the latest, which is right now 2.1.10 Patch 2. Version 2.2 is still in beta and promises to be awesome. It should be out soon, although I've heard word that it'll be released by end of year, which is still about five months away.

Anyway, The forum you're browsing right now is running Xenforo. I am in the process of setting it up. I still have a long way to go, but it's operational as of right now. Further down in this thread I'll be sharing some of what I've learned from configuring multiple installs. Most importantly, I'd like to discuss some SEO related topics, such as how to configure the robots.txt file and which types of pages you should allow to be crawled by search engines. These areas have been talked about ad nauseam on other forums, but as far as I've seen, no one has yet to really delve into the "why something should be done" as opposed to the "what they think should be done because others are doing it." I'll also go over all the technical stuff as well in regards to server setup, Cloudflare integration, and actual forum software setting. Should be a good time. This is actually a very good time to write about this as I'm in the muck of it. Until then.


Staff member
  • #2
I use a dedicated server, so that's what I'll be discussing here (FYI).

The very first thing I did to set this site up was purchase a domain name. Since I had no idea what to call the site, I decided that some sort of quick "half word combo" would be nice. I like to keep my domain names two to three syllables. Anything longer than that seems too descriptive to me. So, in this case, I conjured up the idea that I'd like to create and operate an independent forum, or IndyFor. It's catchy and better yet, it was available for purchase. So that's what I did. I first purchased this domain name.

Next, I logged into WHM on my server and set up a new cPanel account. I am no expert when it comes to working on servers, or even the jargon involved, but I have been dabbling in this sphere for over a decade. The problem is, I seem to forget much of what I've learned through the years, which is partly why I'm creating this thread. To remind me when I need to look back.

I believe a new website account contained within WHM is considered a cPanel account. It's fairly easy to set up. I'll leave you some instructions here.

The process is simple, but it can get confusing down near the bottom two DNS settings. On the LiquidWeb page I linked to above, that area is explained fairly well.

After that, I went ahead and set up a new MySQL database and user. So basically, I set up the shell account and the database that I would need for the Xenforo software install.

After all that was finished, I set up an email forward so the [email protected] email address would forward to my GMail address. I don't like having too many website email addresses to check. I'd much rather create them and have them all forward to one. Life is easier that way.

And finally, as far as this part of the server setup goes, I created a cron job that would back up the database daily and dump a compressed version to a secret location.


Staff member
  • #3
In this section, I'll briefly discuss setting up the website in Coudflare. If you aren't aware of how Cloudflare works with a website, I can break it down for you. Basically, you have a domain name, your files on a server (hosting account), and Cloudflare. When someone wants to access a page on your website, they'll first type in your domain name or click a link that targets your domain name. That domain name then talks to Cloudflare that talks to your server.

Cloudflare is a middle-man and being so, it'll need to know your server IP address and a few other things. In this account is where you'll set all your DNS information for your website. It can be tricky in the beginning, but luckily there's a lot of supporting literature out there.

To begin, Cloudflare will ask for your website URL. If it's new, the auto import feature may not work out correctly. If this is the case, you'll need to input all this data yourself.

There are two very important records I'd like to inform you of here. They both have to do with emails that are generated by Xenforo going to spam as opposed to being sent to a new member's regular email box. In order to get this situation straightened out, you'll need to create two new records on the DNS page of Cloudflare. These two records are DKIM and SPF. Here are some instructions for how to set these records up.

If you're running cPanel, go to the Email Deliverability page on your server and you'll see the data that you'll need to use for these records.

There are a few other settings within Cloudflare that will need to be addressed, but I'll save them for later. This is just a quick overview to get the site up and running.


Staff member
  • #4
At this point, the hosting aspects of the website are functioning. The next step is to upload the Xenforo software itself to the server and install it.

I like to use FileZilla as my FTP program of choice, but you can use whatever you like. When uploading, just be sure to unzip the folder you download from your Xenforo account and then upload the contents of the upload folder. Don't upload the actual upload folder itself, just the contents contained within. Here are full instructions:

I do want to mention that when uploading the files, make sure to put them in the correct directory. If you'd like your site to be set up like this one (IndyFor) where the forum software is in the root, then that's where you'll need to put the files on your server or shared hosting account. If you want your forum to be contained in a /community/ or /forum/ directory (or something similar), then you'll need to create that directory first and then upload the files to it.

Once all of the files are on your server, you can access your site by typing your domain name into a web browser. If memory serves, you'll automatically be forwarded to the /install/ directory. If not, just type in the path, such as From there, you'll see all of the information that you'll need to input to have the installation run smoothly. If all goes well, your site should be ready to go in just a minute or two. Again, read the instructions I linked to above for all the fine details.


Staff member
  • #5
At this point, your Xenforo forum should be set up and operational. If you visit your homepage, you'll see it in all its glory. Of course, it'll be empty and will be sporting the Xenforo logo up top, but that will all change soon enough. In this section, I want to go over just a few of the more critical settings that I usually tackle first. Through the months and years, I'll update this thread to include many more of the less important settings.

Okay, first and foremost, I go into Setup > Options > Basic Board Information and customize the Board Title, Meta Description, URL, and Email Address. Then, on the same page, I scroll all the way to the bottom and check the Use Full Friendly URLs option box to remove the index.php in the URL and replace it with something prettier. I'll also check the Romanize Titles in URLs box to remove any weird characters in any URL that may be formed in the future. Now, this last setting isn't critical at all because this next one will keep any titles out of the URLs all together.

Next, I'll visit the Setup > Options > Search Engine Optimization (SEO) page and make sure the Use Full Friendly URLs option is checked and the Include Content Title in URLs option is unchecked. If this last setting is active, every forum and thread name will be included in any URL that's formed and that's completely unnecessary. It's actually better to keep them out because if you need to change a forum name or thread name in the future, you can do that and not have to concern yourself with the new URL being forwarded to the old. The URL will stay the same no matter what the forum or thread is titled.

After that, I head into the Setup > Options > Performance page and I'll change the option for jQuery source from Locally Hosted to Google Ajax API CDN. Why host that locally when you can have someone else do it?

At this point, I'll go into the Setup > Options > Email Options page and scroll to the bottom. There, I'll uncheck the Include full message text in watched thread/forum notification emails and the Include full message text in conversation notification emails options. The reason for this is simple. When someone receives a notification email from a website that's running Xenforo, by default, all of the content of that notification is included in an email. So basically, if someone is watching a thread or receives a message from another member, that thread or message will be visible in the email they receive. Because no one on earth apparently reads anything anymore, such as the instructions to not reply to the email, but visit the board to reply, they all seem to reply directly to the email, which never goes anywhere. It's better to simply send these people a message that tells them to visit the website to see what someone has written.

I then visit the Setup > Options > User Registration page and check the Start welcome conversation on registration and Send welcome email on registration boxes. I also write two nice message for new members to receive once joining the site.

In the Setup > Options > Attachments page, I change the Maximum attachment file size to 20480 (20MB) because the default setting is just too low. By the way, this setting must be changed in the php.ini file on the server first. Then I change the Maximum attachment image dimensions and Attachment thumbnail dimensions to 800 pixels.

I make a bunch more smaller changes as well, but again, I'll get to them in the future. One area I'd like to touch on that's extremely important has to do with search engine optimization. Take a look at my current robots.txt file:

User-agent: Mediapartners-Google
Allow: /*

User-agent: *

Disallow: /help
Disallow: /login
Disallow: /lost-password
Disallow: /misc
Disallow: /posts
Disallow: /register
Disallow: /search
Disallow: /whats-new


It's important to keep all pages, except for the homepage, forum pages, and thread pages out of the Google index. Many pages that come default with this software don't need to be crawled or indexed and it's important to keep them out from the initial launching of your site. What's most critical is that you block the /whats-new/ directory, along with the /attachments/ and /members/ directories. I block crawling of the /whats-new/ directory here in the robots.txt file and I block the other two via the permissions in the admin panel. The /whats-new/ directory is especially insidious in that the pages contained within will continuously replicate infinitely under the guise of user sessions. This is what we in the biz like to call a spider trap. Even though these pages come with a noindex meta tag applied by default, you don't want them crawled. If this area is blocked like I suggest, only one page will be showing as blocked, while all others are behind that door and never even discovered. This will save you oodles in crawl budget, not to mention a bunch of other things. I'll write a post on just this directory in the future.

As for the members and attachments areas, those will remain unblocked in robots.txt, but will return a 403 header status code if access is attempted by someone who isn't a registered member of the site. This would include search engine crawlers. The reason you don't want to block these directories in the robots.txt file is because there can be thousands of links to various pages. We don't want Google indexing, but not indexing, all of these pages. It's my opinion that the returning of a 403 page is a better alternative. If so, they'll simply never be indexed or recorded by the engines at all.

I think I'll leave this here for now. If something else comes to mind, I'll update this thread. Any questions, leave them below.