homepage Welcome to WebmasterWorld Guest from 54.204.94.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Marketing and Biz Dev / Link Development
Forum Library, Charter, Moderators: martinibuster

Link Development Forum

    
Subdomains and Navigation
Absolutle, Relative paths and other mysteries
toolman

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 270 posted 4:57 am on Jun 16, 2001 (gmt 0)

OK. I figured this would be the place to get an answer on this subject since paynt has done subdomains so extensively.

My host allows subdomains that are actually mapped to a folder in the main domain.

So htttp://fresh.greenmoney.com gets resolved but it is actually htttp://www.greenmoney.com/fresh/.

Questions:


  1. Should I use absolute urls in all the common elements on the pages such as spacer gif's. I am wondering if the se's will pick up on the fact that my subdomain is actually relying on the main domain for all the pictures...will this matter?
  2. Would root relative paths eliminate the need to use absolute paths to the common elements?

 

littleman

WebmasterWorld Senior Member littleman us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 270 posted 5:10 am on Jun 16, 2001 (gmt 0)

Just to be on the safe side I would use absolute links, and make sure there are real walls between the content of each site. It is stupid and dangerous that they do it that way.

toolman

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 270 posted 5:16 am on Jun 16, 2001 (gmt 0)

>>>real walls between the content of each site.

Don't understand what you mean LM.

I got to looking at it and it appears that mirroring each subdomain with the common elements and using document relative paths would be the safest way to go. The absolute paths would make updating more centralized though.

littleman

WebmasterWorld Senior Member littleman us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 270 posted 5:37 am on Jun 16, 2001 (gmt 0)

Well, I may be paranoid, but I would make each sub content independent of each other. That was my logic for absolute paths, there is less chance of referring to content that is intended for another sub-domain. As you know, the danger is if the spiders crawl duplicate content in different sub-domains. I am sure you could set it up with relative paths, but if everything was hard linked like:
[sub1.domain.com...]
[sub2.domain.com...]
There is a lower likelihood of a spider accidentally jumping into a directory unintentionally.

toolman

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 270 posted 5:42 am on Jun 16, 2001 (gmt 0)

So mirroring the site within each separate folder and linking only within that folder except when linking to other subdomains for navigation. Right?

littleman

WebmasterWorld Senior Member littleman us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 270 posted 5:45 am on Jun 16, 2001 (gmt 0)

Yeah, that is what I would do.

paynt



 
Msg#: 270 posted 12:56 pm on Jun 16, 2001 (gmt 0)

I use absolute links. A friend of mine who is more techie by far than me recently sent me this for how she's working it. She created a main directory underneath the images directory. She uploads this main directory to each subdomain. Then she has images directories underneath each sub-directory in Dreamweaver that contains the unique images for that canonical.

I also sent her a link to this discussion so she can add anything else that might help.

I have found that I've had no problems though with just using absolute links.

toolman

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 270 posted 2:52 pm on Jun 16, 2001 (gmt 0)

If I use absolute url's to the common elements...htttp://www.greenmoney/images/spacer.gif to the main images folder in the main domain to pull all of the logo's, style sheets, etc. for htttp://fresh.greenmoney.com will a search engine take notice of this? Would there be a penalty?

The reason I ask is because it would be so much easier to maintain a large site from the central directory as far as look and feel...i.e. style sheets, logo's.

paynt



 
Msg#: 270 posted 3:44 pm on Jun 16, 2001 (gmt 0)

I personally work it exactly as you've described here toolman. It's been 7 months for one site now and absolutely no problems. And you're right about it being easier to maintain. I can't imagine not being able to maintain this from a single source. I'm not sure how this could become a problem either. After all, affiliate programs actually link to images off-site, as do top-100 lists and such and I've never had a problem personally with those either. Iím not sure if Iím not talking apples and oranges with this example.

Iím hoping my friend Jennifer will jump in when she reads this and see if she has another point of view. There are not enough people either using canonicals yet for optimization/navigation and those that are, arenít yet talking about it.

jenreed

10+ Year Member



 
Msg#: 270 posted 5:30 pm on Jun 16, 2001 (gmt 0)

Thanks paynt. :)

From a design standpoint, absolute linking of graphic files is a pain.

Toolman, I'm just really starting to use third level domains in my designs to theme out the sites. Dealing with images was the hardest part for me to get an organized process going. I use Dreamweaver and keep templates for each of my subdomains.

I don't want duplicate graphics locally (what a nightmare) and I want as minimum of duplicates on the server as possible without absolute linking.

This is how I create my local directory structure.

<Site Name>
...<images>
......<main> - this is my master images directory. I keep all the images that are common to all subdomains and used throughout all my templates

...<subdomain1>
......<images> - this is where images that are only used in subdomain1 are stored

...<subdomain2>
......<images> - this is where images that are only used in subdomain2 are stored

The server looks like

<public_html>
...<images>
......<main>
...<subdomain1>
......<images>
.........<main> - main copy
...<subdomain2>
......<images>
.........<main> - main copy
etc.

