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