Broken Links
What are broken links?
Broken links are links that fail to direct a searcher to a requested site often resulting in an error message. Links can break for various reasons, but predominantly broken links occur when:
- You rename a page and forget to change all your internal links
- Another site links to an old page of yours because it is not known that your page has been moved or removed
- A search engine ranks a deleted page that is still in the index
- Someone has bookmarked a deleted or moved page and they return to it
- Someone links to your page but types an incorrect link in the URL
Broken links on your site and how to fix them
When broken links occur within your own site, they are easy to prevent and correct. It's when they are external, or from other sites or bookmarks, that your options for fixing them becomes limited.
While you can't prevent people from linking to you incorrectly, it's your responsibility to keep a visitor once they arrive on your site -- despite a broken link.
We've all been there before -- looking for something on the web only to click on a promising link that delivers an error message instead of the desired page. Sadly, a broken or invalid link on your website is the surest way to lose return visitors and potential customers. The following offers three ways to stop losing visitors due to broken links.
- 1) Create a custom 404-error page. This is a catch-all solution that every site should employ. If you don't have a custom 404-error page then you need to create one ASAP.
- To create a custom 404-error page is easy. Simply pick any page on your site, gut the contents and replace it with your simple message and links. Save the file in your root director and name it something easy like 404-redirect.htm. Now you can prevent visitors from getting error messages in favor of a customized page that keeps them engaged. A good 404-error page will look and feel just like any other page on your site. The only difference is it tells the visitor a page is gone, missing or moved.
- 2)Edit your .htaccess file with this line of code: ErrorDocument 404 /404-redirect.html.
- Be sure to use all absolute links on this page, including image paths. This ensures if someone hits a broken link in a sub-directory -- www.site.com/directory/directory.html -- you won't have broken links on the page that supposedly corrects your original broken link problem.
- Be sure to create a custom page for each broken link. Do not rely on the above code to redirect people to your home page. This can be confusing and frustrating if someone who tries to link to a different page on your site.
- 3) Implement 301 Redirects. If you are moving or renaming pages on your website you'll want to implement 301 redirects. A redirect is the single best way to prevent visitors from trying to visit moved pages at an old location. By implementing the redirect, visitors and search engines are automatically transferred from the old page to its new location. The transition is seamless and the visitor will never know the link is broken.
- There are a number of ways to implement redirects, but the best way is via the 301 .htaccess file. Simply add the following code to the .htaccess file, save, upload, and you should see the redirect swing into action. Redirect permanent /page.htm http://www.site.com/page.htm.
