How To Cloak Links For Free
These last few days I came across a problem: I have an eBook that I wish to give to selected people but which I wish to hide in a secret location on my website so they have no idea where it is stored. In this secret location I also have several other eBooks for other customers to download but I want the download directory’s physical location to be hidden so that even when someone downloads an eBook they have no idea where it is stored so cannot browse, or steal, any of the other eBooks stored there.
If I was going to sell my eBook I could use one of the several Digital Download software packages (such as SmartDD Lite which I give free to my newsletter subscribers, or MyDigitalDispatch) to interact with PayPal and manage downloads but what if I wanted to give my eBook away free and was looking for a much simpler, no cost, D.I.Y solution?
I find it easier to explain through example so lets take the eBook “Opening an_AWeber Account Made Simple” and go through the steps of creating a cloaked link for it. I have put a copy of this eBook HERE. What I want to do is hide it in a secret location in my webspace and then create a cloaked link to it. While we are doing this I also want to add a counter to the link so I can see how many times the eBook is downloaded.
The first problem is that if someone clicks on my bare Make Money Online link then the eBook will open up in their web browser. This is good as it will enable them to read it, but bad because their web browser will show them the location of the eBook.
The first task is therefore to pack the eBook into a ZIP file so that it will not be automatically opened in a web browser but downloaded instead. There are several ZIP programs but I prefer to use WinZip. You can download a free trial version from HERE.
Once you have zipped your eBook try typing it’s location into your web browser and the web browser should, this time, ask you if you want to download the file rather than opening it (click HERE to see what I mean).
The next task is to hide your zipped eBook file in a secret location in your webspace. For this example I have created a subdirectory called Secret_Location and moved my eBook into there. The secret location of my eBook is therefore now: http://www.blog.ebook-download-shop.co.uk/Secret_Location/Opening_an_AWeber_Account_Made_Simple.zip.
But I now have a problem in that there are several other files stored in this location and I want to to stop people I am giving this link to from stealing these other eBooks. The first thing to do is to create a simple “index.html” file. If I gave someone the above link and they knew a bit about websites they would know that to list all the other files in my secret location all they would need to do is type in the directory name and miss off the file name and their web browser would show them a list of all the files stored there. One way to get around this is to use your Text Editor (such as Windows Notepad) to create a simple file containing the following:
<html>
<head>
<title>Error</title>
</head>
<body>
<p style=”text-align: center;”>You are not authorised to view this directory</p>
</body>
</html>
Save this files as “index.html” in your secret directory. Now if a hacker types your secret directory’s location into their web browser they will simply see a warning message rather than a list of your eBooks.
To recap: so far we have converted our eBook into a ZIP file, created a secret directory in our webspace, uploaded the zip file into this directory, created a hacker warning file and also up loaded this into our secret directory.
Now that we have done the basics the fun starts as we firstly want to create a cloaked link to this eBook to hide it’s location and then add a download counter.
Our aim is to be able to give people a link such as:
www.blog.ebook-download-shop.co.uk/Recommends/Opening_an_AWeber_Account_Made_Simple
The first thing we need to do is to create a directory called “Recommends” and then within that directory to create another directory called “Opening_an_AWeber_Account_Made_Simple”.
Once we have created these directories then we can use a Text Editor (such as Windows Notepad) to create the following file and save it as “index.html” within our new Opening_an_AWeber_Account_Made_Simple directory:
<html>
<head>
<title>Opening an AWeber Account Made Simple</title>
<meta http-equiv=”refresh” content=”2;URL= http://www.blog.ebook-download-shop.co.uk/Secret_Location/Opening_an_AWeber_Account_Made_Simple.zip“>
</head>
<body>
<p style=”text-align: center;”>Please wait for a few seconds while download starts…</p>
</body>
</html>
Now you can tell people the link to your eBook is:
www.blog.ebook-download-shop.co.uk/Recommends/Opening_an_AWeber_Account_Made_Simple
And they will have no idea at all that your eBook is actually stored in:
www.blog.ebook-download-shop.co.uk/Secret_Location/Opening_an_AWeber_Account_Made_Simple.zip
We have therefore created our first cloaked link. If your webspace is PHP enabled then you can make this cloaked link more useful by adding a download counter to keep track of how many times your eBook has been downloaded.
If your webspace is PHP enabled then we can delete the index.html file we created earlier within our MakeMoneyOnlineForNewbies directory and, instead, upload the following three files:
A file named “index.php” containg the following:
<?php
$hits = file_get_contents(”counter.txt”);
$hits = $hits + 1;
$handle = fopen(”counter.txt”, “w”);
fwrite($handle, $hits);
fclose($handle);
Header(”Location:http://www.blog.ebook-download-shop.co.uk/Secret_Location/Opening_an_AWeber_Account_Made_Simple.zip”);
?>
A file named “counter.txt” containing just the single character zero.
0
and a file named “downloads.php” containing the following:
<?php
$hits = file_get_contents(”counter.txt”);
echo “My eBook has been downloaded “.$hits.” times”;
?>
The download link that we give to customers to download their eBook still remains:
www.blog.ebook-download-shop.co.uk/Recommends/Opening_an_AWeber_Account_Made_Simple
But now we can see how many times our eBook has been downloaded by simply running the “downloads.php” file in our web browser:
www.blog.ebook-download-shop.co.uk/Recommends/Opening_an_AWeber_Account_Made_Simple/downloads.php
I hope you found this Blog post useful. If you are one of my newsletter subscribers you can download the files mentioned in this tutorial from the subscribers area of our website.












