Absolute links, relative links, and search engine optimization (SEO)
Which link format is better for search engines? Which link format is better for users/searchers?
As a web designer/developer, I am fortunate to be in a position to create search-engine friendly web sites from the planning stage through implementation. I have seen the types of web pages and navigation schemes that the commercial web search engines have an easy time crawling, and I have seen the types of navigation schemes search engines have a more difficult time crawling. This reader question is one I get asked all of the time:
Which type of link is better for getting search engine rankings: an absolute or a relative link?
In terms of search engine visibility, it does not matter if you use absolute or relative links on your web site. The search engines automatically convert relative links into absolute links. However, using absolute links will not make a site rank higher merely because webmasters choose to use absolute links on their sites.
Absolute and relative links in XHTML pages
For those of you who do not know the difference between an absolute and relative link, the following examples should make it clearer.
An absolute link defines a specific location of the web file or document including: the protocol to use to get the document, the server to get it from, the directory it is located in, and the name of the document itself. Below is an example of an absolute link:
- The less than sign (<) opens the tag.
- The "a" means anchor.
- The "href" specifies the location of a web resource.
- The entire URL (http://, the domain name, directory names-if used, and file names).
- The greater than sign (>) closes the tag.
With a relative link, the search engine spiders and browsers already know where the current document is located. Thus, if you link to another document in the same directory, you will not need to write out the full URL. Only the file name is necessary. Below is an example of a relative link:
Notice that the domain name or the http://www is not included in this type of link.
Personally? I tend to use relative links because the shorter code can decrease a page's actual download time - less code means a faster download time. However, if I have a client that prefers to use absolute links, then I will use absolute links on the site.
Use whatever link type you are more comfortable using. However, when I optimize PDF files. With PDFs, I always use absolute links. If you are also distributing content via RSS feeds, then you should use absolute links.
Absolute links and PDF files
Even though using relative links will not affect search engine visibility, I make an exception with PDF files.
Reason? People commonly email PDF files to each other, or they download PDF files to their desktops. If you place a relative link in your PDF files and try to click on that link from your desktop (or email), the web page will not load.
In order for the page to load properly from your desktop or email, the PDF-file links should be absolute links.I know this question is coming: do search engines follow the links inside of a PDF file? The answer is yes. Both Yahoo and Google can follow the links inside of a PDF file.
Always consider your site visitors and target audience. Yahoo and Google will not download a PDF to their desktop or email them. But your target audience will. So I recommend using absolute links inside all of your PDF documents.
URL structure and link development
One tip I constantly hear from many search engine optimization (SEO) professionals is to put keywords in the domain name, subdirectory, and page name. For some search engines, keyword-rich URLs have no impact on rankings, depending on the type of query a person is using. Other search engines use it as a component of their algorithms, but the impact is very small. So I don't obsess over this optimization strategy.
What concerns me more is to name my web pages in a manner that my target audience might use. I have already written about this topic extensively. I have included links to these articles at the bottom of this page.
Since Google uses anchor text pointing to a web document to help determine relevancy, many search engine optimizers like to create URLs like the following:
What they are hoping that other web sites will do is link to their company in the following manner.
<p>Company name and keywords
<a href=" http://www.keyword-domain.com/keyword2/keyword3.html"> http://www.keyword-domain.com/keyword2/keyword3.html</a>
Short description of company name using keywords.</p>
For those of you who do not code, I will explain this strategy. The hypertext link in the above example is placed around the keyword-rich URL. Since major keywords are separated by a hyphen (-), forward slash (/), and period (.). SEO professionals believe that the anchor text in the URL will help boost keyword emphasis. Technically? They might be correct in this assessment. However, many SEO provessionals only think about rankings. They do not always consider site usability or how people actually link.
The reality is that when other web site owners link to your URL, they don't place the URL within the hypertext link. They often do not display the URL at all. Rather, they link to the company name, page title, or headline (depending on what text is of value to the web site owner), as follows:
</a>Company name and keywords</strong>
Short description of company name using keywords, if applicable to the web site owner.</p>
In fact, you can sometimes detect spam link farms when you see the overuse of keywords in URLs. What do you think is more important to your target audience: keyword-loaded URLs or content that actually contains important query words?
Using keywords in URLs is a poor substitute for keyword-rich content. In fact, the combination of keyword-rich content and a URL structure that reflects that content tends to work best overall for your target audience. But having one without the other? If I had to choose, I would focus more on having keyword-rich content.
When deciding what type of links you wish to use on your site, always consider your site's visitors first and foremost. A page's actual download time does not affect search engine rankings, but it does affect sales conversions. Using too many absolute links on your web pages can have a negative impact on actual download time.
Some items on a web page might be good for site usability and sales conversions, but they might make no difference as to whether a site ranks or not. Although link structure is important in order for the commercial web search engines to gain easy access to the content on your web pages, using absolute links instead of relative links will not suddenly and miraculously make your site rank well.
This article originally appeared in WebProNews and has been updated by author Shari Thurow since its original publication. If you would like permission to publish this article for your online newsletter, blog, or web site, please fill out our contact form or call us at 847-426-4256.
Shari Thurow is the Founder and SEO Director at Omni Marketing Interactive, a full-service search engine optimization (SEO), web site usability, information architecture (IA), and web design firm. She is also the co-author of the book, When Search Meets Web Usability.
For more information about our search engine optimization, search usability training, and site design services, please fill out our contact form or call us at 847-426-4256.