MyBB Community Forums

Full Version: Board and Homepage URL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello... Do we have to add www or should it be without www for the settings of Board and Homepage URL?
I tried with www but it doesnt load completely at chrome but loads with mozilla. I tried to remove it then it loads at chrome completely but not with mozilla. Both works at tor browser.
www is treated as a sub-domain of your main domain. It's a different domain name for the browser. It's like you on this website there are "community.mybb.com" and "mybb.com". Both of them are different domains.

Answering your question. It depends on which domain you want to display your page. If you want to use with "www", then use it. If you want without "www", use without. But you shouldn't have two different domains to allow accessing your website, therefore you should set up redirection from one to another. Preferably you should use domain without "www", because it's shorter, easier to type and I think most people stick to that when they configure MyBB.

Now let's set up the redirection. This is an example of how to set up redirection on Apache .htaccess file. If you use Apache and have access to the .htaccess file, you can use code below to redirect your website from www to non-www domain. Change "my-domain.com" to your domain name.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^my-domain\.com$ [NC]
RewriteRule ^(.*)$ http://my-domain.com/$1 [R=301,L]
If you use nginx or something else, you can just search on the Internet "how to redirect from www to non-www". Or you can ask your hosting provider.
Thanks. Do you mean that if ever that i want to choose the non www then i have to edit it because the default is with www? Where should i insert it? Or just put it at the buttom? Can i just use the redirect in hostgator account?
There's no default domain. But when user types your domain with www, you want him or her to be redirected to the correct domain, the one without www. Or opposite way - depends on your preferences. Insert this rule in the top of your .htaccess file and check if it redirects properly from www to non-www by observing the address bar. And with this .htaccess rule given by me you should set your URL in ACP as non-www.