Convert link from node/nid to Pathauto url?
I would, as Splat mentioned, check out the Global Redirect module, which will help out with google not seeing node/FOO and pretty/path pointing to identical content.  If, however you are wanting to make sure that when engines scan your page content and pretty/path shows up inside the HTML, you can either continue to hardcode the paths, or create a function that returns the aliased path based on the nid.

function make_my_path($nid) {
  $pretty_path=drupal_get_path_alias('node/' . $nid);
  return $pretty_path;
}


Then use that (or drupal_get_path_alias() directly) in your templates or preprocess functions, or just use l().  If it is passed 'node/FOO' as the path, it will return the aliased path if one is set. (Unless you explicitly tell it not to; see url().)

So, for example, print l('Hello World','node/23'); should return &lt;a href="/pretty/path/to/node/23"&gt;Hello World&lt;/a&gt;.