Sat 20 Jan 2007
Types of URL ( Absolute and Relative )
Posted by Harry under Domain Name Hosting , SEO Articles , Web Development , Web HostingAbsolute URL :
Dictionary meaning of word absolute is : not dependent on any thing ie independent having its own existence, same is the meaning of absolute urls.
An Absolute URL is, thus, something that is independent or free from any relationship from the rest. When you use an absolute URL, you point directly to the file you give exact location of the file.
eg : “sitename.com/images/welcome.gif” is an absolute url as it specifies that an image file welcome.gif located in the images directory, under yoursitename domain.
You should always opt for absolute url when referring to other site.Generally such url are long and hence are not much preferred by lazy webdeveloper they like to use relative urls. While changing directory structure you need to rewrite whole path of the new directory and file which can be cumbersome but as far as SEO is concerned spiders like to crawl absolute url.
Relative URLs :
A relative URL points to a file/directory in relation to the present file/directory.
They have short urls as they are referring to root directory/subdirectory.Relative urls helps webmaster to maintain the site without rewriting the whole path again and again if they had made any changes in directory.
eg : ../image/welcome.gif is a relative url (The initial two peroids (..) in the url instruct the server to move up one directory (which is the root directory), then enter images directory and finally point at welcome.gif file )
Relative urls are to used wisely otherwise an error may occur and the intended file may not open.Relative URLs are short and does not require to write whole path so due to its short typein nature they are more popular and are commonly used by webmasters.
3 Responses to “Types of URL ( Absolute and Relative )”
Leave a Reply
You must be logged in to post a comment.



















January 22nd, 2007 at 9:09 am
Relative URLs help’s you in maintenance of your website also you can easily transfer your website from one domain name to another if you have relative URLs in it.
January 22nd, 2007 at 9:51 am
I thing it depend on the server and file setup as to which type to use.
January 22nd, 2007 at 10:46 am
Bob,
Webprogrammer decides what type of link to be used, all servers support both types of links.