Most webmasters have a certain schedule that they follow when it comes to recurring tasks like moderating blog comments, writing new content or managing the SEO side of the website. Broken links should be part of this regular schedule, they are however often overlooked by webmasters.
A broken link in this context means a link to a page that does not exist (anymore) on the website. The website usually responds with a 404 error page in this case.
Every link is a vote for that website and every webmaster should make sure that all the links pointing to the website are put to good use. Bad links can hurt a website’s rankings and reputation.
This article is a basic how to that will explain the following concepts:
How to display all broken links that point to a website
The answer in this case is Google Webmaster Tools. Webmasters need a Google account and a verified site to see the broken links that point to their domains and websites. The data is populated over time and it is a good idea to visit the section regularly to react whenever new broken links pop up.
Do the following after you have logged into Google Webmaster Tools. Access the registered domain, click on Diagnostics in the left sidebar and then on Crawl Errors. Crawl errors displays all kind of errors and restrictions, the data that is important when it comes to broken links is under the Not Found tab. If you see no crawl errors there congratulations, everyone else might want to read on.
The not found links are links on the domain the webmaster selected in Google Webmaster Tools. Each row displays the link url that websites link to, the detail (error code), number of pages that use that link and the date it was last checked by Google.
Redirect broken links with htaccess.
Please note that this article is not about explaining what htacess does. Before you start you should ensure that your web server supports htaccess. If you are unsure ask your web hoster or server administrator.
The .htaccess is usually located in the root directory of the website. It is possible that other htaccess files exist in subdirectories. It is basically a text file with directives for the web server.
The basic command to redirect link is
Redirect permanent localurl newurl
or
Redirect 301 localurl newurl
All that needs to be done is to basically add the urls from the not found section of Google Webmaster tools in the localurl section and the newurl that the link should now point to in the newurl section.
Please note that the localurl begins with a / and not with http://www.yourdomain.com/. A valid redirection of a link pointing to http://www.yourdomain.com/brokenpage.html would look like the following:
Redirect 301 /brokenpage.html http://www.yourdomain.com/validpage.html
This tells the search engines that the location of brokenpage.html has been permanently changed to validpage.html. The 301 redirect ensures that the linking power is attributed to validpage.html now.
We need to address a special case, pages with blank spaces. The localurl needs to be enclosed in “” if it contains a space. A broken link to http://www.example.com/broken directory/ needs to be redirected this way:
Redirect 301 "/broken directory/" http://www.yourdomain.com/validdirectory/
There is another question that needs to be answered: How do you decided where to link to? The best practice is to link to the right page on the website if the link has been misspelled. This should also be done if it is possible to guess where the link should be leading to. But there are cases where a link points to a no longer existing page.
You can either redirect to the homepage of the site, a special “broken link” page that explains why the visitor landed on that page or the closest alternative.
How do you handle broken links on your domains and websites?
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
RSS feed for comments on this post · TrackBack URI
Leave a reply