Search Engine Optimization All-in-One For Dummies
Book image
Explore Book Buy On Amazon

How you code is an important part of SEO. In a web page’s HTML code, you have two ways to include a link: relative links and absolute links. An absolute link is a link that contains the whole URL of the file you’re linking to. When it appears in code, it looks the same as when it appears in the browser’s address bar:

<a href="http://www.classiccars.com/fords/mustangs/tireoptions.html">Anchor Text</a>

That’s the whole file directory in the link itself. A relative link looks like only part of a full-path URL:

<a href="tireoptions.html"> Anchor Text</a>
<a href="../tireoptions.html"> Anchor Text</a>

When designing your website, it’s not a good idea to use relative links, especially if you’re building your site from the ground up, so you won’t have the added headache of verifying page and media final placement. When you use a relative link, it works only in relation to the next directory up.

For example, a link from mustangs/paintoptions.html to tireoptions.html> takes you to the intended page only if your site has a mustangs/tireoptions.html for it to link to.

If the pages that were linking out were to get moved somewhere else, the relative link would no longer work because where it linked to would no longer be valid. So if the page was moved from the /mustangs directory to the /mustangconvertible directory, the relative link of tireoptions,html> would break because there is no tireoptions.html page in the /mustangconvertible directory.

An absolute link is easier to maintain in situations like this because it’s very clear what you’re linking to. With absolute links, the links still work, even if the pages move.

Use the fully qualified URL (that is, the link target that begins http://domain.com) every time you create a link. Not only is it easier for the engines to understand, but there are also fewer mistakes in the coding of the website, and any mistakes can easily be caught and corrected.

About This Article

This article is from the book:

About the book authors:

Bruce Clay is considered by many to be the father of search engine optimization, or SEO. He has over 25 years’ experience coaching companies to improve their online presence and search results and increase their audience.

Kristopher B. Jones is the founder and former CEO of digital marketing agency and affiliate network Pepperjam, which he sold to eBay in 2009. He most recently founded three-time SEO agency of the year finalist LSEO.com and DIY Software company DoItYourselfSEO.com.

Bruce Clay is considered by many to be the father of search engine optimization, or SEO. He has over 25 years’ experience coaching companies to improve their online presence and search results and increase their audience.

Kristopher B. Jones is the founder and former CEO of digital marketing agency and affiliate network Pepperjam, which he sold to eBay in 2009. He most recently founded three-time SEO agency of the year finalist LSEO.com and DIY Software company DoItYourselfSEO.com.

This article can be found in the category: