How to create a membership – All Techniques Simplified – Part 1
Welcome back! Remember to download the Big Yellow Book of Turbo Marketing Secrets at !
A membership site is a site that can be accessed by members only.
Quite simple, eh?
While the definition is simple, you need to understand HOW that works in technical terms.
A membership site is nothing more than a DIRECTORY on your server.
For example, let’s say that your domain name is
http://www.turboaffiliates.com
and that you want to create a membership site there.
You will need to create a directory on your server, like /turbo.
So the URL would be like this
httpd.apache.org
Servers that use Apache allow people to protect directories through the famous “Apache users’ authorization.”
Here is how this works in simple terms:
A directory can be protected by uploading 2 files into it, namely:
.htaccess
.htpasswd
These are simple files. You can just open your text editor and save a file with a name .htaccess or .htpasswd
If you do that, you will notice that there is no title displayed for those text files when you browse them on your computer. This happens because the names you used for saving those files are not actually the names of the files but EXTENSION TYPES instead… In other words, both .htaccess and .htpasswd are NOT just files, but they are EXTENSIONS that characterize those files and are recognized by “Apache’s” systems on the Net.
I’ll try to make it simpler:
When you save a text file on your computer, it takes an extension automatically – this one: .txt
That .txt extension tells your computer that it must deal with it as a “text” file, and thus, open the file through the “default” program you use for text files, normally the NotePad.exe program.
When you save an HTML page on your computer through your favorite html editor, it takes an extension automatically – this one: .html
That .html extension tells your computer that it must deal with it as an “HTML” file, and thus, open the file through the “default” program you use for HTML files, normally, Internet Explorer, FireFox, or whatever your default web browser is.
When you save a document through Microsoft Word on your computer, it takes an extension automatically – this one: .doc
That .doc extension tells your computer that it must deal with it as a file generated by MS Word, and thus, open the file through MS Word.
As you can see, an extension of a file also gives the identity of the product that must be used for OPENING it…
I hope you understand this.
This is why I told you above that .htaccess or .htpasswd are actually EXTENSIONS for the files you created…
And those extensions tell some things to the “Apache server…”
When you upload those 2 files into a directory, just these 2 files tell the following things to the server:
.htaccess: “Apache, do not allow access to anybody else than the ones that provide you with a username and password as those codes can be found in the path I am denoting here…”
And the .htpasswd says the following to the server:
.htpasswd: “Apache, you can check the codes inside me… you can see various lines here, Each line is 1 record. Each record has 2 values. The first value is the username. The second value is the password. As .htaccess said, allow access to those users who provide the username AND password listed here.”
That’s what those files tell to the server.
And of course, Apache obeys.
Here is an example, a simple example, of the content you could find inside a .htaccess file:
AuthUserFile /path/to/.htpasswd
AuthGroupFile /dev/null
AuthName ‘Members Only’
AuthType Basic
require valid-user
That’s it… ONLY those lines above are needed to protect a directory. Here is the explanation for each line:
AuthUserFile /path/to/.htpasswd
That says to Apache where the file .htpasswd is. All folders and all files on your server have a certain path.
It’s like your computer:
When you save a file.html inside the “My Documents” folder, then the path would be:
C:\My Documents\file.html
If you create a sub folder inside the My Documents folder and save the file.html inside, then the path would be
C:\My Documents\folder\file.html
etc .
C: is your hard disk.
My Documents is the “My Documents” folder
folder is the sub-folder you created
file.html is the file you saved inside that sub-folder.
As you can see, the path above uses this separator to separate the values: \
Thus the first word in the first line in the .htaccess file; this one – AuthUserFile -tells Apache where the (Authorization User File =) .htpasswd is. And how could that be expressed in technical terms?
Like what happens on your computer…
Here is an example:
/home/YOURHOSTINGACCOUNT/public_html/directory_here/.htpasswd
As it happens with the paths of the files inside your computer, the paths of the server use the same logic.
As you can also easily check, the separator used on the Net is this one: /
home is the name of the server. Most of the Apache servers use this word for denoting the name of the server. You can double-check it with your host.
YOURHOSTINGACCOUNT is the title of your hosting account. Your hosting account actually is a “sub-folder” inside the server. As said, a server is just another computer that runs a special software that allows it to serve online accounts… Thus, each hosting account is a “sub-directory” inside “home”.
public_html is the directory on your server that holds all of your files. Everything you put in that directory and ONLY what you put inside that directory is displayed online.
I want to explain this further: Suppose your domain name is www.turboaffiliates.com
If you click that link, you will read a page… You will actually read the page that has this address: noreply@usesell.com:ZX0A7XepZSgGA
If you look carefully, you can see that there are 2 fields in 1 line… The first field is the username of the user and the second one is the password. The fields are separated by this symbol – :
For your information, while the email address of the user is exactly as the one displayed there, the password is the ENCRYPTED version of the REAL password used by that member.
So for example, if you were that user with the username noreply@usesell.com and a password like UIKJUI, then that password is ENCRYPTED by Apache and is transformed automatically into something like ZX0A7XepZSgGA. In other words, if that password, ZX0A7XepZSgGA, could be DECRYPTED, it should give us the real password, UIKJUI, which is the one used by the member to access the protected area.
After you have read all of the above, I am sure that you now understand how your codes work with a membership site.
I am sure that you now better understand the following example:
The above address is just the URL of a corresponding path on the server like
/home/public_html/myhostinghere/turbo
The path /home/public_html is actually the domain name:
http://www.turboaffiliates.com
and what we put inside that directory (public_html) is displayed online.
The “turbo” sub-directory is the MEMBERS’ AREA.
So inside that members’ area, 2 files exist… Guess which ones….
.htaccess
.htpasswd
Yep…
.htaccess says to Apache that we have a members’ area here
.htpasswd holds the usernames and passwords of the members
Mmm..
I am sure that many marketers are telling you about membership sites…
Has anybody else talked about membership sites this way?
Can you understand NOW how membership sites work?
Did this “lesson” make the difference?
I hope so.
And be sure to read the next Lesson that explains in more detail how membership sites work…
Till then…
Enjoy!
John Delavera
Copyright(C) 2007
—
You can distribute this article by adding this blog as the resource:
You can also replace the links inside the article with your affiliate links.
p.s. Did you like the article? The Bar is Open at www.buy-me-a-drink.com!
p.p.s. You can also place your comment for this article below.

February 10th, 2007 at 10:09 am
John-
Thanks for the down-to-earth explanation in part 1 membership posting.
I’ve always tried to explain to my clients how this works…and they seem to get it…but now I’ll just refer them to your explanation, which is less “techy”.
Thanks-
Jeff Murad
Computersdontbyte.com
February 10th, 2007 at 10:13 am
John,
I enjoyed your quasi-technical explanation of creating a membership directory. You have an innate ability of knowing just how “techie” to be with your descriptions. Just enough to get the message across, not enough to confuse.
As I am a long-time member, I now only need to read your directions once, as I can now speak your “language”. Being a Turbo Member I recognize the value of everything you provide us. While other “marketers” are busy promoting “string” products, ( products whose sole purpose is to provide just enough information to “string” you into the next product), you are providing the real meat of everything you present. I find that very refreshing, and one of the many reasons I rely on you exclusively for all of my necessary marketing knowledge and tools.
Thank you ever so much,
Jonathan Myers
February 11th, 2007 at 7:51 am
John,
Although I have been working on the net for many years now and I am familiar with many of the items you discussed, I am in the process of setting up my first membership site so I found your article invaluable to my understanding of the process at hand. I only wish you had begun the series 6 months ago so I would have such a clear-cut and simple “non-teckie” explanation of the entire process immediately at hand.
Thank you,
Teresa
February 12th, 2007 at 5:21 am
Hi John,
Your writing style is so refreshing, its almost fun to learn. Of course I hope it will continue to be simple and fun once you delve deeper. Or perhaps you have the talent to make it look easy even when it gets extremely technical. I hope you do. Many readers, me especially, tend to loose focus when expert writers start talking about ‘objects’ and ‘instantiate’.
I had previously thought that usernames and passwords are stored in some weird corners of mysql using php. Now I know better, thanks to you. How about enlightening us about how the usernames and passwords are inserted in .htpasswd when a new visitor registers a new membership to a site.
Much thanks.
Jet
February 13th, 2007 at 12:46 am
Hi John,
WOW! that was certainly the best and easiest to understand explanation of a membership site I have ever seen.
I have wanted to password protect some things on my websites but was afraid to try as I am a “non-teckie”.
Through your simplified explanation, yYou have given me the confidence to try! Again, thanks for all your wonderful teachings. I have certainly learned a lot from you in the few short months I have been a Turbo Member.
Donna
April 15th, 2007 at 9:05 am
Hello
This is great … every word you wrote (ebook, article, newsletter or everything
You write) has great value when it comes with simple rich educational knowledge
That we (international) can understand and benefit.
Thanks John
Awad