sub-domain vs. sub-folder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • martinsc
    Too lazy to set a custom title
    • Jun 2005
    • 27043

    #1

    sub-domain vs. sub-folder

    which and why?

    please share your experiences...
    Make Money
  • fris
    I have to go potty
    • Aug 2002
    • 55752

    #2
    sub folder, if you want to do sub domains on the fly their is a cool trick.

    edit your domain zone file

    add

    * IN A domainip

    then you could use .htaccess to create them based on the sub domain

    Options +FollowSymLinks

    RewriteEngine On

    # mod_dir fix
    RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
    RewriteCond %{HTTP_HOST} ^(.*\.)?([^\.]+)\.domain\.com$ [NC]
    RewriteCond %{DOCUMENT_ROOT}/subs/%2%{REQUEST_URI}/ -d
    RewriteRule [^/]$ http://%2.domain.com%{REQUEST_URI}/ [R=301,L]

    # strip sub subdomains
    RewriteCond %{HTTP_HOST} ^.*\.([^\.]+\.domain\.com)$ [NC]
    RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,L]

    # abc.domain.com --> /subs/abc/
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
    RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com$ [NC]
    RewriteCond %{DOCUMENT_ROOT}/subs/%1/ -d
    RewriteRule ^(.*)$ /subs/%1%{REQUEST_URI} [QSA,L]
    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


    Totally Free Templates

    Comment

    • martinsc
      Too lazy to set a custom title
      • Jun 2005
      • 27043

      #3
      Originally posted by Fris
      sub folder, if you want to do sub domains on the fly their is a cool trick.

      edit your domain zone file

      add

      * IN A domainip

      then you could use .htaccess to create them based on the sub domain

      Options +FollowSymLinks

      RewriteEngine On

      # mod_dir fix
      RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
      RewriteCond %{HTTP_HOST} ^(.*\.)?([^\.]+)\.domain\.com$ [NC]
      RewriteCond %{DOCUMENT_ROOT}/subs/%2%{REQUEST_URI}/ -d
      RewriteRule [^/]$ http://%2.domain.com%{REQUEST_URI}/ [R=301,L]

      # strip sub subdomains
      RewriteCond %{HTTP_HOST} ^.*\.([^\.]+\.domain\.com)$ [NC]
      RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,L]

      # abc.domain.com --> /subs/abc/
      RewriteCond %{ENV:REDIRECT_STATUS} ^$
      RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
      RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com$ [NC]
      RewriteCond %{DOCUMENT_ROOT}/subs/%1/ -d
      RewriteRule ^(.*)$ /subs/%1%{REQUEST_URI} [QSA,L]
      great tip

      what advantage do i have using a sub-folder instead of a sub-domain?
      Make Money

      Comment

      • LiveDose
        Show Yer Tits!
        • Feb 2002
        • 25792

        #4
        Interesting trick.

        Scammer Alert: acer19 acer [email protected] [email protected] Money stolen using PayPal

        Comment

        • martinsc
          Too lazy to set a custom title
          • Jun 2005
          • 27043

          #5
          bump for more information.
          Make Money

          Comment

          • DateDoc
            Outside looking in.
            • Feb 2005
            • 14243

            #6
            I use mod rewrite to create sub domains but that was to create url/city_id=1 to albany-ny.url, etc.

            Comment

            • fetishblog
              Confirmed User
              • Sep 2005
              • 5995

              #7
              Google loves subdomains more then subfolders. =)

              Fling.com doesn't steal your traffic and sales unlike some other dating companies. I promote them, and so should you!

              Comment

              • gooddomains
                Too lazy to set a custom title
                • Jul 2003
                • 10127

                #8
                subdomains are better than subfolders

                Comment

                • martinsc
                  Too lazy to set a custom title
                  • Jun 2005
                  • 27043

                  #9
                  Originally posted by fetishblog
                  Google loves subdomains more then subfolders. =)
                  how about the other search engines?

                  Originally posted by gooddomains
                  subdomains are better than subfolders
                  why?
                  Make Money

                  Comment

                  • martinsc
                    Too lazy to set a custom title
                    • Jun 2005
                    • 27043

                    #10
                    bump bump
                    Make Money

                    Comment

                    • martinsc
                      Too lazy to set a custom title
                      • Jun 2005
                      • 27043

                      #11
                      Make Money

                      Comment

                      • VexXxed
                        Confirmed User
                        • Sep 2006
                        • 544

                        #12
                        How bout sub-domains on seperate class-c's with sub-folders! yowzas!!!

                        Comment

                        • CaptainHowdy
                          Too lazy to set a custom title
                          • Dec 2004
                          • 94061

                          #13
                          Originally posted by fetishblog
                          Google loves subdomains more then subfolders. =)
                          !!

                          Comment

                          • ae-sc
                            Confirmed User
                            • Sep 2006
                            • 507

                            #14
                            subdomains are viewed as separate sites whereas folders are divisions within a site.

                            Unlimited Domains, DNS Wild Cards, Unlimited POP3 Accounts,
                            Unlimited Email Forwarding, Full CGI And Perl Access, PHP/MySql


                            As Always, 1/2 Price DreamHost Accounts (Adult Friendly) using the Code "SLASHHALF"

                            Comment

                            • karlcore
                              Confirmed User
                              • Jul 2006
                              • 134

                              #15
                              Originally posted by fetishblog
                              Google loves subdomains more then subfolders. =)
                              Do you have proof of this? perhaps a source to cite?
                              Always looking for hard link trades:
                              http://www.derangedworld.net

                              ICQ: 277163851
                              AOL/Yahoo/ MSN/GoogleTalk IM: e-mail me first to be added

                              Comment

                              • V_RocKs
                                Damn Right I Kiss Ass!
                                • Nov 2003
                                • 32448

                                #16
                                Google use to love them... Things changed when someone made 5 BILLION subdomains and Google decided to switch things up a bit.

                                Comment

                                • The Sultan Of Smut
                                  Confirmed User
                                  • Dec 2004
                                  • 4325

                                  #17
                                  Originally posted by V_RocKs
                                  Google use to love them... Things changed when someone made 5 BILLION subdomains and Google decided to switch things up a bit.
                                  Yup I've heard this too. Apparently - don't quote me on this - 3rd level subdomains (sub.domain.com) aren't viewed as very cool by Google but 5th level subdomains (sub3.sub2.sub.domain.com) are cheat worthy.

                                  Comment

                                  • BitAudioVideo
                                    Confirmed User
                                    • Jul 2005
                                    • 1246

                                    #18
                                    errr
                                    why not just put the junk in somedomain.com/sub1
                                    and make sub1.somedomain.com point there
                                    2 birds...
                                    Hi-Quality Encoding - Bulk Orders - On Time!
                                    http://bitaudiovideo.com
                                    icq 50476697 - aim n3r0xXx

                                    Comment

                                    • marketsmart
                                      HOMICIDAL TROLL KILLER
                                      • Dec 2004
                                      • 20419

                                      #19
                                      good information in here

                                      Comment

                                      • Jace
                                        FBOP Class Of 2013
                                        • Jan 2004
                                        • 35562

                                        #20
                                        I always use subdomains, just because it is easier on bookmarkers

                                        I always place each subdomain on it's own class c ip also

                                        Comment

                                        • Jace
                                          FBOP Class Of 2013
                                          • Jan 2004
                                          • 35562

                                          #21
                                          Originally posted by BitAudioVideo
                                          errr
                                          why not just put the junk in somedomain.com/sub1
                                          and make sub1.somedomain.com point there
                                          2 birds...
                                          cpanel does that already, it is kind of nice

                                          Comment

                                          • borked
                                            Totally Borked
                                            • Feb 2005
                                            • 6284

                                            #22
                                            Originally posted by fetishblog
                                            Google loves subdomains more then subfolders. =)
                                            Google et al couldn't give a shit. Stop spreading FUD.

                                            There are no 'advantages' to using subfolders over subdomains. Quite the reverse - in a subdomain setting, you can hard code the url from the TLD and still end up at the subdomain, whereas you will NEVER get to a subdomain from the TLD....

                                            For coding work - hit me up on andy // borkedcoder // com
                                            (consider figuring out the email as test #1)



                                            All models are wrong, but some are useful. George E.P. Box. p202

                                            Comment

                                            • borked
                                              Totally Borked
                                              • Feb 2005
                                              • 6284

                                              #23
                                              Originally posted by Fris
                                              sub folder, if you want to do sub domains on the fly their is a cool trick.

                                              edit your domain zone file

                                              add

                                              * IN A domainip

                                              then you could use .htaccess to create them based on the sub domain

                                              Options +FollowSymLinks

                                              RewriteEngine On

                                              # mod_dir fix
                                              RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
                                              RewriteCond %{HTTP_HOST} ^(.*\.)?([^\.]+)\.domain\.com$ [NC]
                                              RewriteCond %{DOCUMENT_ROOT}/subs/%2%{REQUEST_URI}/ -d
                                              RewriteRule [^/]$ http://%2.domain.com%{REQUEST_URI}/ [R=301,L]

                                              # strip sub subdomains
                                              RewriteCond %{HTTP_HOST} ^.*\.([^\.]+\.domain\.com)$ [NC]
                                              RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,L]

                                              # abc.domain.com --> /subs/abc/
                                              RewriteCond %{ENV:REDIRECT_STATUS} ^$
                                              RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
                                              RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com$ [NC]
                                              RewriteCond %{DOCUMENT_ROOT}/subs/%1/ -d
                                              RewriteRule ^(.*)$ /subs/%1%{REQUEST_URI} [QSA,L]
                                              I may be wrong, but this rewrite will cause any Mac Safari users to balk with the "Too many redirects" error (Safari wil balk on 3+ internal redirects)

                                              For coding work - hit me up on andy // borkedcoder // com
                                              (consider figuring out the email as test #1)



                                              All models are wrong, but some are useful. George E.P. Box. p202

                                              Comment

                                              • martinsc
                                                Too lazy to set a custom title
                                                • Jun 2005
                                                • 27043

                                                #24
                                                Originally posted by BitAudioVideo
                                                errr
                                                why not just put the junk in somedomain.com/sub1
                                                and make sub1.somedomain.com point there
                                                2 birds...
                                                sure, but which one would you use to trade links? for seo?...
                                                Make Money

                                                Comment

                                                • ThatGuy25
                                                  Registered User
                                                  • Sep 2006
                                                  • 4

                                                  #25
                                                  Use sub-folders if possible. Sub-domains are frowned upon by guys like Google, and other search engines.

                                                  Only reason you should be using sub-domains is for type-in domains that your customers can easily remember.

                                                  Comment

                                                  • Kevsh
                                                    Confirmed User
                                                    • Dec 2004
                                                    • 8619

                                                    #26
                                                    Originally posted by borked
                                                    Google et al couldn't give a shit. Stop spreading FUD.

                                                    There are no 'advantages' to using subfolders over subdomains. Quite the reverse - in a subdomain setting, you can hard code the url from the TLD and still end up at the subdomain, whereas you will NEVER get to a subdomain from the TLD....
                                                    Sub-domains still are considered by Google and others to be separate sites, but as pointed out above, they are wiser is spotting abuses.

                                                    Sub-folders are better if you are building a hierarchy of related pages on the same main theme.

                                                    So, if you have a TLD and want to spin-off some new sites (and you can leverage the PR and authority of the www domain), sub-domains can get you plenty of SE traffic ... if you want to build a deep, solid, themed site where pages all help your PR, etc. then use sub-directories.

                                                    Comment

                                                    • chaze
                                                      Confirmed User
                                                      • Aug 2002
                                                      • 9774

                                                      #27
                                                      Definably just use a folder, eventually sub.domains will be outdated.

                                                      dwhs.com/support/

                                                      is much better then

                                                      support.dwhs.com

                                                      Comercials and ads are showing the folder way now as well.
                                                      Like the desert needs the rain
                                                      We do fully manged WordPress, VPS, and Servers. Adult Host Pro https://adulthostpro.com/ Since 2001

                                                      Comment

                                                      • martinsc
                                                        Too lazy to set a custom title
                                                        • Jun 2005
                                                        • 27043

                                                        #28
                                                        if i plan several sites on the same domain (blog, forum, site, galleries...) they should be theoreticly different sites...
                                                        would the SE know that when these are placed in folders (domain.com/blog, domain.com/forum...)?
                                                        Make Money

                                                        Comment

                                                        Working...