Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2009

    Smile best way to move a subdoamin to its own domain name

    I have 40k+ indexed google pages for one of my subdomains called name; like

    now i want to move this subdomain to its own domain name like

    but at the same-time i want to keep all the already indexed links valid; that is all pages like

    should automatically redirected to

    how can I achieve something like that ?

  2. #2
    This could be done using a .htaccess file with a 301 Redirect (which tells the search engines that the page has been permanently moved). Here's an un-tested example of what your htaccess file should look like:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^name\.[^.]+\.mysite\.com
    RewriteRule (.*)$1 [R=301,L]

    Replace 'name' with the sub-domain that you're trying to get rid of.

    Or, if you're dealing with several different sub-domains you could do something like this:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^([^.]+)\.mysite\.com
    RewriteRule (.*)$1 [R=301,L]

    ... which should take the subdomain and shift it over to be the primary domain, like ->

    If the above doesn't do what you're hoping for then lookup RewriteRule to get more information about the options available.
    SpamHero - Be spam free in 5 minutes
    Domain wide spam filtering, unlimited email addresses
    Join our affiliate program and offer professional spam filtering today!

  3. #3
    Join Date
    Apr 2009
    Thank you methodical,
    a friend mentioned to use this code:

    #Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^$
    RewriteRule ^(.*)$$1 [R=301,L]

    i guess both (this and yours) are similar and should work

    thank you again

Similar Threads

  1. How to move domain to new host?
    By CorgiMaster in forum Web Hosting
    Replies: 6
    Last Post: 01-14-2006, 07:24 PM
  2. Need Help!! I wanna have a e-mail service as my subdoamin!
    By jerryzhangcheng in forum Web Hosting
    Replies: 4
    Last Post: 11-23-2005, 11:49 AM
  3. Domain move?
    By rlu929s in forum Dedicated Server
    Replies: 2
    Last Post: 08-15-2005, 11:41 PM
  4. move my phpbb to another domain
    By Project X in forum Web Hosting
    Replies: 36
    Last Post: 05-17-2004, 09:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts