Search Engine Optimization All-in-One For Dummies, 4th Edition
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:

Anchor Text

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

 Anchor Text
 Anchor Text

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 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 has been a search engine optimization consultant since before there was Google. Today, Bruce Clay, Inc., is a leading search marketing company providing SEO services and consulting, pay-per-click advertising management, content development, and social media marketing services. Learn more at 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 and DIY Software company

This article can be found in the category: