elative links are not relative to the documents they are contained in -- they are relative to the entire website.
Any relative link that is NOT a site-relative link MUST be a document-relative link. Document-relative links are links that are relative to the document that contains them. Here are some examples of document-relative links:
comedy.html -- refers to the file comedy Real Estate SEO (Search Engine Optimization): Making a Smart ChoiceAs a real estate professional, you qualify as a prime prospect for most companies
offering real estate SEO (search engine optimization) services.You want more sales and more listings and they want you to
believe that they can give that to you.If you haven't already gotten calls, emails or letters from a few real estate SEO
companies telling you that they can get your real estate website into the
The documentation in the Dreamweaver HTML Layout Editor software package talks about two distinct types of relative links in HTML, but the concepts are applicable to any web page; with or without Dreamweaver. The two types of relative links are:
- Site-Relative. The address of the link is relative to the overall site.
- Document-Relative The address of the link is relative to the address of the document the link appears in.
It is important to understand that if you are testing web pages and sites on a computer without a web server, site-relative links probably will not work. With that said, here are detailed explanations of site relative links versus document relative links.
Site Relative-Links
In a site-relative link the address always begins with a forward slash -- "/". The forward slash indicates that the address is relative to the web server's notion of the site root.
Let us suppose that your site is located at the web location:
http://www.TotallyNonExistentSite.com
Furthermore, let us now suppose that you want to refer to a document located at:
http://www.TotallyNonExistentSite.com/RedDirectory/FatDirectory/Jokes.html
Then the site-relative address of that document would be:
/RedDirectory/FatDirectory/Jokes.html
and, a link to that document would look like this:
Relative Address of Joke File
It is important to understand that this link will work from any other document in the website, NO MATTER WHERE IT IS LOCATED! The reason is simple -- site relative links are not relative to the documents they are contained in -- they are relative to the entire website.
Document-Relative Links
Any relative link that is NOT a site-relative link MUST be a document-relative link. Document-relative links are links that are relative to the document that contains them. Here are some examples of document-relative links:
comedy.html -- refers to the file comedy. Getting Started with Business IncubatorsYou have a head spinning with business ideas but you encounter difficulties in financing? Or you have recently started your great potential business but are not yet turning profit? A fundamental aspect for your business, financing is usually the most frequent obstacle in starting a business. You have the option of resorting to a business incubator on condition that your business idea seems viable and promising. Now if you wonder
he link appears in.
It is important to understand that if you are testing web pages and sites on a computer without a web server, site-relative links probably will not work. With that said, here are detailed explanations of site relative links versus document relative links.
Site Relative-Links
In a site-relative link the address always begins with a forward slash -- "/". The forward slash indicates that the address is relative to the web server's notion of the site root.
Let us suppose that your site is located at the web location:
http://www.TotallyNonExistentSite.com
Furthermore, let us now suppose that you want to refer to a document located at:
http://www.TotallyNonExistentSite.com/RedDirectory/FatDirectory/Jokes.html
Then the site-relative address of that document would be:
/RedDirectory/FatDirectory/Jokes.html
and, a link to that document would look like this:
Relative Address of Joke File
It is important to understand that this link will work from any other document in the website, NO MATTER WHERE IT IS LOCATED! The reason is simple -- site relative links are not relative to the documents they are contained in -- they are relative to the entire website.
Document-Relative Links
Any relative link that is NOT a site-relative link MUST be a document-relative link. Document-relative links are links that are relative to the document that contains them. Here are some examples of document-relative links:
comedy.html -- refers to the file comedy That Will Never Work!Because it's purpose is to create a customer, the business has two - and only- two functions, marketing and innovation. Marketing and innovation produce results, all the rest are costs. - Peter DruckerIf innovation is a primary function of a business, what happens to your ability to innovate when new initiatives g
tes that the address is relative to the web server's notion of the site root.Let us suppose that your site is located at the web location:
http://www.TotallyNonExistentSite.com
Furthermore, let us now suppose that you want to refer to a document located at:
http://www.TotallyNonExistentSite.com/RedDirectory/FatDirectory/Jokes.html
Then the site-relative address of that document would be:
/RedDirectory/FatDirectory/Jokes.html
and, a link to that document would look like this:
Relative Address of Joke File
It is important to understand that this link will work from any other document in the website, NO MATTER WHERE IT IS LOCATED! The reason is simple -- site relative links are not relative to the documents they are contained in -- they are relative to the entire website.
Document-Relative Links
Any relative link that is NOT a site-relative link MUST be a document-relative link. Document-relative links are links that are relative to the document that contains them. Here are some examples of document-relative links:
comedy.html -- refers to the file comedy Are you Interested in Increasing your Google PageRank?You should be. If you have never heard of Google PageRank and you have established a website, it is high time you learned about Google PageRank and what it means to you and the success of your website. Having an excellent Google PageRank can either make or break a website in terms of overall success. Let's take a look at what Google PageRank is and why it is so important to every website owner.First, a word about t
address of that document would be: /RedDirectory/FatDirectory/Jokes.html
and, a link to that document would look like this:
Relative Address of Joke File
It is important to understand that this link will work from any other document in the website, NO MATTER WHERE IT IS LOCATED! The reason is simple -- site relative links are not relative to the documents they are contained in -- they are relative to the entire website.
Document-Relative Links
Any relative link that is NOT a site-relative link MUST be a document-relative link. Document-relative links are links that are relative to the document that contains them. Here are some examples of document-relative links:
comedy.html -- refers to the file comedy How To Hire Board Of Directors For Your Business: TipsHiring a board of directors for your business is not an easy task. You have to select the most responsible people who think clearly and can come to a decision quickly in times of crisis. The success of your business rests on them largely, and they should be able to take the best possible decisions without any personal bias creeping into it. Many businesses do not give adequate attention to the board of directors at the hiring st
elative links are not relative to the documents they are contained in -- they are relative to the entire website.Document-Relative Links
Any relative link that is NOT a site-relative link MUST be a document-relative link. Document-relative links are links that are relative to the document that contains them. Here are some examples of document-relative links:
comedy.html -- refers to the file comedy.html in the same folder.humor/sickjokes.htm -- refers to the file sickjokes.html, which is located in the humor folder, relative to the directory of the document it is referenced in.
../MotherInLawJokes.html -- refers to the file MotherInLawJokes in the folder above the directory of the document it is referenced in.
Links to the above three documents would look like this:
Address of file in same director
Address of file in lower level director
Address of file in directory one level up
Conclusion
When you move a document that contains root-relative links the links will continue to work. On the other hand, the root-relative links which refer to that document may break. In general, for working on small sites, document-relative links are preferred, and they have the additional advantage that they can be tested on a computer that does not host a web server.
copyright 2006 Sam Mela