SEO Tutorial - Understanding Relative and Absolute Paths
 

Back | Print Version

Understanding Relative and Absolute Paths

SEO Tutorial - Understanding Relative and Absolute Paths

Understanding how paths work is, without a doubt, the most difficult thing to learn for a beginning web page creator. Broken links, or bad paths, are the reason you see those ever popular 404 error pages.

There are two types of paths in HTML, known as relative paths and absolute paths. An absolute path contains the full URL of the item being referenced. A relative path contains directions to the item relative to the HTML page.

Relative paths are a shorthand way of referring to other web pages that reside on the same server as the document referring to them. The shorthand notation allows you to refer to pages without having to repeat the server, or even Directory name - which saves a tremendous amount of typing and reduces the chance of errors.

Another benefit is that since relative links don't refer to the server or directory, it is easier to move related pages from one location to another without having to change the links. This allows a person to create a set of linked pages on their local hard disk, test the pages locally, and move them up to the actual web server without having to change anything.

Contact Oyster Web

Absolute Paths

You would typically use an absolute path with to point to Web Pages that are on another domain other than your own. For example, if I want to link to this tutorial from your own Web Pages you would need to include the full url (universal resource locator).

Link Campaign Tutorial

If you find our tutorials helpful, please feel free to link to this page. You can you the code snippet below:


Search Engine Optimization