Welcome to WebmasterWorld Guest from 54.145.53.251

Forum Moderators: incrediBILL

Message Too Old, No Replies

internal linking basics

best practices

     
4:59 pm on May 25, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:June 2, 2006
posts:2112
votes: 2


If you're to spell out your own coding preference for internal linking, how would it look like and why?

I ask this as I came across /something/ vs. ../something/ way of linking.

I was aware of this before, but never bothered as Dreamweaver would do it for me, so if it's about going one or more levels up, the link would be in the form of ../../ etc.

Now, looking into the code someone else made for me, I see a simple / and nothing else (including templates). It works, but I wonder about possible implications.
I like to follow the standards, not to have a mix of ../ and / at the same time within the same website.

Thanks

P.S.
What I've been doing so far is:

- Home page - full URL starting with HTTP://
- Internal pages - follow the folder structure by using ../
- Always link to a subfolder only, never to index page itself (reduce duplicate content issue between / and /index.html). Use redirect for all index.html to / in .htaccess.
7:20 pm on May 25, 2014 (gmt 0)

Senior Member from LK 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts:2417
votes: 17


I used the full URL on all internal links on one site, one thing that has happened is that a lot of scrapers copied those links with my full url in them. The benefit is that it makes it obvious to search engines where the original content is.

I would be inclined not to use ../ because if you move a block of text from one page to another not in the same folder, then the link breaks.
8:37 pm on May 25, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12702
votes: 244


I ask this as I came across /something/ vs. ../something/ way of linking.

These are not different wordings but fundamentally different approaches.

:: shuffling papers ::

I posted this explanation less than 24 hours ago, so let's just link:

http://www.webmasterworld.com/html/4673678.htm#msg4674276

but also
http://www.webmasterworld.com/apache/4653277.htm#msg4674291


(autolinking intentionally overridden to preserve fragments)
2:05 am on May 27, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 17, 2005
posts: 4965
votes: 10


I personally prefer the root-relative links (/something). The reason being that page-relative links (../something) break if you move the page from one folder level to another (or if the content that includes the link is being used in more than one page at more than one folder level). I find root-relative to be the easiest to maintain.