GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   sub-domain vs. sub-folder (https://gfy.com/showthread.php?t=666855)

martinsc 10-16-2006 12:05 PM

sub-domain vs. sub-folder
 
which and why?

please share your experiences...

fris 10-16-2006 12:08 PM

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]

martinsc 10-16-2006 12:13 PM

Quote:

Originally Posted by Fris (Post 11087929)
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 :thumbsup

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

LiveDose 10-16-2006 12:32 PM

Interesting trick.

martinsc 10-16-2006 10:43 PM

bump for more information.

DateDoc 10-16-2006 10:59 PM

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

fetishblog 10-16-2006 10:59 PM

Google loves subdomains more then subfolders. =)

gooddomains 10-16-2006 11:07 PM

subdomains are better than subfolders

martinsc 10-16-2006 11:12 PM

Quote:

Originally Posted by fetishblog (Post 11092166)
Google loves subdomains more then subfolders. =)

how about the other search engines?

Quote:

Originally Posted by gooddomains (Post 11092218)
subdomains are better than subfolders

why?

martinsc 10-17-2006 10:53 AM

bump bump

martinsc 10-18-2006 12:05 PM

http://members.lycos.co.uk/utsc/bump.gif

VexXxed 10-18-2006 12:11 PM

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

CaptainHowdy 10-18-2006 12:50 PM

Quote:

Originally Posted by fetishblog (Post 11092166)
Google loves subdomains more then subfolders. =)

:thumbsup !!

ae-sc 10-18-2006 01:22 PM

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

karlcore 10-18-2006 01:38 PM

Quote:

Originally Posted by fetishblog (Post 11092166)
Google loves subdomains more then subfolders. =)

Do you have proof of this? perhaps a source to cite?

V_RocKs 10-18-2006 03:03 PM

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

The Sultan Of Smut 10-18-2006 03:13 PM

Quote:

Originally Posted by V_RocKs (Post 11105905)
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.

BitAudioVideo 10-18-2006 03:15 PM

errr
why not just put the junk in somedomain.com/sub1
and make sub1.somedomain.com point there
2 birds...

marketsmart 10-18-2006 03:16 PM

good information in here :thumbsup

Jace 10-18-2006 03:16 PM

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

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

Jace 10-18-2006 03:17 PM

Quote:

Originally Posted by BitAudioVideo (Post 11106005)
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

borked 10-18-2006 03:38 PM

Quote:

Originally Posted by fetishblog (Post 11092166)
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....

borked 10-18-2006 03:45 PM

Quote:

Originally Posted by Fris (Post 11087929)
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)

martinsc 10-18-2006 09:13 PM

Quote:

Originally Posted by BitAudioVideo (Post 11106005)
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?...

ThatGuy25 10-18-2006 09:43 PM

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. :)

Kevsh 10-18-2006 11:11 PM

Quote:

Originally Posted by borked (Post 11106204)
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.

chaze 10-19-2006 12:25 AM

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.

martinsc 10-20-2006 01:27 AM

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...)?


All times are GMT -7. The time now is 08:05 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123