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

XF 1.2 change Forum from "www." towards non "www."

Discussion in 'XenForo Questions and Support' started by erich37, Aug 1, 2013.

  1. erich37

    erich37 Well-Known Member

    I have my Forum currently setup so that it always shows the "www." infront of the URL.

    How do I change it to have it without the "www." as prefix ?

    Do I need to remove this in the HT-Access-file ?
    Do I also need to change anything in ACP in order to achieve this ?

    Many thanks!
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    erich37 likes this.
  3. erich37

    erich37 Well-Known Member

    When changing an existing Forum which has the "www."-Prefix, will my current members have any issues with loggin-in when I remove the "www." ?
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    They will be logged out initially I believe. They will have to log in again.
  5. erich37

    erich37 Well-Known Member

    when you are using a website having the "www."-Prefix and save your Password with FireFox, then FireFox does not recognize your Password when visiting the website without the "www."-Prefix.
    The strange thing is that FireFox or the cookies saving the Password in FireFox make a difference when you visit the very same website with www and without www.

  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    Technically www. and wwwless domains are considered separate entities (the www is a subdomain), and unless the cookie tells the browser is available to sub-domains its considered separate.
  7. erich37

    erich37 Well-Known Member


    so why isn't the cookie designed in a way that it will save the User-Password for both versions ?
    So that the Password will be saved at all times, with "www" and without "www".
  8. Jeremy

    Jeremy XenForo Moderator Staff Member

    By default its what you have defined (ie, its just xenforo.com and not .xenforo.com), but the functionality exists to make it available in both through a configuration option (config.php). Specifically, the cookie domain option. For it to work on test.xenforo.com and xenforo.com, it'd have to be .xenforo.com. See this for more information:
  9. erich37

    erich37 Well-Known Member

    So why is the cookie in "XF -default" not working for both Subdomain and Domain ?

    I guess this would be a "Suggestion" then.....
  10. Brogan

    Brogan XenForo Moderator Staff Member

    The functionality already exists as KK has said - just edit config.php for your specific requirements.

    For example:
    $config['cookie'] = array (
    'prefix' => 'xf_',
    'path' => '/',
    'domain' => ''
  11. Jeremy

    Jeremy XenForo Moderator Staff Member

    98% of sites don't need this. Which is why the functionality exists only as an advanced configuration option. Cookie domains are very sensitive and can easily be misconfigured.

Share This Page