Our Blog


Stop A Directory Index From Being Shown

Sometimes, for one reason or another, you will have no index file in your directory. This will, of course, mean that if someone types the directory name into their browser, a full listing of all the files in that directory will be shown. This could be a security risk for your site.

To prevent against this (without creating lots of new ‘index’ files, you can enter a command into your .htaccess file to stop the directory list from being shown:

Options -Indexes

Password Protection

Although there are many uses of the .htaccess file, by far the most popular, and probably most useful, is being able to relaibly password protect directories on websites. Although JavaScript etc. can also be used to do this, only .htaccess has total security (as someone must know the password to get into the directory, there are no ‘back doors’)

The .htaccess File

Adding password protection to a directory using .htaccess takes two stages. The first part is to add the appropriate lines to your .htaccess file in the directory you would like to protect. Everything below this directory will be password protected:

AuthName “Section Name”
AuthType Basic
AuthUserFile /full/path/to/.htpasswd
Require valid-user

There are a few parts of this which you will need to change for your site. You should replace “Section Name” with the name of the part of the site you are protecting e.g. “Members Area”.

The /full/parth/to/.htpasswd should be changed to reflect the full server path to the .htpasswd file (more on this later). If you do not know what the full path to your webspace is, contact your system administrator for details.

The .htpasswd File

Password protecting a directory takes a little more work than any of the other .htaccess functions because you must also create a file to contain the usernames and passwords which are allowed to access the site. These should be placed in a file which (by default) should be called .htpasswd. Like the .htaccess file, this is a file with no name and an 8 letter extension. This can be placed anywhere within you website (as the passwords are encrypted) but it is advisable to store it outside the web root so that it is impossible to access it from the web.

Entering Usernames And Passwords

Once you have created your .htpasswd file (you can do this in a standard text editor) you must enter the usernames and passwords to access the site. They should be entered as follows:

username:password

where the password is the encrypted format of the password. To encrypt the password you will either need to use one of the premade scripts available on the web or write your own.

For multiple users, just add extra lines to your .htpasswd file in the same format as the first. There are even scripts available for free which will manage the .htpasswd file and will allow automatic adding/removing of users etc.

Accessing The Site

When you try to access a site which has been protected by .htaccess your browser will pop up a standard username/password dialog box. If you don’t like this, there are certain scripts available which allow you to embed a username/password box in a website to do the authentication. You can also send the username and password (unencrypted) in the URL as follows:

http://username:password@www.website.com/directory/

Summary

.htaccess is one of the most useful files a webmaster can use. There are a wide variety of different uses for it which can save time and increase security on your website.

Alternative Index Files

You may not always want to use index.htm or index.html as your index file for a directory, for example if you are using PHP files in your site, you may want index.php to be the index file for a directory. You are not limited to ‘index’ files though. Using .htaccess you can set foofoo.blah to be your index file if you want to!

Alternate index files are entered in a list. The server will work from left to right, checking to see if each file exists, if none of them exisit it will display a directory listing (unless, of course, you have turned this off).

DirectoryIndex index.php index.php3 messagebrd.pl index.html index.htm

The Need For Banner Advertising

Banner ads are a great way to advertise your website all over the Internet. It is both cheap and effective and also quite straightforward.

Banner ads are one of the most common and oldest forms of Internet advertising although its usefulness is becoming increasingly overlooked with the increasing popularity of keywords. Nonetheless, there are a great number of options out there for banner advertising and the competition is often still as aggressive as ever.

The concept of banner advertising is indeed pretty simple. Basically, a banner is designed and placed on a webpage other than your own. If the banner attracts the viewer’s attention and s/he wants to find out more, then they will click on the banner which will redirect them to your website. A banner ad is generally based on a picture or company logo with an enticing advertising slogan superimposed upon it.

When a surfer clicks on a banner ad, not only are they redirected to the site concerned, but something called a click-through also occurs and every time the banner receives a click request, the online marketer earns money.

Banner ads are an efficient and cheap form of advertising and they greatly benefit the company concerned because of this. Essentially, they act like billboards in the real world, and although many people may not click on them, they will have learned some basics about your company and what it has to offer and may remember the name and come back to it later. However, unlike a billboard and the vast majority of other forms of advertising, banner ads are extremely cheap.

One of the most effective uses of this advertising method is to place the banner ad in an article such as the type you may submit to free online article directories.

In addition to these attractive reasons to market your company in this way, banner ads are also much more likely to be followed up by potential customers, since it is only a click away for them to your company website.

Google Indexing - How Long Will I Have to Wait

A very common question when people start up a new site is “How long do I have to wait before Google updates its database?” Unfortunately the answer is never an easy one to give and as such we thought we’d try and simplify it here for the benefit of the general public.

One of the first things you have to take into account when it comes to Google’s indexing service is how old your site is. If you have a new website or even an old website with no inbound links, then Google might take some time before it indexes your site. The average waiting period here can be anything from 4 to 8 weeks. For those who have just revamped an existing website that already has a couple of inbound links and had some basic SEO in place, that period could be much shorter.

So if you’re in the first category of old or new websites, there are a couple of things you should be paying attention to, to ensure that the indexing period is shortened as much as possible.

1. Spider Accessibility One of the main things to pay attention to when submitting your website for indexing is whether or not it is accessible by search engine spiders. If not, then you might have to review the code of your website.

To find out if this is you, have a look at the errors you receive in Google’s Webmaster Tools. In addition, it will be wise to include an XML sitemap of your website to ensure that Google’s spider finds all your pages.

2. On-Site SEO Is your website currently optimized? Now if you don’t know what we’re talking about, then it most probably isn’t and you’ll need to enlist the services of an SEO expert right away.

On-site SEO pertains to the optimization of a variety of tags in your website’s code as well as the optimization of content to ensure that web users will be able to find a specific page according to a set of predefined keywords.

3. Link Building This relates to off-site SEO and is probably one of the most important features of SEO. The reason for this is that if other sites link to you because your content is valuable, then Google will assume that you are a source of good information, thereby supplying its users with your website first.

There are a couple of things to be careful of though: too many links too fast could earn you a couple of penalties. As such the road to the top is best taken gradually.

It will also help to ensure that you familiarize yourself with other SEO-related concepts to ensure that your site is perfectly optimized. Getting to the top, especially if the amount of competition for your specific keywords is high, you might want to focus on other techniques to help you in the interim and that will also assist you with your rankings, such as link building.