Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a site with forums. The forums are currently at forums.example.com (a subdomain). I've heard that for SEO and usability in general it's better to have them at example.com/forums. Regarding security and maintainability, however, it would be better to host the forums in a seperate VirtualHost (or to be exact, a seperate cPanel account).

Is this even possible, should I want to do this?

share|improve this question

marked as duplicate by HopelessN00b, Ward, HBruijn Feb 22 at 7:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 2 down vote accepted

VirtualHosts are distinguished by hostname, so if the forums were at example.com/forums then they'd be served by the same VirtualHost as everything else in example.com.

Personally I'd go with the subdomain - it's straightforward to set up and provides some degree of isolation if something goes wrong. The SEO aspect is fairly off-topic for Server Fault, but I'd imagine the actual content of the forums would be of more relevance to rankings than where the word 'forums' appears in the URL ;)

share|improve this answer
1  
The SEO part is not part of my question, but just there so you don't think "Why would he want that?". Anyway, it hardly matters, as you say. I'm just curious if I could make this micro optimisation without too much hassle. – Bart van Heukelom Nov 24 '09 at 0:50

I've heard that for SEO and usability in general it's better to have them at example.com/forums.

I disagree. It shouldn't make a signficant difference.

Regarding security and maintainability, however, it would be better to host the forums in a seperate VirtualHost (or to be exact, a seperate cPanel account).

Yes; and quite apart from server-side security issues, there's also the client side. If you put your forums on the same hostname as the rest of your site, any cross-site-scripting vulnerabilities in the forum software (and there are almost always cross-site-scripting vulnerabilities in forum software) immediately become cross-site-scripting vulnernabilities for your main site. If you've got anything sensitive on that site like accounts or admin pages, your forum has compromised your mission-critical stuff.

So keep your forums on forums.example.com and your main site on www.example.com, where they won't be able to leak each others' cookies.

share|improve this answer

This is a more complex question regarding url optimization for SEO. I would recommend buying and reading this book:

"The art of SEO" http://www.amazon.com/dp/0596518862/

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.