• Home
  • About
  • Contact
  • Disclaimer
  • Sitemap

Too Many Secrets

Feed on
Posts
Comments
« canadiancoins.com is a slam dunk
Mini site development - Part 1 »

Redirect lost traffic with one line of code

Jun 27th, 2008 by Richard

My stats program gives me a list of 404 errors so I can easily see what pages are giving an error and I just add one line to my .htaccess to redirect the visitors to the correct page.

The other day, I noticed in my 404 stats that there was a lot of traffic from a domain forum going to a page that did not exist on my site. The visitors were presented with my custom error page letting them know about the error and then suggesting that they view the Sitemap.

I noticed that many visitors were just leaving my site after they viewed the custom error page.

Here is what I did to fix the problem and improve the visitor experience.

The solution

I noticed in my server logs that the page /**********com-sale-was-a-bargain was being accessed but since the page did not exist my server would give a 404 error page.

The real page that the visitors were looking for is called /domaintalkcom-sale-was-a-bargain

So what I did was open my .htaccess file on the site and added the following line (put this all on one line):

Redirect 301 /**********com-sale-was-a-bargain http://toomanysecrets.com/domaintalkcom-sale-was-a-bargain

What this does is tell the web server that when someone accesses the old page, redirect the visitor to the correct page. To the user, the redirect is seamless and they get what they were looking for without getting any error pages.

Click here to test my redirect. Try it and you will see that it redirects you to the new page with no more errors.

Enjoy!

Related Posts
  • How to redirect based on referer
    Have you ever wanted to redirect visitors to a special promo page based on ...
  • Fix your wordpress permalink structure
    Ever wonder why you get very little organic search traffic from google or y...
  • Block bad bots from your site
    Have you ever wondered how that email address listed on your web site gets ...

Posted in Web Hosting Tips

2 Responses to “Redirect lost traffic with one line of code”

  1. on 30 Jun 2008 at 12:53 pm1Elliot Silver

    How does a person using a mac create and modify a .htaccess file? Macs do not allow any document to be created or modified if it begins with a “.”

    :-)

  2. on 30 Jun 2008 at 1:36 pm2Richard

    Elliot,

    Just make a file called htaccess or any other name you wish on your Mac, then modify it and upload it to your web space. Once you have it in your web space root, rename it to .htaccess.

    Also note that you need to have the mod_rewrite apache module installed for the Redirect to work - most hosting companies install the module as part of the basic account setup.

    - Richard

  • Latest Posts

    • Rank using an anchor text keyword matrix
    • Domainers can learn from Beijing Olympics
    • How to fix Bido
    • Tax time for domainers?
    • Block bad bots from your site
  • Categories

    • Domaining (5)
    • Funny Stories (1)
    • Reviews (2)
    • Web Hosting Tips (9)
    • Web Site Development (5)
  • Popular Posts

    • How to redirect based on referer
    • Fix your wordpress permalink structure
    • Avoid wordpress duplicate content
    • Block bad bots from your site
    • Domainers have a bad reputation

Too Many Secrets © 2009 All Rights Reserved.