I know it is a good idea to make sure the sites you get links from have as high a pagerank as possible. But, is this the pagerank of the main domain or the links page?

PageRank is calculated per page, so it is the value of the page where the link is that matters*. That’s why most directory sites are useless for PR, because only the home page has more than a few microns of PR, and the page where your link is will probably have zero, and a thousand links to divide it between, and zero divided by a thousand won’t give you enough to buy a pack of gum.

• Well, I say ‘matters’, but to be honest it hardly matters at all. PageRank is one of over 200 factors that Google considers when ranking your site, and because it is (in theory) so transparent and easy to manipulate, Google pays it very little attention at all.

So if Google don’t pay attention to pagerank, how do I tell if a page is worth linking to?

You link to a page because you think that it will help people reading your site to have the option of following that link. Does it go to a useful site that is relevant to the content of your page? If so, link to it. If not, don’t.

If you mean “how do I tell if a page is worth trying to get a link from?”, that’s a different question, but the answer is pretty much the same. If the page is one where you think your site will be relevant and useful to its readers, try to get a link. If it’s a site that is doing really well in the search rankings and looks like it’s getting lots of traffic, try harder to get a link. If it’s languishing somewhere around page 23 on Google and there’s no evidence of it having a lot of visitors, it isn’t worth putting as much effort in.

Sorry, another question. If I have a link to a site with relevant content to mine but the site is really low ranked, can it harm my site ranking?

Google introduce a new algorithm for calculating page rank of any page :-

The original PageRank algorithm was described by Lawrence Page and Sergey Brin in several publications. It is given by
PR(A) = (1-d) + d (PR(T1)/C(T1) + … + PR(Tn)/C(Tn))
where
PR(A) is the PageRank of page A,
PR(Ti) is the PageRank of pages Ti which link to page A,
C(Ti) is the number of outbound links on page Ti and
d is a damping factor which can be set between 0 and 1.

So its all about the value of page from where its link is placed.

If Google thinks the other site is unimportant (ie, it ranks low because the content isn’t great and/or it doesn’t have a particularly good link profile), it won’t do you any harm … and it will give the other site a welcome boost.

On the other hand, if Google thinks the other site is bad (ie, it has illegal content, malware, or severely violates its webmaster guidelines) then it might want tarnish your site by association and damage your rankings.