1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can I point several domains at the same xenForo install?

Discussion in 'XenForo Pre-Sales Questions' started by CyclingTribe, Oct 19, 2010.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    When I ran vB3.8.x I had several domains that all pointed to my forums; e.g.: cyclechat.co.uk - cyclechat.net - cycle-cafe.net

    The forum software worked okay with this, and depending on which domain you used, set an appropriate cookie and off you went. All fine and dandy.

    When I migrated to IPB 3.1.2 I found that it didn't work this way. You set your site URL and it is used throughout the templates etc. restricting you to just a single domain.

    So ... after all that waffle ... my question is: Does xenForo support multiple domains for a single forum instance/install?

    Shaun :D
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks, but I don't want to share the userbase over several domains - I want to *point* several domains at a *single* forum install.

    Is that still not possible?

    Shaun :D
  4. AnthonyCea

    AnthonyCea Well-Known Member

    I own 200 + domains, if I forward them all to you that will not violate your license.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    I'm not quite clear on what it is you want to do.

    Do you want for example www.mysite.net to redirect to www.mysite.com?
    In the same way that www.xenforo.org redirects to www.xenforo.com?
  6. CyclingTribe

    CyclingTribe Well-Known Member

    Erm, okay ... but I'm simply trying to establish whether xF supports multiple domains pointed at the same forum install so I can go off and buy some additional ones - e.g. ".net" and ".co.uk" etc. so I have a range of domains for the same site!!!!

    I'm not talking about multiple sites, or installs, just 1 single forum which can be accessed via the .com & .net & .co.uk flavours of a domain?

    Shaun :D
  7. CyclingTribe

    CyclingTribe Well-Known Member

    The reason I'm asking is that when I moved to IPB it invalidated my ".co.uk" domain and I had to put a server redirect in place instead - whereas before, on vB3 - the same forums would respond to both ".com" *and* ".co.uk" domains for the same site.

    Shaun :D
  8. CyclingTribe

    CyclingTribe Well-Known Member

    I'm obviously not doing a good job of explaining this.

    Let me try again.

    I originally set-up my site at "cyclechat.co.uk" and installed vB3.

    Later I bought a different domain because "cyclechat" was being blocked by people's workplaces. I added "cycle-cafe.net" to Apache and made it an alias for the same physical hosting account as my "cyclechat.co.uk" site, and people could then browse the forums using "cycle-cafe.net". Later I added a third domain "cyclechat.net" in a similar fashion and this worked fine too.

    So, anyone could access my - single - vB forums from all three domains.

    This was possible because the domain wasn't hard-coded into the templates anywhere; e.g.; /{server path}/image.png which would support any and all domains ... as opposed to http://www.yourdomain.com/{server path}/image.png < which requires a specific domain and will only work for that one domain.

    I just wanted to know how xF implements this and whether I can use several domains on the same physical hosting account on the server to serve the forum content?

    Shaun :D

    (Hopefully I've explained that a bit better this time ... phew!!!!) :)
  9. -GR-

    -GR- Well-Known Member

    No matter what url you access your sites ip address with provided you have an allotted ip xf will still appear but it will only set cookie on the single domain you have setup. What you are trying to do honestly won't get you any better results on searches so you would save yourself a lot of time and aggravation by doing with with redirects.
  10. CyclingTribe

    CyclingTribe Well-Known Member

    It's not about search results.

    People have different URL's blocked at work and I would like to be able to offer alternative domains to get around this.

    Redirects won't work because they will redirect to the "blocked" domain.

    Forget it, I'm obviously not explaining it very well.

    I'll try it when I get it installed ... :)

    Shaun :D
  11. Indigo

    Indigo Active Member

    It looks like what you're saying will work. I have several domains pointing to the same location, and XenForo does not force the "main" domain for regular links. The "Home" tab will still use the main domain, however.
  12. Blandt

    Blandt Well-Known Member

    It will work just fine for the forums only
  13. CyclingTribe

    CyclingTribe Well-Known Member


    Shaun :D
  14. -GR-

    -GR- Well-Known Member

    Haha, sorry that one was the best explanation. Yes it would work like the others have mentioned. I just didn't understand the purpose you were shooting for till after that reply.
  15. CyclingTribe

    CyclingTribe Well-Known Member

    Yeah I realised it must have been the way I was explaining it ... lol :)

    Anyway, license acquired, domain set up ... just need to find some time to get it downloaded and installed.

    Shaun :D
    Blandt likes this.
  16. Shaun Mason

    Shaun Mason Active Member

    Have you tried this? I have a atwork.com domain that won't set cookies properly, though the main site works just fine. Both are pointed to the same physical path on the server.
  17. MGSteve

    MGSteve Well-Known Member

    I had a similar thing with my forums. The main URL is http://forums.mg-rover.org, but some firms block any URL with 'forum' in it, so I setup google.mg-rover.org and aliased it within the VHost definition in Apache, so that going onto either URL would show you the same site.

    Problem is that at some point something in VB broke as it used to work fine, you log into google.mg-rover.org and it would work, now it appears that only the proper url works as cookies don't get set correctly if you try and login through google.mg-rover.org instead.
  18. Mikey

    Mikey Well-Known Member

    If you do it all via the cmd line like me, should be fine. for example I could have chat.xfdev.com and forum.xfdev.com

    my vhost (get to by nano /etc/apache2/sites-enabled/site) would look like this;

    <VirtualHost *:80>
    	ServerName	forum.xfdev.com
    	ServerAlias	chat.xfdev.com
    	ServerAdmin info@xfdev.com
    	DocumentRoot /var/www/path/to/xenforo/
    	<Directory  /var/www/path/to/xenforo/>
    		Options here...
    AFAIK that *should* work, it did with my IPB install. I haven't tested this.
  19. Shaun Mason

    Shaun Mason Active Member

    What if your using IIS?=)
  20. Shaun Mason

    Shaun Mason Active Member

    Anyway, it seems cookies aren't being set properly on the second domain.

Share This Page