Friday, October 18, 2024

Rank and File

Server redirects are not exactly an enthralling subject, until you realise just how POWERFUL and useful these things are. Reasons including; easier site management, professional looking links to use in email, nearly fool-proof affiliate link cloaking and preserving your search engine ranking should convince you that it’s worth five minutes to grasp this very simple technique. There’s nothing to buy: your site’s web server already has this facility.

JL Scott, the Director of iCop, came up with a question about redirects. She had noticed that, with her page redirects to cloak affiliate URLs, her redirect pages come up for a couple of seconds. Whereas, my redirects go straight to the page they’re calling. And, naturally, jl wanted to know what I was doing differently …

First of all, I should explain that jl was using what’s termed as a meta-refresh. You may be familiar with them, where you make an HTML page for the redirect you need and put a tag something like this in the head of the document:

<.META HTTP-EQUIV="refresh" CONTENT="0; url= http://www.i-cop.org/ref.cgi?id=tucats">

(The . period after the angle bracket has been added just so that the code displays above. You wouldn’t need it.)

This method is fine and it works. When someone visits the page you made, they do see it for a moment or two, before the refresh kicks in and takes them off.

Where it falls down is, because these aren’t totally fool-proof for cloaking purposes (people CAN switch off redirects, or stop the page to discover the link in the code) and they’re NOT liked by the search engines.

So, let me tell you about the method I am using, which, you’ll be pleased to hear, works fine for both of those.

My links are formatted simply:

http://www.pamela-heywood.com/i-cop

To the “nak`d eye” that looks like I have a directory on my server, called “i-cop”. You’d probably assume there is an index.html in it, using a redirect similar to the one above.

That I use a mass of similar links, might lead you to believe I have a huge mess of sub-directories on my site and that I will never be able to find anything!

Not so! Because my redirects are done by a mixture of magic and slight of hand, known as “Server Redirects”. There’s no mess and confusion, as none of the pages actually “exist!”

This is a tip I picked up from Michael Campbell, who is advising people to put affiliate links inside of server redirects — that is doing them via the .htaccess file.

You’ll understand why in a moment …

First off, I want to make sure you understand what an .htaccess file is. So I’ll wait here while you scan the:

Comprehensive guide to .htaccess http://javascriptkit.com/howto/htaccess.shtml

You also need to know that this works on Unix servers (that’s most of them), but not on NT.

Once you know what an .htaccess file is, how to upload it, etc., we can make one and configure your redirects in the file. If you’re using Windows, you MUST use a plain text editor like Notepad. Word or any of those other fancy things will NOT do. Mac users will need to ensure they “save as” a Unix text file with BBEdit, to get carriage returns.

The redirects are written in the following format:

Redirect /i-cop http://www.i-cop.org/ref.cgi?id=tucats

That is, each one (on it’s own line) comes in three parts.

Redirect (and then a space)

/i-cop (i.e. forward-slash, the name you call it and then a space)

Followed by …

http://www.i-cop.org/ref.cgi?id=tucats

.. i.e. the URL that you want people to visit (be redirected to).

Thus … if someone requests (clicks on):

http://www.pamela-heywood.com/i-cop

The .htaccess file is read and the server says hey, there isn’t a real page called that, but I do have instructions to send you instead to …

http://www.i-cop.org/ref.cgi?id=tucats

… and off you go. In just a trice. Invisibly.

(Yes, you can click on them to try them out.)

When you are done, you save it as .htaccess (yes that’s a PERIOD and htaccess as in no name and that extension. If your computer won’t let you do that, you can save it and upload it as a .txt file and re-name it via ftp. BEWARE though, it will likely “disappear” from view once you upload or re-name it. Do not be alarmed. This is quite normal. Just try a link to assure yourself that it is really there. 🙂

Now here are the added advantages to using this method:

1. Easy Site Management

It’s just a simple text file. I have mine hovering around open most of the time so it’s easy to add something and re- upload it. The links then work anywhere. It also acts as handy a reference list to keep track of all my affiliations.

If links need to be changed, it’s a simple matter to alter them wholesale from one location. By using these links on web pages, as well as in email, there’s no messing about trying to find the “offending” link through 101 HTML pages!

Yes, you can also use them internally, for pages you moved, renamed or removed or that are just too long to use in email. Just follow the same convention and give the full URL to the new page on your site. One example of that I use is:

http://www.pamela-heywood.com/backissues

You’ll notice that you do go to a page on my site, but it is a bit long winded for email and breaks in half:

http://www.pamela-heywood.com/cgi-bin/journal.cgi?folder= issues&next=outline

2. Preserving Your Search Engine Rank

You lose “points” with some Search Engines by giving away page scores to affiliate (or other outside) links going off your site. Using this method to link to what the engines will basically see as “internal pages” (despite them being non-existent), helps preserve your rank.

3. Keeping Hold of Your Commissions

This also acts as fool-proof link and commission theft cloaking. Specially useful where these are Clickbank links that can be altered, not just from email, but also the ones online. Anyone can hover over a link, read the destination, copy and adapt it. Not with this method, they can’t!

Forget JavaScript cloaking methods. Those require that users have JavaScript turned on and, in any case, don’t hide links in other browsers, such as Opera. This works on the server, so it doesn’t matter what setup your visitor has.

Oh sure, the real URL will still show up in the browser afterwards, but they’d had to click to get there and so are already tagged with your affiliate tracking cookie.

(You could add another layer to this, by configuring the affiliate links in a link tracking program, then listing the tracking URLS in the .htaccess file.)

Disadvantages? None that I know of.

My .htaccess file also includes a LOT of other information and uses, as well as a LONG list of links, so that the file now weighs in at around 19 K. It’s still very fast.

There is however one WARNING:

You may already have an .htaccess file that is doing something that your site needs it to do; if you have custom error pages already set up, if you have a login area for members, a forum with passwords, etc.

You may not know this, because it frequently does not show up in the list of files you’ll see in your ftp program.

Uploading a new .htaccess file for the first time should therefore be viewed with extreme CAUTION.

If you do already have one, then no problem, you can just keep adding stuff to the one you’ve got.

If you’ve used a web designer, or had a programmer add something to your site, those would be the people to ask before proceeding. If you’ve done it all yourself or are starting a brand new site you SHOULDN’T run into trouble.

(SmartFTP – FTP Client Easier site management. Want to see your .htaccess and other “hidden” files in the server? You’ll be able to with SmartFTP, meaning more control, less room for error. http://www.smartftp.com )

Click here to sign up for FREE B2B newsletters from Murdok!

Copyright 2003 Pamela Heywood
Get All Good Things for Your Personal and Business Success
My short, weekly, newsletter brings you help & resources you can use today … Subscribe mailto:allgoodthings@sendfree.com
Or visit: http://www.pamela-heywood.com

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles