XF 1.5 Move XF from subdomain to main domain, SEO etc.


Well-known member

I currently use a Joomla installation on my main url and have xenforo on a subdomain:

Joomla: www.mydomain.com
Xenforo: www.forum.mydomain.com

When I moved from vbulletin over to xenforo, I installed redirects from old vb URLs successfully to the new Xenforo installation. Those redirects are still in place and I do not want to loose them.

I now want to use the Xenporta 2 plugin to get rid of my Jomla installation on the main domain. But would love to have the portal page still on the main domain name. It seems that this is not possible because of technical reasons, since XF is installed on the subdomain.

Now I am thinking about moving the XF forum from the subdomain to the main domain as it would be the "classical way" of installing Xenforo.

But I do not want to make mistakes regarding SEO rankings and valid redirections. So how do I do this?

How can I move the whole forum to the main domain without loosing traffic and the old redirects of old vbulletin forums?

At the end it shall be in the future like this:

Xenforo: www.mydomain.com/forum

In the past it was like this: www.forum.mydomain.com

I will delete the subdomain after the switch or if I have to keep it for the redirects than I keep it.

Can anybody advise me on how to do it?
I found in another thread the opposite question and the advice for the htaccess file:

In a .htaccess file in the root:

RedirectMatch 301 ^/forum/(.*)$ http://forum.website.com/$1

Adjust the paths/URLs to suit.

Since I want to move from a subdomain to the main domain and I do not have a forum directory there (I install it in the root), do I need then to write in the htaccess file:

RedirectMatch 301 ^(.*)$ http://website.com/$1

And where do I need to put this htacess file? In the root of the then empty subdomain?

How about the old redirects from my vb to xf switch. How do I have to modify them?
I have done this, but from a subdirectory to root. I'm sure you will need to keep the sub domain and redirect everything to the main domain. However if you have cpanel, you can do this directly under the subdomains


vbulletin redirects should work as before.

in my old vbulletin forum directory I have an htaccess file with this:

RewriteRule ^$ /xf/ [R=301,L]
RewriteRule ^index\.php$ /xf/ [R=301,L]

in the root of my main domain of my old vb installation (I still have the domainname) I have an htaccess file with this:

Redirect 301 / http://www.forums.mydomainname.com

I have two different possibilities now. Will both work correctly or only one?

Option 1:

Change the above 301 in the root of the old vb domainname from

Redirect 301 / http://www.forums.mydomainname.com


Redirect 301 / http://www.mydomainname.com

and delete the subdomainname completely.


Option 2:

Leave everything as it is now, keep the subdomainname intact but delete all files in that directory and put in the root of the subdomain only an htaccess file with:

Redirect 301 / http://www.mydomainname.com

Which one would work for both, the redirect of old vb links to their threads and new xf links to their threads?
Top Bottom