View Full Version : hardcoded url versus relative path
04-29-2007, 01:16 PM
does it make any difference for SE's if you use hardcoded urls in the code like http://www.domain.com/en/file.htm instead of e.g. "../en/file.htm"
04-29-2007, 11:17 PM
Makes no difference. First thing a search engine does is change relative urls into absolute urls.
But from a practical point of view I wouldn't use ../
Just use /path/path/etc.html, it will save you a lot of headaches.. :)
By the way, I saw you´re located in Brazil. Que bom que não sou a unica pessoa no Brasil que visita este forum. If you feel like that´s not correct portuguese than that´s possible,. :) I am not brazilian, but I live in São Paulo for about 5 years now.
<added> Ah,.. je spreekt zelfs nederlands,. :) Then my portuguese will be fine for you... </added>
04-30-2007, 05:16 PM
Google has said they prefer absolute, but didn't give a reason why. One thing is fro sure that they want you to be consistent and use one or the other and don't mix and match throughout the website.
Many posts on this already:
Post subject: absolute urls for internal links or local? (http://www.webproworld.com/viewtopic.php?t=70411)
Post subject: Relative vs. Absolute Links (http://www.webproworld.com/viewtopic.php?t=58479)
04-30-2007, 06:01 PM
oops.. in this site http://www.visitnatalbrazil.com i use relative paths, but recently i added a wordpress blog see http://www.visitnatalbrazil.com/pt/blog/ which has absolute (perma)links...
am i in trouble now?
04-30-2007, 06:15 PM
That statement is (was) from Google. I would monitor it if your leaving it or make efforts to make them the same. All I can do here is recommend.
04-30-2007, 10:52 PM
By the way here is where Google hints (http://www.google.com/support/webmasters/bin/answer.py?answer=35156&hl=en) about absolute over relative.
Where possible, use absolute rather than relative links. (For instance, when linking to another page in your site, link to www.example.com/mypage.html rather than simply mypage.html).