Locally I keep everything under a centralized directory (have to or I'd go insane). Then if I make a change to images that effect the template design, I upload the <main> directory to each subdomain's images directory.

If I make a change to images that are exclusive to a subdomain, I just go to the local subdomain/images directory and upload the new graphics.

The key for me is to keep images that are common to all subdomains separated in one place so that I can just upload the entire the directory when changes to the main template occur.

I do not use absolute linking for graphic files. There's too many times when I need to make a graphic change such as renaming or moving. I want the change to the graphic to be automated. Also, I don't want to go through the process of hardcoding every image placement...it's too much of a pain.

I do understand that this means several copies of my main (common) images on the server. If space limitations are a major consideration for you, than absolute graphic linking is probably the best answer.

For me, it's much easier to have multiple copies of the main images on the server so that I can continue to use relative graphic linking.

However, I do use absolute linking for every link within each subdomain (even though some can be called relatively). As littleman suggested, it keeps all content within each subdomain "walled off".

Also I have one style sheet file that I keep in the my local <Site Name> directory. I upload this file to each subdomain directory too. This is the other "duplicate" that I put on the server.

If anyone has any other suggestions, I'm open to finding an easier way.

Jennifer

paynt



 
Msg#: 270 posted 5:53 pm on Jun 16, 2001 (gmt 0)

Welcome to WmW my friend jenreed,

Nice to have you 'on board'! Thanks for adding your knowledge to this discussion. I think we're all learning how this works.

Debra

littleman

WebmasterWorld Senior Member littleman us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 270 posted 8:54 pm on Jun 16, 2001 (gmt 0)

My suggestion of using hard linked is for insurance. I agree that it is considerably harder to maintain a site set up this way, but my concern is the possibility of the spider being feed duplicate content from an unchecked link into a directory which would then expose the same content on multiple canonicals. This would not be an issue if the hosting company took the extra two minutes to do it right.

This would be the right way to set it up in the httpd.conf file:

NameVirtualHost 111.222.111.222

<VirtualHost 111.222.111.222>
DocumentRoot /path/to/domain.com/
ServerName www.domain.com
CustomLog /path/to/domain.com.log
</VirtualHost>

<VirtualHost 111.222.111.222>
DocumentRoot /path/to/sub1.domain.com/
ServerName sub1.domain.com
CustomLog /path/to/sub1.domain.com.log
</VirtualHost>

VirtualHost 111.222.111.222>
DocumentRoot /path/to/sub2.domain.com/
ServerName sub2.domain.com
CustomLog /path/to/sub2.domain.com.log
</VirtualHost>

And Tool's hosting company is probably doing something like this:

NameVirtualHost 111.222.111.222

<VirtualHost 111.222.111.222>
DocumentRoot /path/to/domain.com/
ServerName domain.com
CustomLog /path/to/sub1.domain.com.log
</VirtualHost>

<VirtualHost 111.222.111.222>
DocumentRoot /path/to/domain.com/sub1/
ServerName sub1.domain.com
CustomLog /path/to/domain.com.log
</VirtualHost>

<VirtualHost 111.222.111.222>
DocumentRoot /path/to/domain.com/sub2/
ServerName sub2.domain.com
CustomLog /path/to/domain.com.log
</VirtualHost>

And so on.

With such a layout the sub-domains share file structure, which unnecessarily creates the risk of duplicates. That is why I am recommending absolute links *in this case* to minimize the risk.

jenreed

10+ Year Member



 
Msg#: 270 posted 9:06 pm on Jun 16, 2001 (gmt 0)

Hey thanks littleman for the httpd.conf stuff! That's great... especially since I have my own server.

I've always setup sub-domains up using redirection to the subdirectory instead of the subdomain root. I will change this configuration and see what happens.

However, even if you did it this way, that still doesn't change the fact that you have to have individual image directories setup for each sub-domain. How do you keep it all separated locally without creating a completely separate parent directory for each subdomain...

Hope I'm making my question clear. It's more of a design organization question than anything.

Also, even using the redirection to the folder subdomain setup, what difference does it make if graphic files are called relatively? I don't understand your statement here:

"With such a layout the sub-domains share file structure, which unnecessarily creates the risk of duplicates. That is why I am recommending absolute links *in this case* to minimize the risk."

Are you referring to graphic linking or hyperlinking? Again, what difference does it make to a spider if graphics are shared? Maybe this is just my ignorance on what a spider sees.

littleman

WebmasterWorld Senior Member littleman us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 270 posted 9:14 pm on Jun 16, 2001 (gmt 0)

First, let me ask you a question.

I've always setup sub-domains up using redirection to the subdirectory instead of the subdomain root.

What specifically are you doing?

jenreed

10+ Year Member



 
Msg#: 270 posted 9:29 pm on Jun 16, 2001 (gmt 0)

My httpd.conf (hope we are not getting too off topic here...) for subdomains looks like:

NameVirtualHost 111.222.111.222

<VirtualHost 111.222.111.222>
ServerName sub1.domain.com
ServerAdmin wwwadmin@domain.com
DocumentRoot /home/user/public_html/sub1
CustomLog domlogs/sub1.domain.com combined
ScriptAlias /cgi-bin/ /home/psbv/public_html/sub1/cgi-bin/
</VirtualHost>

The problem I'm seeing is that my setup is controlled by the user account. I don't know what the /path/to/sub1.domain.com/ is except /home/user/public_html/sub1

jenreed

10+ Year Member



 
Msg#: 270 posted 9:41 pm on Jun 16, 2001 (gmt 0)

That last part should be

ScriptAlias /cgi-bin/ /home/user/public_html/sub1/cgi-bin/

instead.

littleman

WebmasterWorld Senior Member littleman us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 270 posted 9:42 pm on Jun 16, 2001 (gmt 0)

Jennifer, you will not encounter the problem that I am referring to above. The way you are doing it the subdomains are structurally isolated. The problem I am referring to will only arise when the paths of the virtual posts overlap.

Tool, in your case I would be less concerned with the images, but with textual content. If you want to use relative paths for images then you should be okay. It is the hyperlinks where the danger lies.

jenreed

10+ Year Member



 
Msg#: 270 posted 10:08 pm on Jun 16, 2001 (gmt 0)

Now I'm confused. I'm mapping sub-domains to individual subdirectories and I'm using the main account. So how are they isolated?
My setup

DocumentRoot /home/user/public_html
ServerName www.domain.com

DocumentRoot /home/user/public_html/sub1
ServerName sub1.domain.com

DocumentRoot /home/user/public_html/sub2
ServerName sub2.domain.com

Isn't this what you said?

DocumentRoot /path/to/domain.com/
ServerName domain.com

DocumentRoot /path/to/domain.com/sub1/
ServerName sub1.domain.com

DocumentRoot /path/to/domain.com/sub2/
ServerName sub2.domain.com


I don't see the difference. To me that's the same setup?? So how come my are isolated. Maybe I'm not understanding you...

When I upload files for third level domains, I am uploading into one of the subdirectories of the main acount. I don't have separate accounts for each sub-domain setup.

littleman

WebmasterWorld Senior Member littleman us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 270 posted 10:46 pm on Jun 16, 2001 (gmt 0)

Yeah, you are right. I didn't know you were dumping the root domain at 'DocumentRoot /home/user/public_html'. I thought you had a structure something like this:

DocumentRoot /home/user/public_html/base -> or whatever you want to call the folder for the root domain.
ServerName www.domain.com

DocumentRoot /home/user/public_html/sub1
ServerName sub1.domain.com

DocumentRoot /home/user/public_html/sub2
ServerName sub2.domain.com

It is a simple enough change to adopt.

For simplicity I usually do something like this:
DocumentRoot /home/user/public_html/domain.com
ServerName www.domain.com
DocumentRoot /home/user/public_html/sub1.domain.com
ServerName sub1.domain.com
DocumentRoot /home/user/public_html/sub2.domain.com
ServerName sub2.domain.com

jenreed

10+ Year Member



 
Msg#: 270 posted 10:54 pm on Jun 16, 2001 (gmt 0)

I see. You map the main domain to a subdirectory as well.

The main index.html sits under public_html so instead I'd just map the main domain to a subdirectory too. Then everything is completely independent...and not a subdirectory of another.

Hey... thanks for working this out with me. Learn something every day. :)

