homepage Welcome to WebmasterWorld Guest from 174.129.103.100
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
internal linking basics
best practices
smallcompany




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

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.

 

graeme_p




msg:4674373
 7:20 pm on May 25, 2014 (gmt 0)

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.

lucy24




msg:4674382
 8:37 pm on May 25, 2014 (gmt 0)

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)

Fotiman




msg:4674725
 2:05 am on May 27, 2014 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
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