Friday, August 18, 2006

Avoid Losing Thousands of Dollars From Your Website

Imagine this scenario.

You’ve just released a new product onto the web. You’ve sent out all the marketing material and you’ve signed up as many affiliates as possible and sit back, grab your favorite beverage and wait for the dollars to roll in.

You wait, and you wait.. Nothing.. Not a single sale..

You then think "I'll give it another hour and two and see if anything happens then". You know your affiliates have been promoting your product, you’ve been getting the emails, but no sales have occurred..

You start to think maybe something is wrong with your site. So you decide to click on a link in one of your affiliates email and you get the dreaded "404 - File not Found error".

Then you suddenly realize that the link you gave all your affiliates was wrong. You told them to visit yourdomain.com/specialoffer.html but the real location is yourdomain.com/special-offer.html

So you dash into your site with your FTP tool and quickly rename the page to the new name, and within minutes sales start coming in..

Phew.. But how many lost sales? How many thousands of dollars have you just lost??

It freighting, and it can happen so easily..

Wouldn’t it have be good to have some sort of safe guard in place, that sent you an email when the error first occurred with the very first visitor.

Well, there is such a tool. Im going to show you how to implement it for FREE and very easy to setup.

To make this work we need to modify our sites .htaccess file (this file lives in the root directory of your hosting account).

If you don’t have a .htaccess simply make one using notepad (For more information on this see http://www.websitesecrets101.com/3/creating-a-custom-404-error-page/ )

Then add the following line to bottom of the file.

ErrorDocument 404 /404error.php

Save the file and update your server.

Now we need to make the 404error.php file..

Simply open Notepad on your PC and paste in the following code :

<br />&lt;?php&lt;/p&gt;&lt;p&gt;$email = "you@yourisp.com";&lt;/p&gt;&lt;p&gt;$host='http://'.$_SERVER["HTTP_HOST"];<br /> $url = $host.$_SERVER["REQUEST_URI"];<br />$referrer = trim($_SERVER["HTTP_REFERER"]);&lt;/p&gt;&lt;p&gt;if ($url != 'favico.ico' and $url != 'robots.txt')<br /> {<br /> if ($referrer == '')<br /> $referrer = 'An Unknown source OR<br /> someone who directly keyed in the link<br /> ';<br /> else<br /> $referrer="&lt;a href="$referrer"&gt;$referrer&lt;/a&gt;";<br /> $subject = '404 Error on '.$host;<br /> $message = 'Hi&lt;/p&gt;&lt;p&gt;A visitor from '.$referrer.' tried unsuccessfully to access<br /> '.$url.'<br /> You may want to try and fix this error';&lt;/p&gt;&lt;p&gt;$headers = 'MIME-Version: 1.0'.”rn”;<br /> $headers .= 'Content-type: text/html; charset=iso-8859-1'.”rn”;<br /> $headers .= 'From: 404 Watcher'.”rn”;&lt;/p&gt;&lt;p&gt;mail($email,$subject,$message,$headers);<br /> }<br /> header(”HTTP/1.1 404 Not Found”);<br /> header(’Location: ‘.$host);<br /> ?&gt;&lt;/p&gt;&lt;p&gt;

Make sure that you change the line that starts with $email to have your email address. No one on the web will see that email address. It is the address that you want all the errors sent to.

Save the file and copy 404error.php file up to your web site’s root document.

Now try it out. Try typing in a filename that does not exist like yourdomain.com/garbage.html and see what happens.

The user will get redirected to the home page of the site and an email containing the error message will be sent to you.

Its now up to you to fix any errors that might occur and saves yourself thousands of lost dollars in lost sales..

0 Comments:

Post a Comment

<< Home