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

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

Discussion in 'XenForo Questions and Support' started by snoopy5, Apr 19, 2016.

  1. snoopy5

    snoopy5 Well-Known Member

    Hi,

    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?
     
  2. snoopy5

    snoopy5 Well-Known Member

    I found in another thread the opposite question and the advice for the htaccess file:

    In a .htaccess file in the root:

    Code:
       
    
    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:

    Code:
       
    
    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?
     
  3. Mr Lucky

    Mr Lucky Well-Known Member

    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

    FirefoxScreenshot005.jpg


    vbulletin redirects should work as before.
     
  4. snoopy5

    snoopy5 Well-Known Member

    Hi,

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

    Code:
    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:

    Code:
    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

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

    Code:
    Redirect 301 / http://www.mydomainname.com
    and delete the subdomainname completely.


    or

    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:

    Code:
    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?
     
  5. snoopy5

    snoopy5 Well-Known Member

    anybody?
     
  6. Mr Lucky

    Mr Lucky Well-Known Member

    I'm not very clear about what you are doing. What is /xf/ for?

    It looks like you are redirecting into a subdirectory called /xf/ and into a subdomain at the same time ???
     

Share This Page