Use htaccess 301 Redirects to Fix Broken Links

As time goes on, links tend to get outdated. Maybe a post gets deleted, or a URL changes, or maybe someone trying to link to you just made a typo. Any of these things can result in an otherwise good backlink pointing to a 404 page.

The good news is that these backlinks are easily recovered with a 301 redirect. The only big problem is finding and identifying where such broken links are pointing to. This can be solved with Google Webmaster tools, or just about any analytics program that shows you requests that result in a 404.

If you’ve got your site registered in Google Webmaster Tools, you’ll want to go to Diagnostics -> Web crawl to see which URLs the search engine is having
a hard time finding or accessing.

Google Webmaster Tools

Here you’ll see a list of URLs that: aren’t found, aren’t redirecting properly, and URLs blocked out by robots.txt.

Obviously, some of these will be intentional if there are URLs you don’t want to be indexed. There may also be some errors that pop up because of intermittent connection problems with your hosting server.

OK. Now you’ve got a list of URLs that aren’t being found. Take this list and add it to any that you can gather up from your analytics accounts.

Now you’re going to want to go in to the root folder of your domain and edit the .htaccess file. (And if your host doesn’t allow .htaccess files you need to find a new hosting provider)

The actual htaccess modification is pretty simple, here’s an example of the line you’ll want to add near the bottom of the file:

redirect 301 /broken-URL/ http://yourdomain.com/working-URL/

Repeat that, adding one line for each address you need to fix. If there’s a close fix, just redirect to the most similar link. If there’s nothing like it on the domain anymore, just link to your home page to pass the extra link juice around.

This is just one of many things you can do to optimize your site in terms of SEO “on-page.” Make sure you’re always getting the most out of your backlinks by making sure they all lead to valid pages.

1 Comment

  1. Repeat that, adding one line for each address you need to fix. If there’s a close fix, just redirect to the most similar link. If there’s nothing like it on the domain anymore, just link to your home page to pass the extra link juice around.

Leave a Reply to ombir Cancel reply

Your email address will not be published.


*