Forum Moderators: phranque
However I have chatted with a number of webmasters and to date I am still unconvinced.
Has anyone got any thoughts about the matter?
The reason for that is because it makes the paths easier for the spiders to follow. Making the paths easy to follow minimizes the small chance the spiders will miscalculate where in your website they are (if you use relative), which may cause indexing problems.
I'll take Matt's recommendation over a webmaster's speculation any day.
I think now I am convinced that absolute is the way to go. It will however cause havoc in our design studio as we have a test server that would not work with absolute paths ....We will have to find a solution I reckon.
What if you used a server side include in all the links? ht*p://<?php include($_SERVER['DOCUMENT_ROOT']."/path.php");?>/path/page.html
Then just change the include from localhost to the domain name when you upload it?
---------
Can somebody give me a definitive answer on the following:
When I link to my home page, should I use:
<a href="h*tp://www.mydomain.com">
OR with a / at the end
<a href="h*tp://www.mydomain.com/">
Thanks!
if a spider arrives on a deeplinked page on your site, and has followed a non-www link to get there, then you could end up with a large proportion of your site indexed the wrong way.
or am i confused about how that would work?
tallis
You're talking about the trailing slash.
I'm not a server techie, but according to this really great article over at Alistapart, Slash Forward (Some URLs are Better Than Others), the slash is good practice in that it will reduce server load (the server doesn't have to figure out if it's looking for a file or a folder: domain.com/some-name), which will in turn save time loading up the page. But read the entire article for the full explanation, it's a good one.
If somebody could post code how to do what I just recommended, I would be very thankful:)