| 6:05 am on Aug 14, 2010 (gmt 0)|
To have this discussion, we should first clarify the technical language a bit, because many writers and speakers can be a bit casual in their word choice. There are really THREE possible schemes, not two. Here's how I understand them
1. ABSOLUTE LINK
An absolute link contains the protocol (HTTP://) plus the hostname (domain name, with subdomain if any) followed by the file path to the actual resource.
2. ROOT RELATIVE LINK
This style of linking begins with a forward slash and omits the protocol and the hostname. Every link written this way is assumed to start with whatever the current protocol and host name are in the user-agent (browser).
3. RELATIVE LINK
Relative links are computed relative to the current location - they do not begin with a forward slash .. and that's where you get the crazy ../../ schemes to go back a few directories toward the domain root.
Examples: ../directory/page.php or directory/page.aspx
Early search engines sometimes got confused because of technical issues, and many people found that absolute links were the best way to ensure that links were registered correctly. Absolute links also make a scraper's job a bit more difficult - the navigation will not work unless the links are also changed.
Root relative linking creates files that can easily be moved to another domain. And relative links will resolve properly even if they are hosted on a local machine without any server software - that's their main appeal for development, I think. Unfortunately, using relative linking is also the easiest approach for a hand-coding html author to make errors.
In my opinion, there is little if any difference today for SEO. Search engines will accurately process any of the three schemes. And scrapers also have access to good technology and can fix the links that would otherwise break - so absolute links provide very little defense.
| 6:29 am on Aug 14, 2010 (gmt 0)|
there was a discussion about this a month ago in the Link Development forum which included an especially interesting observation by CainIV regarding a possible advantage to using absolute urls when the hostname contains a relevant keyword.
Relative or Absolute Links - Which are Better ?:
note that one slight counterbalancing advantage to relative links is the reduction in page weight.
| 5:49 pm on Aug 14, 2010 (gmt 0)|
I have one site that has a mixture. I originally coded it with relative links, but later when I added a few new pages, i used absolute links on them, intending to change-over the old pages too. Then I decided to change the old pages gradually, but got busy with other projects and never changed most of them.
But despite the mixture, Google rankings and traffic have steadily improved throughout the site's five years existence and are presently higher than ever.
| 6:36 pm on Aug 14, 2010 (gmt 0)|
I always start with a leading slash when linking to images, stylesheets, scripts, and to other pages.
I never use relative linking; there's too many issues involved, especially when the site uses URL rewriting.
| 11:44 pm on Aug 14, 2010 (gmt 0)|
I first wanted to say thank you to Ted for describing the different ways that internal links can be created. It is very informative.
Also, thank you, phranque, for the link to the thread about relative and absolute links and the posting from CainIV. He mentions some things that I think are pretty important.
For some of the sites that I am working on, I use a site builder so there are going to be some links that are relative. For the links that I have in the body text, I have the option of relative links or absolute links. At the moment, they are relative links but I am trying to determine if it would be better to make them into absolute links. One of the things that I read that it is a good idea to have all of your links as relative or absolute but after reading your post, I think it might be ok to have a combination of both?
Do you think the improvement in your rankings is the result of making links to the new pages that you added absolute and also some of the links to your older pages absolute later on, or are the better rankings as a result of the new content that you added?
From the post of CainIV in the other thread, I think an interesting question comes up.
Does the use of absolute links help to transfer more pagerank to the page being linked to and help to raise that page in the rankings because the absolute link it is receiving is seen as a “stronger vote” than a relative link? Let’s assume, for example, in this situation that there is a link from the homepage in the body text to an inner page, the homepage has a higher pagerank than the inner page and the homepage does have inbound links.
Is it better to use absolute rankings when in the above situation? Does it help more? The domain does have keywords in it.
I know that by using absolute links it creates more code but for some of the sites that I am working on I would be changing 2 links on a page from relative to absolute and the sites are less than 20 pages so I don’t think there would be a situation of the extra code increasing the time it takes for a page to load? Can anyone tell me if my thinking is right?
| 12:17 am on Aug 15, 2010 (gmt 0)|
Use absolute links.
| 12:37 am on Aug 15, 2010 (gmt 0)|
Thanks for the link to GoogleGuy's post, steveb. Because our new software rewrote the full urls, it can be a challenge to pick out the details of the meaning. So I think it will help to reprint part of the thread here - without the automatic linking etc:
|...wattsnew asked if there was a technical guide on how to handle www vs. non-www, relative vs. absolute linking, and links to different pages such as / vs. index.html vs. default.asp. My rule of thumb is to pick a root page and be as consistent as possible. I lean toward choosing http://www.yourdomain.com/ but that's just me; http://yourdomain.com/ would work as well. Then I recommend that you make things as simple as possible for spiders. I recommend absolute links instead of relative links, because there's less chance for a spider (not just Google, but any spider) to get confused. In the same fashion, I would try to be consistent on your internal linking. Once you've picked a root page and decided on www vs. non-www, make sure that all your links follow the same convention and point to the root page that you picked. Also, I would use a 301 redirect or rewrite so that your root page doesn't appear twice. For example, if you select http://www.yourdomain.com/ as your root page, then if a spider tries to fetch http://yourdomain.com/ (without the www), your web server should do a permanent (301) redirect to your root page at http://www.yourdomain.com/ |
So the high-order bits to bear in mind are
- make it as easy as possible for search engines and spiders; save calculation by giving absolute instead of relative links.
- be consistent. Make a decision on www vs. non-www and follow the same convention consistently for all the links on your site. Use permanent redirects to keep spiders fetching the correct page.
Those rules of thumb will serve you well no matter what with every search engine, not just with Google. Of course, the vast majority of the time a search engine will handle a situation correctly, but anything that you can do to reduce the chance of a problem is a good idea. If you don't see any problems with your existing site, I wouldn't bother going back and changing or rewriting links. But it's something good to bear in mind when making new sites, for example.
| 12:42 am on Aug 15, 2010 (gmt 0)|
|Do you think the improvement in your rankings is the result of making links to the new pages that you added absolute and also some of the links to your older pages absolute later on, or are the better rankings as a result of the new content that you added? |
gouri -- I really don't think using alsolute links on some pages made much difference to the site's rankings or traffic. In my opinion it's a very small factor. I believe that most of the site's overall success comes from its unique content.
| 4:27 pm on Aug 15, 2010 (gmt 0)|
I am in a situation where I will be adding new pages of content to a site that I am working on. I would also like to change the relative links that I currently have on the site to absolute links and also make the links to the new pages that I add absolute links.
I was wondering what you guys would recommend as being the best way to do this.
(1) Should I add the new pages of content, link to those pages as relative links like I have it now for the older pages and then see what effect that has in the SERP and change the links in the body text (I can't change the navigation links - they will be relative) from relative to absolute at some point later on?
(2) Can I add the new pages to the website and also make all the relative links into absolute links on the old pages and to the new pages that I add at the same time?
Since I think both of these things (adding pages of content to a site that is not very big and changing the links from relative to absolute) are considered pretty important, I am not sure if it is better to do them one at a time or if doing both at the same time would be ok?
| 9:50 pm on Aug 15, 2010 (gmt 0)|
There's no point doing anything from this point forward wrong or non-optimally. Just use absolute links.
| 3:58 am on Aug 16, 2010 (gmt 0)|
while i'm not saying that it is wrong now or that things have necessarily changed, it should be pointed out that GG's posts in that thread were based on the state of the algo over 5 years ago...
| 6:07 am on Aug 16, 2010 (gmt 0)|
My english not very well but if I misunderstood, please correct me. Googleguy suggest to us, use absolute url for easy crawling or whatever?
| 7:09 am on Aug 16, 2010 (gmt 0)|
yes, in june, 2005, GoogleGuy recommended using absolute links to make things as simple as possible for spiders.
| 1:15 am on Aug 18, 2010 (gmt 0)|
For anchor links, is there an option of using absolute or relative links?
Most information I read mention links from other pages so I was not sure about this.
If it is possible to use absolute links, if your anchor name is more than one word, would it be better to use underscores or hyphens to separate them?
| 2:48 am on Aug 18, 2010 (gmt 0)|
I see a major local portal is using relative links for their breadcrumb navigation, relative links are of course shorter than absolute and this way they accomplish rich snippets (additional links below description) in SERPs.
But they also use relative links for most of their URLs with 8 million URLs indexed ...
| 9:11 pm on Aug 25, 2010 (gmt 0)|
When including images on a page, are absolute links also preferred over relative links in the <img src> code when indicating where the file path of the image is?
| 11:10 pm on Aug 25, 2010 (gmt 0)|
If image search traffic is important to you, there is some evidence that using the absolute URL in the src attribute helps you "own" the image in the SERPs, rather than being ripped off by hotlinks. It's not a 100% sure thing, but as I said, there is "some" evidence.
The whole concept behind absolute links is eliminating one possible source of back end errors at the search engine. That holds true ANY time you reference another URL.
| 11:00 am on Aug 26, 2010 (gmt 0)|
@gouri Always avoid spaces and underscores in any and all parts of a URL, and in any attached parameters and/or anchors. Use hyphens or periods.
| 1:21 pm on Aug 30, 2010 (gmt 0)|
Thanks for the advice.
I also wanted to ask anyone who changed from relative links to absolute links on a website, how long did it take you to see the effects (change in rankings) of it?
The reason I ask is that I have heard that it sometimes takes longer to see the effects of link changes than changing text.
| 1:30 pm on Aug 30, 2010 (gmt 0)|
It should not have any impact (unless your relative links were not resolving correctly, in which case this is a different problem)
| 3:19 pm on Sep 3, 2010 (gmt 0)|
regarding underscores - way back when - ie, before I knew any better - I used underscores in filenames. Not in title, meta, etc, just in file names - lots of these rank nicely. Should I go back, revise the file name, do a 301 from the old file to the new? Is this uber important. I am no longer using underscores, but am wondering if the old style is really that bad.
| 3:27 pm on Sep 3, 2010 (gmt 0)|
We use 100% ABSOLUTE LINK structure in all projects we do. Never had a problem with it.
#application.site_url#/see/my/url or #application.https_site_url#/see/my/url
where application.site_url = http: //www.blah.tld and application.https_site_url starts with HTTPS when allowed.
| 5:11 pm on Sep 3, 2010 (gmt 0)|
Unless engines are using the protocol (http://) to trigger some sort of "external link" marker, I don't see how or why it would make a difference.
In event, if there is any difference between relative and absolute internal links, it seems like something that will get "fixed" once they find out why it happens.
| 5:32 pm on Sep 3, 2010 (gmt 0)|
|regarding underscores - way back when - ie, before I knew any better - I used underscores in filenames. Not in title, meta, etc, just in file names - lots of these rank nicely. Should I go back, revise the file name, do a 301 from the old file to the new? Is this uber important |
No - it's not uber important at all. The traffic problems that changing your URLs would create would be far worse than the small benefit you get from using a hyphen rather than an underscore. Just change your practice going forward.
| 5:42 pm on Sep 3, 2010 (gmt 0)|
It makes no difference, don't waste precious brainpower on this decision.
| 6:19 pm on Sep 3, 2010 (gmt 0)|
Absolute links to the correct destination URI have always served me better than relatives
| 8:08 pm on Sep 3, 2010 (gmt 0)|
Within URLs, spaces and underscores are different issues. You don't put a space in a URL, because space is simply not a legal character in a URL. You decide whether to use perfectly-legal underscores based on some perception of what a search engine will do with them--your choice.
Space is not a choice, it's a crime. Underscore is a (wise or foolish) choice.
| 8:54 pm on Sep 3, 2010 (gmt 0)|
Yes,I know - I've worked in this environment a long time - spaces were never in questions - just the underscore vs. hypen. I'm old, so I have a habit of doing underscores from my old days when certain servers had to have them to recognize filenames and I was working with mac folks who often used spaces. Nightmare. Anyhow, thanks all, I won't sweat it, I'll just transition to hyphens ala wordpress.Tks, and have a great weekend al!
| 12:19 am on Sep 4, 2010 (gmt 0)|
underscore vs hyphen is more of a usability issue than a SEO issue.
this is mostly due to the default/standard style of underlining links, which hides the underscore.
| This 35 message thread spans 2 pages: 35 (  2 ) > > |