Forum Moderators: open
Since all the absolute links to images, pages and other files etc is increasing my web page size quite a lot.
Also, does anyone know of a dcent CSS reference... im also suffering from bloated tables and td cells and such and want to cut down on the amont of attrinutes my tags contain.
Cheers
Spiders do not have a problem using relative URIs.
Andreas
In short most of the Search Engines can work with either.
One advantage to using absolute links is if people save your page to their PC. Then any links or images will still work, with relative links it will get messed up. This is also quite usefull if they send the page by email to someone else.
One way to get the best of both is to use the BASE HREF tag in the HEAD of your document. This will allow you to physically use only relative links in your code, but will physically send the visitors as if i was an absolute link. The drawback to this approach is that chances are it won't work in web based email like yahoo and excite.
Good Luck
Googlebot got my home page, and the 13 pages that had absolute links. The rest of the pages all had relative links and were ignored. Once I had the PR assigned to my home page, googlebot was quite willing to follow the relative links.
As a guess, I would say that googlebot is more willing to follow absolute URLs because they might lead to other sites.
All this is based on a sample of one site over 2 months. Certainly not conclusive, but if I start another site, it will have only absolute URLs until it is established.
I strongly favour relative urls. See reasons in previous discussion here [webmasterworld.com].
Using absolute is better. It helps protect you from DNS hijacking/glitches. IMHO, it's worth the extra code.
Heed the above advice! I would suggest using absolute for any and all page file references. When it comes to images use relative, no need to use absolute.
I've also been working both absolute and relative into newer designs. I use includes for top, right, bottom and left navigation elements. All link references in those files are absolute.
Then I'll use relative within my main content. The DNS Jacker can get the user to your page, but once they click on a navigation link, you've taken them back to your domain with the absolute reference.
P.S. Some affiliate type programs that call in a header, navigation or footer include, require that all URL references be absolute.
The alert pops up and says "the page you wish to view has both secure and insecure items - do you wish to proceed?"
Using relative allows the link to be "conditioned" as either http:/ or https:/ and the alert is avoided.
Be sure to read Marcia`s WebmasterWorld Welcome and Guide to the Basics [webmasterworld.com] post.
An absolute identifier refers to a resource independent of the context in which the identifier is used. In contrast, a relative identifier refers to a resource by describing the difference within a hierarchical namespace between the current context and an absolute identifier of the resource.
[faqs.org...]
Andreas
Using absolute is better. It helps protect you from DNS hijacking/glitches
If you use absolute urls, the maximum number of pages that could possibly indexed under the wrong name is only one.
If there are multiple domains pointing at one site/IP and that site uses relative urls, a spider following a link to one of those additional domains will end up indexing the entire site as that domain.
Googlebot got my home page, and the 13 pages that had absolute links. The rest of the pages all had relative links and were ignored. Once I had the PR assigned to my home page, googlebot was quite willing to follow the relative links.
Does this explain why the Gbot only crawls robots.txt and the home page from my site? All links from home page to other pages in the site are relative.
Would it be worthwhile to make a couple of links (especially the one to the links page) into absolute?