Which one should i use? Subdomain or a directory? Help please.

Discussion in 'Site & Server Administration' started by spy1983, Mar 20, 2008.

  1. #1
    Hi

    I have a website and i want to create a new website using same host but different subjects.

    Should i use for ex: http://subdomain.domain.com? or http://www.domain.com/subdomain?

    Which one is better for google and for other PR or for other things?

    I need urgent reply.

    Regards
     
    spy1983, Mar 20, 2008 IP
  2. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #2
    I would recommend using the subdomain approach. This would usually put your main keyword in the FQDN which would in turn be more friendly for search engines.

    It also isolates this part of your site from the rest so would be more scalable and hopefully better security-wise.
     
    boltok, Mar 20, 2008 IP
  3. spy1983

    spy1983 Well-Known Member

    Messages:
    458
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #3
    so you recommend me to use subdomain right?

    ok
    for the old directory should i use .htaccess file
    like this:

    Options -Indexes +FollowSymLinks

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^example.com [NC]
    RewriteRule ^(.*)$ http://www.example.com$1 [L,R=301]

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

    is it ok?

    Regards
     
    spy1983, Mar 20, 2008 IP
  4. spy1983

    spy1983 Well-Known Member

    Messages:
    458
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #4
    or what is the code to redirect directory to a subdomain?

    wwww.domain.com/directory
    to
    directory.domain.com
    with search engine friendly

    how can i do that?

    Regards
     
    spy1983, Mar 20, 2008 IP
  5. spy1983

    spy1983 Well-Known Member

    Messages:
    458
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #5
    also where should i put the .htaccess file?

    Regards
     
    spy1983, Mar 20, 2008 IP
  6. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #6
    A simple Redirect statement, like the one below, should be enough:

    Redirect permanent /subdir/ http://subdom.example.com/

    This should go in your web server's virtual host section. If all you have access to is the .htaccess file, put the file in the web root of your main domain (such as www.example.com).
     
    boltok, Mar 20, 2008 IP
  7. spy1983

    spy1983 Well-Known Member

    Messages:
    458
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #7
    Am i going to put that code to .htaccess file?

    Regards
     
    spy1983, Mar 20, 2008 IP
  8. spy1983

    spy1983 Well-Known Member

    Messages:
    458
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #8
    do you recommend meta refresh tag?is it search friendly?
    i have .htaccess file in web root so i have to change it and add this code?

    regards
     
    spy1983, Mar 20, 2008 IP