Wednesday, April 13, 2011

SEO Perspective of Absolute URL vs. Relative URL-Part I

This is the first part of my blog in which I have described about absolute and Relative URL and the difference between the two

What Is An Absolute URL?
The world Absolute means independent An URL that is ABSOLUTE shows the complete address. Whenever you use an absolute URL, you point directly to a file. Hence, an absolute URL specifies the exact location of a file/directory on the INTERNET. It also follows that each absolute URL is unique which is very important from an SEO perspective like SEO London, which means that if two URLs are identical, they point to the same file.

What Is Relative URL ?
The word relative means in relation to something. A URL that is RELATIVE only shows a partial address and the success or failure of locating a file is dependent on some particular conditions- which means the outcome can and will vary, depending largely how the directories within your website are structured.

Difference between The Two?
An absolute URL typically takes the following form:
Protocol://hostname/other_information
The protocol is usually http:/. The hostname is the name of the computer. The other information includes directory and file information. You must use absolute URLs when referring to links on different servers.
For Example:
http://www.mysite.com/pictures/email.gif specifies an image file email.gif located in the images directory, under www.webdevelopersnotes.com domain name.

Relative URL
In case of Relative URLs it 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 world.html, which is in the same directory as your home page, you would use:
<a href="world.html">Beauty of the World!</a>

If the file you want to link to is in a subdirectory of the referring page's directory, you need to enter only the directory information and the name of the file. So if world.html were in the world subdirectory of your www directory, you could refer to it from your home page by using:
<a href="world/world.html">Beauty of the World!</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 world.html to home.html, which is in the directory above, you would use:
<a href="../home.html">Go back to my home page</a>

No comments:

Post a Comment