404 & Hotlink Traffic


I really can't overstress the importance of having a .htaccess file which controls your 404 traffic on your gallery domains. To not have this is throwing away money. If you are struggling to pay hosting bills, or looking for some extra cash every month, then it's time to start using your traffic to it's maximum potential.

404 traffic arises from surfers who (for some reason or another) attempt to access a nonexistent document at your domain. By placing a small file named ".htaccess" on your webserver, you can specify where to route nonexistent document or unauthorized access requests. You will need FTP and telnet/ssh access with your host to do this.

Getting Started:
To get started, you will first have to decide where to send your traffic. I have found that a convenient route is to deal with an Exit/404 traffic broker such as Exitdollar (Signup Link). They will provide you with a URL to send your traffic, and for every thousand unique requests you route to that URL, you get paid $3. A simple, hands off approach that seems to appeals to most webmasters. Other methods coudl be to construct a full page advertisement, or redirect traffic to a domain of your own to punch up it's traffic.

Now that you have chosen a destination for your traffic, open up your favorite text editor, and enter (As an example for choosing Exitdollar):

Options +FollowSymlinks

ErrorDocument 404
ErrorDocument 403
ErrorDocument 500

Where XXX is your unique Exitdollar ID. Save this file as ".htaccess" (without the quotes). You now need to upload this file to your webhost, placing the file at the top of the directory tree where you want the traffic directed. An .htaccess file placed in the webroot will cover all requests to the server. However, if it is placed in a sub directory, then all requests to that subdirectory and below will be covered (anything above will not (i.e. webroot)).

To begin, I would reccomend placing the file in the webroot of your server (After all you don't want to miss out on some traffic). Make sure the file is world-readable by issuing a "chmod o+r .htaccess" from your telnet/ssh command line. As a reference, a HTTP 404 error is "Not Found", 403 is "Forbidden", and 500 is "Internal Server Error".

Testing it out:
Now, try requesting a file in your webbrowser that doesn't exist on your webserver. If you get redirected to your chosen destination, then you are correctly set up.

Part II - Hotlinking:
Image hotlinkers not only cost you bandwidth, but they can also affect your traffic enough to change your stats significantly, something everyone should be concerned with.

Although many anti-hotlinking scripts are available, you can also use .htaccess as a simple free solution. If you open up your text editor again, we can add to the original file to produce:

Options +FollowSymlinks

ErrorDocument 404
ErrorDocument 403
ErrorDocument 500

RewriteEngine on RewriteCond %{HTTP_REFERER} !^http(s)?://([a-z0-9-]+.)**)? [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ [L,R]

This will route all requests for your images to the "consolehell.html" page, except those that have come from * To test this setup, you can simply go to and enter the URL to one of your images. It should come up as a broken image on the SECOND page.

Depending on the amount of galleries submitted per domain, you can generate quite a bit of traffic to your chosen destination URL simply by making the changes suggested above. As well, you can be mildly protected against hotlinkers. I have always found that 404 / hotlink traffic alone was enough to generate income to pay for my bandwidth each month, and that is nothing to shake a stick at. Good luck!