Forum Moderators: phranque

Message Too Old, No Replies

Absolute and relative linking

Which is friendlier for Search Engines

         

designhaus

3:38 pm on Jun 5, 2005 (gmt 0)

10+ Year Member



I have been thinking for a while now that absolute linking within my websites is far better for the search engines and that it is easier for them to idex my site when I use absulte linking methods.

However I have chatted with a number of webmasters and to date I am still unconvinced.

Has anyone got any thoughts about the matter?

martinibuster

5:16 pm on Jun 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Matt Cutts from Google has stated on numerous occassions (at SES and Publishers Conference) that absolute is the way to go.

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.

diamondgrl

9:14 pm on Jun 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



GoogleGuy confirmed absolute as the way to go in a recent thread.

Span

9:54 pm on Jun 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use relative links since 1999 and I've not yet seen any of the major search engines make calculating errors with simple / or ../ and ../../ links.

martinibuster

10:15 pm on Jun 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



>>>I've not yet seen any of the major search engines make calculating errors

Good point, and that's not unusual. It's only a small chance that something like this can happen. I think it's less big a deal than some people may fear.

diamondgrl

11:14 pm on Jun 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Frankly, I think the bigger likelihood is a webmaster screwing up with relative links.

designhaus

7:54 am on Jun 6, 2005 (gmt 0)

10+ Year Member



I have to agree with you martinibuster,

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.

roldar

8:02 am on Jun 6, 2005 (gmt 0)

10+ Year Member



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!

tallis

4:51 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



it occurred to me that absolute is useful for keeping the www/non-www thing under control.

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

martinibuster

5:20 pm on Jun 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



>>>Can somebody give me a definitive answer on the following:

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.

Velmu

10:23 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



If server accepts www.domain.com and domain.com and doesn't do any redirect then that can cause problems. Many try to use non www-address because it's shorter and that can cause that when they link to that site they use shorter address even though webmaster would want links to www.domain.com. One solution is to use absolute links like GoogleGuy recommended but I would do what Google does on its own site: 301 redirect from non-www address to www-address or vice versa (actually Google returned 302 redirect:). Redirection shouldn't only apply front pages but all pages. I think that 301 redirect passes PR so you should do that even though you would use absolute links.

If somebody could post code how to do what I just recommended, I would be very thankful:)