Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Googlebot not following document relative paths

         

nmjudy

6:23 pm on Oct 15, 2008 (gmt 0)

10+ Year Member



I looked at Google Webmaster Tools and found numerous linking errors from my own site. After researching the pages, I find that errors are being generated by document relative links that Googlebot can't seem to follow.

Should I change these links to root relative or absolute links?

I can't seem to find any recent info on the href tag. Are people still using this? How does the href tag work in a page if my pages are broken down by numerous folders and subfolders?

g1smd

8:43 pm on Oct 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes. Use root relative instead of just relative; that is /folder/somefile.html instead of just somefile.html - domain name optional, especially if your site already preforms domain canonicalisation elsewhere.

tedster

8:49 pm on Oct 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Document relative links are not usually a problem for Google.

../ means go one directory closer to the root. That's usually simple to get right, as long as you include the right number of occurrences.

Sometimes errors happen when webmasters intend to point further from the root -- that is, deeper into the hierarchy. The accident comes up by accidentally beginning the href value with a forward slash. That begins the relative url at the domain root, instead of pointing one subdirectory further into the directory structure as was intended.

Root relative urls are more accident proof than document relative urls, as long as you remember to include all the subdirectories in the filepath. And if you can spare the extra charaters, fully qualified absolute urls are the safest.