MyBB Community Forums

Full Version: Google SEO plugin - setting the board URL to include "www.", will it cause issues?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We have our new forum as "example.com/forum/" and now we want it as "www.example.com/forum/" ; what we want is to include the www. before the url.

In Admin general settings, the board URL is as "example.com/forum/" not "www.example.com/forum/" . We have Google SEO plugin installed and despite the forum is new, we have threads already created by members and indexed by Google.

If I set the board in the settings to "www.example.com/forum/", will it affect the Google SEO plugin at all? Will the threads already created go now to having the www. in the url or do I have to do further redirecting such as posting a 301 redirect in .htaccess?

We just fear screwing up the URL structure and SEO optimization.

Many thanks!
Google SEO will redirect the threads, forums, etc. by itself (if redirect is enabled). However for index, portal, and all other pages, you should still have a generic www redirect in your .htaccess. You can also set www vs non-www preference in Google Webmaster Tools.
(2013-05-20, 08:45 PM)frostschutz Wrote: [ -> ]Google SEO will redirect the threads, forums, etc. by itself (if redirect is enabled). However for index, portal, and all other pages, you should still have a generic www redirect in your .htaccess. You can also set www vs non-www preference in Google Webmaster Tools.

Thank you!

I have just turned the Board URL in the General settings of the Admin panel to "www.example.com/forum"/ so it includes the www. by default. All threads now have the www. , and, as you rightfully mentioned, the index page and other pages still seem to be taking the non-www version as right (i.e. the pages don't turn automatically into www.).

Should I just use a standard redirect code such as:

Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^yourdomain.com/forum/ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/forum/$1 [L,R=301]

Will this set all pages to www. or do I have to go page by page?

Should I place this code in the .htaccess that has the Google SEO plugin rewriting rules? And if so, where should I place the code? At the top or bottom of the .htaccess file?

We already had the domain root ("i.e. www.example.com") set to automatically be www. as we're using a Wordpress theme in the domain root and set the www. rule straight. So the only part now of the whole site that isn't having the www.by default is the index and the other pages of the forum (forum being in a subfolder). And yes, we have set the preferred domain in GWT to be the www..

Would really appreciate if you or others can mention about the code to use to redirect the forum pages to now contain www.
(2013-05-20, 10:07 PM)Tato Wrote: [ -> ]RewriteCond %{HTTP_HOST} ^yourdomain.com/forum/ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/forum/$1 [L,R=301]

I don't think /forum/ goes into the RewriteCond.

Usually it looks like this:

RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,QSA,R=301]

(if host is not www.yourdomain.com, redirect to www.yourdomain.com).

That's for the root /.htaccess, not /forum/.htaccess, there you might have to add /forum/ in the RewriteRule (but not RewriteCond).

Also you have to place this at the top. Redirects go above regular rewrites.
(2013-05-20, 11:04 PM)frostschutz Wrote: [ -> ]
(2013-05-20, 10:07 PM)Tato Wrote: [ -> ]RewriteCond %{HTTP_HOST} ^yourdomain.com/forum/ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/forum/$1 [L,R=301]

I don't think /forum/ goes into the RewriteCond.

Usually it looks like this:

RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,QSA,R=301]

(if host is not www.yourdomain.com, redirect to www.yourdomain.com).

That's for the root /.htaccess, not /forum/.htaccess, there you might have to add /forum/ in the RewriteRule (but not RewriteCond).

Also you have to place this at the top. Redirects go above regular rewrites.


Many thanks again!

The root domain however is already set as www.mydomain.com as the root domain has a Wordpress theme. I've had a quick look at the .htaccess in the root domain and it has all rewriting rules for Wordpress.

Should I still insert the redirecting rule in this .htaccess? And no touching of the .htaccess in the forum folder where the Google SEO plugin has all the redirect rules?

Apologies for the questions but redirecting is the one part of managing the forum where I fear royally screwing it up.

Thank you again.