pradeep's Avatar, Join Date: Apr 2005
Team Leader
That's a pretty good explanation Lucy!
Jenniferlinn's Avatar
Go4Expert Member
Absolute URL is search engine friendly. To get more details read differences betwwen both:

An absolute URL typically takes the following form:
protocol://hostname/other_information

The protocol is usually http://, but can also be ftp://, gopher://, or file://. The hostname is the name of the computer. For example, the hostname of Indiana University's central web server is www.indiana.edu. The other_information includes directory and file information. You must use absolute URLs when referring to links on different servers.

A relative URL doesn't contain as much information as an absolute URL does. Relative URLs are convenient because they are shorter and often more portable. However, you can use them only to reference links on the same server as the page that contains them. Relative URLs can take a number of different forms. When referring to a file that occurs in the same directory as the referring page, a URL can be as simple as the name of the file. For example, if you want to create a link in your home page to the file foobar.html, which is in the same directory as your home page, you would use:
<a href="foobar.html">The Wonderful World of Foobar!</a>

If the file you want to link to is in a subdirectory of the directory the referring page is in, you need to enter only the directory information and the name of the file. So if foobar.html were in the foobar subdirectory of your www directory, you could refer to it from your home page by using:
<a href="foobar/foobar.html">The Wonderful World of Foobar!</a>

If the file you want to link to is in a higher directory than the referring page, use .. , which means to go up a directory. For example, to link from foobar.html to home.html, which is in the directory above, you would use:
<a href="../home.html">Go back to my home page</a>
mikecriss's Avatar, Join Date: Jan 2009
Light Poster
i read ur discussion again and again but i didnt get what is relative Urls and absolute Urls .........i mean what is the function of both .....what is the written format of both .......plz give me complete details ........
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Urls in a web page can be specified in 2 ways.

1. Is Relative location to current page.
2. Absolute location.

Say the home page of this site is 2 folders up from this page and so you can link to home page either by url or by specifying the relative path and both would work the same way as far as user experience is concerned.