Appreciate your time!

mack

WebmasterWorld Administrator mack us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 270 posted 3:04 pm on Jun 17, 2001 (gmt 0)

hi there people.
i have a url redirectoru service but they only allow you to insert keywords and description once so the keywords are not acurate for the subdomain... should i redirect by subdomains to my homepage and then have internal links to the relevante content?

always_here

10+ Year Member



 
Msg#: 270 posted 10:48 pm on Jun 17, 2001 (gmt 0)

This is a fantastic thread - I'm learning a lot - thanks everyone for sharing

(I had posted my question in a different thread but Marcia pointed me here and I'll continue here)

Our situation is a little different:

We have 2 domains

www.domain1.com
www.domain2.com

They have different IP addresses

On the server:

/public_html
/subdirectory1 (where www.domain1.com resides)
/subdirectory2 (where www.domain2.com resides)

The 2 domains have many pages and images in common

/public_html
/subdirectory1
page1.htm
page2.htm
image1.jpg
etc
/subdirectory2
page1.htm (same as above)
page2.htm (same as above)
etc

To simplify maintenance we would like to have only 1 physical copy of each common page and image

/public_html
/subdirectory1
page1.htm (real)
page2.htm (real)
etc.
/subdirectory2
page1.htm (created with ln -s public_html/subdirectory1/page1.htm public_html/subdirectory2/page1.htm)
...etc...

All hyperlinks on our pages are relative

Any problems?

littleman

WebmasterWorld Senior Member littleman us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 270 posted 5:16 am on Jun 18, 2001 (gmt 0)

Jennifer, any time.

Mack, generally the URL redirects that are commercially promoted are bad for promotion -- but it depends on how it is done. Maybe we should make a new thread?

Always_here, you are running mirrors? It really is not a good idea to have the same content spiderable on multiple domains, but either of your methods will put you at equal risk.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Marketing and Biz Dev / Link Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved