How to serve parallel hostnames for vBulletin Optimize vBulletin 4
Most modern browsers default to two simultaneous threads per hostname. This leads to overhead and latency as the browser will only grab two objects at a time. One of the biggest pitfalls of vBulletin (especially 4.0) is the amount of graphics and javascript served from the same hostname. Setting up parallel hostnames is fairly simple and I’ll outline the steps on a cPanel installation and vBulletin 4.0 stylevars system. The entire process doesn’t take more than 15 minutes even for novice users, and you can easily do more to further optimize your vBulletin.
I’ll assume you’ve got vBulletin 4 installed and configured already. Lets get started then…
First login to cPanel for your domain and go to the subdomains section.
Setup a new subdomain. You can set the subdomain name to anything you want. In my example I just use images1 images2 etc. You could use a more descriptive subdomain name to keep things easy to remember (ex: clientscript.domain.com). For the document root, point it to your images directory you want to serve from a different subdomain. In the example I’ve used the images/cms folder for this one.
Next you’ll need to login to your adminCP for vBulletin 4, click on Styles & Templates -> Style Manager -> {Your Skin} from the drop down menu select “StyleVars”
Once your in the new StlyeVars system, click on “Image Paths” over on the left. It’s easier if you also check the hide variables so you can find it easier.
Once you’re there you’ll notice all the different folders that serve images. I suggest creating a subdomain for each folder that serves images, in the picture above you can kinda see that I have a few already setup. The next step is to enter the newly created subdomain as the full path for the image directory. Since I created the images5.domain.com and pointed it to the cms folder of images, I enter that into the cms field.
You simply repeat this for each image directory and you’ll have your vBulletin 4 optimized and little overhead due to objects on the page. You can see that I’ve got a few already setup and it improved my google page load score from a 66 to almost 79 by adding all the image directories this way.
BONUS TIP:
You can futher optimize by following the above by doing the same for the clientscript folder. As shown above I created clientscript.subdomain.com and pointed it to the clientscript folder. Then I modifed the headinclude template and changed the location of the clientscript call.






about 2 months ago
I wasn’t even aware of this in the first place, so thanks for the heads-up!
This is a very good article. I have a question though. I use multiple styles on my forum. Would I have to create a separate subdomain, for every style and imagedir?
Or could I do something like
imgdir_misc: image5.domain.tld/style1
imgdir_misc: image5.domain.tld/style2
imgdir_misc: image5.domain.tld/style3
Again, thanks for this.
about 2 months ago
It depends on what your optimizing for. If you’re optimizing the page load for only search engines, then you’ll only have to do this for your default skin.
If you’re optimizing for users & search engines, then you’ll probably have to do it for each style folder.
You could do it like you’ve mentioned, but you’ll run into instances of more than 2 images wanting to be loaded from the same directory (subdomain now
). It won’t be a major problem, and it’ll still beat having everything over one domain request
about 2 months ago
Thank you for posting this great tip and I was happy to put it into use as I am optimizing my site prior to opening it to the public. (vB4 on for now shared server). however I have encountered a few issues that are giving me a MAJOR issue finding a resolution for. Before I crack open the HTML by opening in Dreamweaver I was wondering if you had an easier solution. The Problem:
1) I moved the “editor” images to http://editor.mydomain.com and on page: newreply.php?do=postreply&t=8 the images all display fine; but, on page: content.php?1-the-front-page/addcontent&contenttypeid=18&postid=40&parentid=1 for promoting articles from post NONE of the images appear as it is being called for at: http://www.mydomain.com/http://editor.mydomain.com//video.png
2) I have a few stray images that dont diaplay after being relocated however all of the others from that same folder do. Such as: cms/”widget-blog.png”. Everything else in cms displays after the relocation.
What is the best course of action ?
Thank You.
about 2 months ago
Hi Paul, Glad you found this as a useful tip.
I had the same problem with only the CMS images, it was due to how the CMS editor template is coded, for some reason they prefixed the full domain path for the editor (only in this one spot for some reason. To work around that I used the replacement variable system. I did a replacement for the image code with domain name, and just replaced it with the image code like so:
Search For Text: <img src="http://hazardsports.com
Replace with: <img src="
Make sure you don't just replace your domain name as sometimes it's used for links, and by attaching Settings -> Site Name, URL, Contact Details. Your forum url should just be:
http://hazardsports.com
And make sure you don’t have trailing slashes for the image paths also in the StyleVars it should just be like:
http://cmsimg.hazardsports.com
Hopefully that helps you
Thanks
-Dave
about 2 months ago
Which folder/file am I searching in ? Not having much luck !
about 2 months ago
Sorry Paul,
To setup the replacement filter, go to AdminCP -> Style Manager -> Replacement Filter and enter in what I gave you earlier.
Then just double check what you’ve entered in the ImagePaths under the StyleVars for your skin and it should all work.
about 2 months ago
Tried but was unsuccessful. I put both cms and editor back in original location.
about 2 months ago
Hi Paul,
Sorry you’re having problems with it. I’ll see if I can rewrite the instructions to make sure they are clear as possible and setup another test site soon as I get a chance to make sure i’ve included how to do everything.
Thanks
about 1 month ago
How would this affect stats like Google Analytics? Would it divide up the pageviews? How about pagerank? Would that be hurt by having multiple domains?