WebMaster Design Mistakes

Huge Mistake #1: Creating a Website with Flash — Did you know in a recent study, top internet marketers discovered that having a website created with Flash, actually decreased the response from prospects and customers by as much as 370 percent?

Here’s why: Your prospects and customers are most likely visiting your website using all types of different computers, connection speeds and internet configuration settings…

What may look great to one visitor may not even appear for another! You could very easily have shelled out hundreds or even thousands of dollars to have a website created using the Flash technology, only to find out that some of your visitors will never see it! (Not to mention the loading times can cause your visitor to close your site, never to return again.)

Huge Mistake #2: The “Internet Catalog” Approach — You see this everywhere. Good, honest and hardworking businessmen and women get online to sell their products or services, and have a site created for them that contains a link to just about everything they offer on one page. Their thinking goes along the lines of, “…well, I don’t want to leave anyone out. If they come to my site, I want to make sure I have what they’re looking for…” — This way of thinking could not be further from the truth.

Here’s why: There’s an ancient rule that goes back to the very beginning of direct-marketing on the internet, taught by the richest, most legendary and well-respected internet marketers of all time…

“When you give your prospects too many choices, they become confused and aren’t sure what to do next. Confused people never buy anything.”

Huge Mistake #3: Optimizing Your Sales Site for the Search Engines — You’ll see this taught in nearly every “internet marketing” course, manual or eBook out there… “You must optimize every page of your website for the search engines!” — In fact, this false teaching is accepted as ‘gospel truth’ so often that most web designers will offer to do this for you at no, or little extra cost…

What they don’t understand is that certain words and phrases must be either re-worded (to make it “keyword rich”) or taken out completely, just to be looked upon highly by the mighty search engines — and this could kill your sales, literally overnight.

Here’s why: When you or a hired web designer optimize your sales page (i.e. any web page designed to sell your products and services) to get a higher listing in the search engines, you’re going to have to sacrifice the pulling-power of your sales copy (i.e. written sales material) just to get those higher listings. Sure, this can bring you more traffic — but what good is all the traffic in the world, if your visitors arrive at your website and aren’t compelled enough to read why they should order your product?

For years, it has been taught that you should always try to find a “balance” of SEO (Search-Engine-Optimization) mixed with promotional copy designed to sell your products and services…

Wrong Again! — The truth is that you should never optimize your sales page for the Search Engines. Instead, you should create tiny “entry pages” for each keyword related to your product or service, (highly optimized for the Search Engines) and have them link to your main sales site! (We can show you exactly how to do this quickly and easily and get *massive* targeted traffic from the Search Engines - without ever *touching* your sales site!)

Huge Mistake #4: Having a “Graphics-Based” Website — Sure, graphics can certainly help us to visualize a particular situation or circumstance, product or service… But did you know that having a graphically-driven website can actually distract your visitor away from your sales message?

After all, your sales message (or “web copy”) is The #-1 most important factor in a website that makes money. If your visitors are paying more attention to your “professional graphics” than your sales message… you’ve just lost another sale.

Here’s why: You’ve got approximately seven seconds from the time your visitor arrives at your site, to the time they decide whether to buy your product, get more information or leave. If you’ve got a graphically-intensive website, your website will most likely still be loading past your seven-second time limit.

That’s a “customer-killer” in and of itself - however, the real reason lies within the fact that the bigger, brighter and more beautiful your graphics are, the more they will distract your visitor from your sales message. And if your visitor is distracted even for one second, it could mean the difference between getting a sale, and losing a customer.

Huge Mistake #5: Designing a Website with Zero Marketing Experience — Most web designers have no idea how to make money on the internet, with anything other than their design services. It’s not their fault - they simply have no or very little marketing and sales experience. After all, they’re just website designers…

However, having your website designed by someone with Zero internet marketing experience is like buying a street-car without an engine… it won’t go anywhere, and it’ll just waste your time and money!

For help on website design please visit www.onlinewebconsultants.com.

Best Website Design Practices

1. Web designers are marketers per se. Web sites are all about advertising products, ideas and services. Thus, a web designer has to understand the mindset of marketers in order to create a design that sell.

2. Read, read and read. We do not experience everything. Thus, our tendency is to learn from others. Reading web design books, newsletters and tips are pretty valuable since they can save you time and effort. Basically, books are more conclusive than newsletters and tips however, they are for free and mostly updated.

3. Narrow down your target market. You cannot please everybody same thing that you cannot be good at everything. Thus, this fact calls for the narrowing of your target market. Even in the interface of the so-called web design, a designer cannot claim that he is an expert at anything or everything about the needs of a website. It is better to pick a certain audience and try to be good at catching their attention, preference and choice. This practice allows you to be best at a given area thus developing expertise.

4. Answer your target audience’s needs. In order to answer the visitor’s needs, web designers must know what kind of visitors his site is welcoming. Do they belong to the younger generation or otherwise? What do they want from your site? Are these information, details and pleasures in your site in order to get their undivided attention and loyalty? Bear in mind that colors, font size, style of graphics, contents and the entirety of the site affects viewer’s decision and choice.

5. Know the basics of SEO and copywriting. Though Search Engine Optimization and copywriting are not directly related to designing, still, designers must have basic knowledge about them. This is because web designing is intertwined with marketing, use of keywords and visibility.

Aside from that, designers must also have knowledge of the programming basics. If not, the tendency is waste time or to create a mediocre or unsatisfactory design to the detriment of the sites.

6. The primacy of functionality. If ever you are faced to make a decision between a web site’s aesthetic form and its functionality, you have to be firm in upholding the latter. Not everything that is pretty is ‘saleable’. Besides, you don’t create web sites for the sake of making it nice-looking.

Above anything else, the site must be functional so as to cater to every visitor’s wants and needs. Appearance is a means to catch visitor’s attention nevertheless, it is not the end. If a designer prioritizes appearance alone without considering its primary consideration the web site’s marketability will suffer.

7. Know when to break the rules. Rules are only guidelines, if you feel that the rules are inappropriate for a certain creation follow your heart’s desire and venture on an experimental adventure.

Domain Name Perfection

What is a domain name? A domain name is the location of your website on the Internet. Your domain name will be what you become known by online so it’s important to get it right.
Each website on the Internet is labelled with something called an IP address which is the actual address of the website online. A typical IP address looks like this: 159.134.27.64. Remembering a string of numbers like that is difficult so a domain name translates all those numbers into something like www.amazon.com. This is far easier to remember.
#1 Dot what?
Each domain has what’s called an extension. The most well known of these extensions is .com. This, however, is not the only type of domain extension available. There is also:
.net
If you can’t find your preferred .com domain name you could always choose the same domain with a .net extension. It might not have the same ring as a .com but is still as just useful as a .com.
.org
These domain extensions were orginally designed for educational and more formal websites. Anybody can register a .org however so you have more options for domain selection.
.info
A more recent introduction to the domain name game are .info domains. Many of the valuable .info domains were bought up overnight but there’s still a huge range of good .info domains available. With a little creativity you could really make a .info work for you e.g. www.moviereview.info.
Bear in mind that most web surfers tend to remember .com more easily than anything else.
#2 Branding vs Business Name
There is an age old debate on the whether or not you should establish a brand name online or use a domain that more actually reflects your real business. Let’s look at Amazon as an example. Amazon sells books online. Most people setting up a business would have chosen say www.booksonline.com instead of www.amazon.com. Amazon has since established itself as a brand name of global recognition - proving the value of building a brand name.
You’ll need to choose between the two. Brand name or your own business name. Consider how your domain sounds, how it might look on a business card and how well it relates to your business.
There’s no one right answer to this question. You need to choose what makes most sense for you, your website and your business in general.
#3 Hyphenated or not
This is another area of debate. Should your domain be one single word or should the words be separated by hyphens? There are advantages and disadvantages to both approaches. Single word domain names can be easier to explain, use on header paper and lend themselves to brand names very well.
Single word domains are in very, very short supply.
Hyphenated domains names can be slighltly more difficult to explain, may not look as well on headed paper and possibly harder to establish as a brand name. There’s no shortage of multiple word domains.
The single biggest advantage a hyphenated domain has is that searche engines can “read” the domain more easily. For example in a domain like www.foreignholidaysonline.com the search engine can only read the first word “foreign” and that’s it. It can’t tell anything else about the website domain name.
If you hyphenated that to www.foreign-holidays-online.com the search engine can read “foreign”, “holidays” and “online” as separate words and therefore knows that this website is about foreign holidays.
A well chosen hyphenated domain name can be just as effective as a single word domain name.
#4 Your Domain Registrar
These are the people you pay to register the domain for you. There are dozens if not hundreds of these companies out there so which one do you choose? This takes some research but things worth checking are:

Do you retain sole ownership of the domain or do the registrar keep some level of control over it?
Search Google for any horror stories relating to the registrar
Does the registrar allow you to transfer the domain to another registrar?
Is there an online control panel for domain administration?
How easy is it to change the domain Name Servers?

Shop around for domain registrars. What you really want to find is a previously satisfied customer to ask questions before you buy.
#5 Cheap Domain Names
You can save a lot of money on the domain names you purchase. A typical .com domain costs about $15 to register from most registrars. However you can get the same domain for as little as $7.95 from other, very reliable, companies.
Oddly enough some of the cheaper domain registrars are more reliable, have fewer horror stories and offer equally good customer service as their more expensive competitors.
Are there any disadvantages in using a discount domain registrar? Will it affect your website in any way? The answer to both is a definite No.
If you’d like more information on choosing and setting up your domain name then visit http://www.affiliate-advocate.com for our Domain Guide.

Meta-Description

The history of the meta tag started off as a nice tool that web sites could use to show the search engines what the site was about without the words showing up on the actual page. It seemed like a great idea until people started to abuse the meta tag. They would add highly searched for keywords that were unrelated to their site in their meta tags in hopes of attracting additional traffic. The search engines caught on and lowered the importance of meta tags - they figured out that if they put more emphasis on the visible content of a site, people would have a much more difficult time “cheating”. Turns out that they were right.

Now, don’t get me wrong, meta tags still do carry some significance. They need to be consistent with the content of your site, but most importantly they’re somewhat of a measure of the legitimacy of your site. The most common myth when it comes to search engine optimization is that the best meta tag is the one packed with the most information. This couldn’t’t be further from the truth.

The keyword meta tag has been abused more than any other meta tag and does not carry as much importance as most of the others because of this reason. Most search engines only read the first few characters of the tag, if they read it at all, because they know that most keyword meta tags are filled with spam - Just the same words repeated over and over. That is why it’s important to get your most important keywords to the front of your keyword meta tag.

The meta tag that still carries the most importance is the description meta tag. This is because it serves as a description for the particular page of your site that it is included in. Description meta tags should be unique to each page of your site, as search engines frequently use it as the description under your page title that appears in the search results. Obviously, you want your description to be representative of the page being displayed.

So in conclusion, don’t use meta tags the way we all have a compulsive urge to - by packing it with everything that we can think of. It seems like a good idea, but it will only help you to fail in your goal of the holy grail: higher rankings.

Alt.Txt

Anyone who knows anything about web accessibility knows that images need alternative, or ALT, text assigned to them. This is because screen readers can’t understand images, but rather read aloud the alternative text assigned to them. In Internet Explorer we can see this ALT text, simply by mousing over the image and looking at the yellow tooltip that appears. Other browsers (correctly) don’t do this. The HTML for inserting ALT text is:

But surely there can’t be a skill to writing ALT text for images? You just pop a description in there and you’re good to go, right? Well, kind of. Sure, it’s not rocket science, but there are a few guidelines you need to follow…

Spacer images and missing ALT text

Spacer images should always be assigned null ALT text, or alt=”" . This way most screen readers will completely ignore the image and won’t even announce its presence. Spacer images are invisible images that pretty most websites use. The purpose of them is, as the name suggests, to create space on the page. Sometimes it’s not possible to create the visual display you need, so you can stick an image in (specifying its height and width) and volià, you have the extra space you need.

Not everyone uses this null ALT text for spacer images. Some websites stick in alt=”spacer image”. Imagine how annoying this can be for a screen reader user, especially when you have ten of them in a row. A screen reader would say, “Image, spacer image” ten times in a row (screen readers usually say the word, “Image”, before reading out its ALT text) - now that isn’t helpful!

Other web developers simply leave out the ALT attribute for spacer images (and perhaps other images). In this case, most screen readers will read out the filename, which could be ‘newsite/images/onepixelspacer.gif’. A screen reader would announce this image as “Image, newsite slash images slash one pixel spacer dot gif”. Imagine what this would sound like if there were ten of these in a row!

Bullets and icons

Bullets and icons should be treated in much the same way as spacer images, so should be assigned null alternative text, or alt=”". Think about a list of items with a fancy bullet proceeding each item. If the ALT text, ‘Bullet’ is assigned to each image then, “Image, bullet” will be read aloud by screen readers before each list item, making it take that bit longer to work through the list.

Icons, usually used to complement links, should also be assigned alt=”". Many websites, which place the icon next to the link text, use the link text as the ALT text of the icon. Screen readers would first announce this ALT text, and then the link text, so would then say the link twice, which obviously isn’t necessary.

(Ideally, bullets and icons should be called up as background images through the CSS document - this would remove them from the HTML document completely and therefore remove the need for any ALT description.)

Decorative images

Decorative images too should be assigned null alternative text, or alt=”". If an image is pure eye candy then there’s no need for a screen reader user to even know it’s there and being informed of its presence simply adds to the noise pollution.

Conversely, you could argue that the images on your site create a brand identity and by hiding them from screen reader users you’re denying this group of users the same experience. Accessibility experts tend to favour the former argument, but there certainly is a valid case for the latter too.

Navigation & text embedded within images

Navigation menus that require fancy text have no choice but to embed the text within an image. In this situation, the ALT text shouldn’t be used to expand on the image. Under no circumstances should the ALT text say, ‘Read all about our fantastic services, designed to help you in everything you do’. If the menu item says, ‘Services’ then the ALT text should also say ‘Services’. ALT text should always describe the content of the image and should repeat the text word-for-word. If you want to expand on the navigation, such as in this example, you can use the title attribute.

The same applies for any other text embedded within an image. The ALT text should simply repeat, word-for-word, the text contained within that image.

(Unless the font being used is especially unique it’s often unnecessary to embed text within images - advanced navigation and background effects can now be achieved with CSS.)

Company logo

Websites tend to vary in how they apply ALT text to logos. Some say, ‘Company name’, others ‘Company name logo’, and other describe the function of the image (usually a link back to the homepage), ‘Back to home’. Remember, ALT text should always describe the content of the image so the first example, alt=”Company name”, is probably the best. If the logo is a link back to the homepage then this can be effectively communicated through the title tag.

Conclusion

Writing effective ALT text isn’t too difficult. If it’s a decorative image then null alternative text, or alt=”" should usually be used - never, ever omit the ALT attribute. If the image contains text then the ALT text should simply repeat this text, word-for-word. Remember, ALT text should describe the content of the image and nothing more.

Do also be sure also to keep ALT text as short and succinct as possible. Listening to a web page with a screen reader takes a lot longer than traditional methods, so don’t make the surfing experience painful for screen reader users with bloated and unnecessary ALT text.

Some SEO Terms

1, Algorithm:

Algorithm is a stet of rules and regulations followed by search engines to rank websites in order. Each search engine has its own set of algorithms.

2, Alt tag:

Alt tags are HTML tags used to optimize an Image on the webpage. It can be a picture, company logo or any other image on the website. It is also called as alt attribute. The syntax of the tag is <IMG C=”companylogo.gif” ALT=”Web design logo”> Web design logo is displayed until the page gets loaded.

3, Anchor text:

The text used on any link is called an anchor text. For example is there is a link  Click here to e-mail , In this case ‘Click here to e-mail’ is the anchor text.

4, Automated submission:

There are many softwares available on the internet which can be used to submit your website to hundreds of search engines and directories automatically. But it is not much useful to submit your website using a software.

5, Back link OR Backward link:

Number of links pointing out to your website is called as backward links. Backward links are also called as Inbound links.It is very important to build backward links to gain good rankings on search engines

6, Black hat SEO:

Black hat SEO are the techniques used to fool the search engines in order to bring in more traffic to websites. You are not suppose to use Black hat techniques because there is a chance of your website being black listed on the search engines

7, Black listed :

A website is black marked by the search engines for various reasons like using Black hat SEO,  Illegal content, Spamming etc. Black listed websites never show up on search engines. So you have to be very careful in the SEO techniques you use for your website because once you are on the black list you will never have hits and sure toloose business.

8, Broken link:

A link that existed before but does not exist at present is called a broken link. The search engines might have indexed the link when it existed now the link may havemoved to a different page or removed in this case the search engine removes the indexed link from its database. It is not good for a website to have broken links.Broken links are also called as Dead links.

9, Crawler is also called as spider.

Crawler is a program which is similar to a browser it is owned by search engines, to “surf” the web by following links from one page to the next and from one site to the next. It collects information from the sites it visits and that information is stored in the search engine’s database.

10, Cross linking:

Suppose you own multiple websites and link all the websites you own into each other it is called Cross linking. cross linking is done to improve link popularity.But when you do too much cross linking there is a chance that your website may get black listed in Google for using bad SEO process.

11, Description tag:

Description tag is a HTML tag which gives a brief description about the website to the search engines. It is not visible on the website but it helps the search engines to index your website by showing it the exact content of the page. Now a days search engines do not give much importance to the description tag.

12,Directory:

Directory is a website with a collection of different websites belonging to various categories. A directory can be a general directory and there are also directories belonging to one particular category. There are some directories which allow free site listings and few offers only paid listings.Directory listing is the best method to build inbound links.

13, Doorway page:

Doorway page is the page which redirects to another page. It is a black had SEO technique where a keyword rich page with no proper content, this page is where search engines land you on but the page gets you redirected to another page or domain.This is not a advisable technique to bring traffic to your website.

14,Dynamic content:

Web site content generated automatically, usually from a based or user selections. Dynamic content typically changes at regular intervals, for example daily or each time the users reload the page. SERPSs are dynamically generated pages, changing depending on user input

Domain Name Basics

1. AVAILABILITY

If it’s not available you can’t have it – simple!

2. COPYRIGHT

Ensure that you do not breach copyright or infringe trademarks with your choice of domain.

3. EXTENSIONS

It’s widely acknowledged that the best TLD (top level domain) is .com. However, in the UK, web users are more than used to .co.uk so this is equally acceptable for UK websites. If .com isn’t available and you use .net instead (for example), check that .com isn’t either a competitor or that the .com site content is acceptable! Always try to get the .com, your country TLD or .net in that order. Web users are still not used to .biz or .info.

4. BE GREEDY!

If more than one TLD variant is available, buy as many as you can afford and set them all to point to your website. This is a form of brand protection and prevents unscrupulous competitors trying to cash in on your hard-earned web traffic.

5. BE MEMORABLE

Make sure that potential web users will remember your domain name and that they can spell it properly.

6. BE PRONOUNCABLE

Try telling people your web address over the phone – can they understand what you tell them? Or do they give up and try someone else’s website.

7. BE DESCRIPTIVE

If you are a new business, very few people will remember or search for your domain name if it is your company name. Try choosing a domain name that is descriptive of your products instead e.g. cheap>.com. Try testing it with a hyphen as well as using just one word.

8. OFFLINE MARKETING

Use your domain name in your offline marketing literature and ensure that it is as visible as possible. However, if your domain name consists of more than one word, that isn’t hyphenated, try using capital letters e.g. which is easier to read – littlefishwebdesign.com or LittleFishWebDesign.com? Domain names are not case sensitive so your clients will find your site whichever version they use.

9. BUY YOUR DOMAIN FOR LONGER

Search engines are now looking at less obvious information such as how long you have bought your domain name for. Domain names owned for less than two years are though to be penalized, so buy your domain for as long as possible.

10. OWN YOUR DOMAIN NAME

If you use a web designer or third party for your domain names, ensure they are registered in your name and that you have a signed agreement with the company that they will release all the details (including password) to you, quibble free, if you choose to move to another design or hosting company.

Webmaster Must Dos

1. Maintain an easy to follow Navigational system throughout your website.

2. Do not use frames unless it’s really important. Visitors detest getting stuck up in frames and Search Engines find it difficult to index websites with frames.

3. Avoid using scrollbars horizontally. There is nothing more annoying than having to scroll both vertically and horizontally at all screen lengths.

4. A full Flash Website may look very appealing, but that’s the last thing your visitors are going to wait for to load. Instead try embedding Flash on your pages to get the same look.

5. To minimize download time, use tables with different background colors to add life to your pages, instead of using too many graphics.

6. Do not cluster too many animated buttons and banners throughout your site. Your visitors will not be able to browse comfortably with all that blinking going on and will surf elsewhere.

7. Keep updating your website. People will not return if they find the same old stuff lying there.

8. Put up a message board, feedback form, guestbook etc. to add a touch of interactivity to your website.

9. Make it a point to return the visits and/or answer all e-mails/messages within a reasonable period of time.

10. Provide links to other websites, even your competitors, if possible. This shows you are not conceited and are willing to help your visitors to find what they need. This little gesture goes a long way to earn you goodwill.

Money Making Websites

There are many ways to make money online and the best way for you is to simply be creative with your skills, knowledge, and abilities. However, the following five options are powerful ways to make money online with a website and definite something you should consider.

#1 Knowledge

You can always sell your knowledge, which many times is the best way if you are an “expert” of any type or subject matter. People are looking for your knowledge and input, regardless if it is self taught, learned in college, or wherever. People are always looking for answers online, so if you sell your knowledge you can simply make money from what you know.

#2 Affiliate Programs

Become an affiliate for products based on your website theme and then simply promote these programs where you earn money from referrals. It is easier than it sounds and only takes you creating a website full of rich content.

#3 Hard Goods

Selling hard goods is a traditional way of making money and it transfers to the online forum as well. No matter what hard goods you have to sell you can certainly find a buyer online. Create a website that focuses on your goods, have a good shipping plan in place, and then start selling online.

#4 E-books

Selling e-books, articles, and other written materials is also a powerful way to make money online and if you are good at writing it is certainly something you should consider. You can have your own website selling pre-written topics or else you can also write on demand, whatever works best for you and your web business.

#5 Auction Goods

Auction web sites are also very powerful ways to make money. The reason for this is you can sell a wide variety of products, do not necessarily need your own website although it helps, and can change your products from time to time as you need to. Many people enjoy working and selling via auction sites because any number of things can be sold from old personal items to new products as well.

The best way for you to make money online is for you to do something that you like and enjoy. When you do some thing you like and enjoy you will be able to commit yourself to doing it fulltime. The reason for this is working online can be difficult at times and if you do not enjoy it then it will be difficult for you to be successful making money via your website.

Htaccess.Txt

A .htaccess file is a file that works on Apache and other NCSA-compliant webservers. The name is actually a bit of a misnomer due to the fact that hyper-text access is only a small function of what it’s capabilities are.

The .htaccess file affects the directory it is located in and all directories below it on the directory tree unless there is a .htaccess file contained within a directory, in which case it will take priority for that directory and all directories located below it in tree. Thus if a .htaccess file is contained within the root directory it will affect all directories on the webserver.

The basics are as follows. The .htaccess file is an ASCII (American Standard Code for Information Interchange), these files are most easily generated through notepad or anything that can type in simple text format. One of the most common questions about .htaccess files are what to name them, unfortunately they can have no name, and the extension (although uncommon) really is 8 characters long.

Creating the file is somewhat tricky because programs like Windows Operating System will not allow you to have a file wih no name and only an extension. In order to get around this what you must do is name the file whatever you would like and after it has been uploaded to the server rename it to .htaccess. At this point however the file will become invisible to browsers and ftp clients (although it can still be navigated to and the contents of it viewed), this is due to the fact that any file with a period at the beginning of it’s name is considered a hidden file.

When uploading the .htaccess file it is very important to make sure that you upload it as ASCII and not as binary. Also when it has been uploaded there are a few precautions you take to prevent it from being read by a browser, one is to CHMOD it’s permissions to 644 (or RW-R–R–). The other’s will be covered later on in more detail. Due to the nature of the information stored in the .htaccess file it is usually of the utmost importance to keep it secure.

When creating a .htaccess file for the first time there is one quick note to keep in mind, this is that most commands are typically meant to be placed on one line, so if you are using a text editor which has the word wrap feature it may be in your best interest to turn it off as this can input syntax that Apache does not understand and will cause your scripts to fail. Also note that .htaccess files will not work on a NT or Windows platform, there are various other methods of accomplishing the tasks that .htaccess provides, but none that are bundled together in such a nice little package.

.htaccess files are not globally accepted. Due to the fact that they can be used for security that can become very serious security holes. Due to this some webhosting companies have either limited the use of .htaccess or removed it all together. Before you take the time to create a .htaccess file or series of them you should always know what you can and cannot do.

Custom Error Pages / Request Pages

There are various client requests and error pages that can happen when someone is navigating a website. A brief list of them is as follows;

200 - Okay

201 - Created

202 - Accepted

203 - Non-Authorative Information

204 - No Content

205 - Reset Content

206 - Partial Content

400 - Bad Request

401 - Authorization Required

402 - Payment Required

403 - Forbidden

404 - Not Found

405 - Method Not Allowed

406 - Not Acceptable

407 - Proxy Authentication Required

408 - Request Timed Out

409 - Conflicting Request

410 - Gone

411 - Content Length Required

412 - Precondition Failed

413 - Request Entity Too Long

414 - Request URI Too Long

415 - Unsupported Media Type

On this list I have included some good and some bad things that custom pages could be set up for in a .htaccess file. For instance if you set up a customer page for the 200 request everytime someone successfully typed in a URL or accessed your website and it was successfully bringing up a page then it would refresh to the page you specified in the .htaccess file, as soon as it was successfully brought up it would then redirect back to the page specified in the .htaccess file, and so on infinitely. This would be an example of a bad way to use this feature. However, if you were to set it up for error 404 then when someone typed in an incorrect url or a link to a page has become outdated then someone could be redirected to a nice professional looking page which could also be useful and provide links back to your mainpage or to a help section within your website.

The coding used to within a .htaccess file to redirect upon the completion of a request or error is as follows (and only goes on a single line);

ErrorDocument code /directory/filename.ext

For instance this could look like;

ErrorDocument 404 /errors/404.html

This would redirect anyone who got a 404 error on my website to a folder called errors and then to a file named 404.html.

You also have the ability to add html to the .htaccess file for these, for instance you could add;

ErrorDocument 404 ” The page you are requesting is not here, please use your back button to return.

Notice that there are quotation marks before the html code but not at the end of it. This is as it should be for the Apache to read it correctly. Also make sure that it is all on one line so turn off your wordwrap when inputting it.

Password Protecting Folders

In order to password protect any directory you will require two files, .htaccess file and a .htpasswd file. The naming convention is identical to the .htaccess file.

Within the .htpasswd you will need to put in the username and password (although the password must be encrypted) you would like to use, for instance, if we use the username of username and the password of password it would look like this.

username:66yGQHg8KA7jw

In order to encrypt a password you can go to http://www.earthlink.net/cgi-bin/pwgenerator.pl or do a search on google for password encryptor.

For security purposes it is recommended that you do not place your .htpasswd file in a directory that is not web accessible, rather try and place it above your root www directory. And also make sure that you upload the .htpasswd file as ASCII instead of binary.

Now you must add the code to the .htaccess file which will be located within the directory you would like to password protect;

AuthUserFile /home/users/web/b2278/ph.dprouse/.htpasswd

AuthGroupFile /dev/null

AuthName EnterPassword

AuthType Basic

require user username

The AuthUserFile line deals with the absolute location (not the web location) of the .htpasswd file, there is no set standard for this so always make sure you double check with your webhost provider.

The AuthName line is arbitrary, it can say whatever you would like to put in there within reason (no spaces).

The AuthType is basic because we are using a HTTP login.

The final line is require user and then the customer’s username, this is setup as though each user has their own seperate directory they can have access to, if you have multiple users that would like to access the same directory you change the last line to read;

require valid-user

Enabling SSI Through .htaccess

Many webhosts do not allow SSI access, this is due to the fact that there are many SSI hacks out there and it is a large vulnerbality. There is a way to allow it, although you should always contact your host and make sure that this is permitted as it can be a breach of your terms of service.

The following lines must be added to your .htaccess file;

AddType text/x-server-parsed-html htm html

The AddType line adds a MIME type to the text category and the extension is .shtml. This allows them to be seen on the server, even though most hosts do allow this it is always better to add it to the code to make sure.

The AddHandler line makes sure that all .shtml files are server-parsed for server side commands.

If you do not feel like renaming all of your .html files to .shtml you can add this line between the first and second lines above;

AddHandler server-parsed .html

This line is not overly recommended as it will cause the server to parse every file with the .html file extension. This adds extra load time to every page you have as well as extra server strain, if you are worried about load time it is always better to only use the .shtml files.

If you are planning on using the .shtml extension and would like to use SSI on your index page you must add another line of code into your .htaccess file;

DirectoryIndex index.shtml index.html

This line of code will allow your index file to be index.shtml and if it does not find one it will automatically check for a index.html.

Blocking Users By IP Address

If you were to need to block someone or a group of people from accessing your website it would be as simple as adding the following lines of code to your .htaccess file;

order allow,deny

deny from xxx.xxx.xxx.xxx

deny from xxx.xxx.xxx

allow from all

The first line sets the order of steps, the first step is to allow, then to deny.

The second line is the first line of denials, there can be as many as you require. This line will prevent anyone from IP address xxx.xxx.xxx.xxx from entering this directory (or website).

The third line will block everyone from an IP range, anyone at xxx.xxx.xxx.??? will be blocked, such as xxx.xxx.xxx.1, xxx.xxx.xxx.2 … xxx.xxx.xxx.255.

The last line will allow everyone else to enter, however, if you chose to prevent everyone you could set this line to read;

deny from all

You may also allow or deny by domain name, such as;

deny from .purehost.com

This will prevent all users from this domain to be blocked, it also includes all sub-domains (such as username.purehost.com).

Changing Your Default Directory

If you have a problem setting your homepage to index.html you may want to look into using this piece of code in you .htaccess file;

DirectoryIndex filename.ext

What this will make happen is when someone accesses your website they will be directed to the filename listed instead of the typical index.html file. You can also setup priorities on this too, if you were to list multiple files it would check for the first one and if unable to find it, it would then move on to the second one and so forth.

For example;

DirectoryIndex danny.html index.pl home.php index.html

This would first check for the daniscool.html file and if unable to find it check for the index.pl file and if unable to locate it check for the home.php file and if unable to find it check for the index.html file. Once it has exhausted all of these then it would display a 404 error (hopefully you have already set up a custom one using your .htaccess file).

.htaccess Redirects

Although redirects can be coded through many different means, such as http-equiv, javascript, or any type of dynamic scripting it is typically more efficient to do it through a .htaccess file. The reason being that the coding for all your redirects can be done through a single file instead of having to add code to multiple files. This can save time, which ultimately can mean the difference between someone coming to your site and finding broken links or not seeing updated information.

htaccess uses redirect to look for any request for a specific page (or a non-specific location, though this can cause infinite loops) and if it finds that request, it forwards it to a new page you have specified:

Redirect /folder1/file1.html http://site.com/folder2/file2.html

Notice there are three separate yet required parts to this line of code. The first part is the Redirect command, this informs the browser that when a specific file or folder is accessed the browser is going to be redirected to a new location. The second part is the address of the file or folder you want to redirect from relative to your root directory. The third and final step is to indicate the file or folder that you want to redirect to, this should be indicated by the complete path to it.

As with most .htaccess commands all three sections of this are seperated by a single space but located on one line. This command will often be used if there are massive changes to a website, for instance you have created an entire new site, which is located in a separate folder. You would use the redirect command and specify the old folder and then specify the new folder.

Hiding Your .htaccess

Because your .htaccess file can often contain information that is very pertinent to your website or information that can be potentially a security risk it is always better to limit access to it as much as possible. If you have set incorrect permissions or if your server is not as secure as it could be, a browser has the potential to view an htaccess file through a standard web interface and thus compromise your site/server. This, of course, would be a bad thing. However, it is possible to prevent an htaccess file from being viewed in this manner:

order allow,deny

deny from all

The first line specifies that the file named .htaccess is having this rule applied to it. You could use this for other purposes as well if you get creative enough. If you use this in your htaccess file, a person trying to see that file would get returned (under most server configurations) a 403 error code. You can also set permissions for your htaccess file via CHMOD, which would also prevent this from happening, as an added measure of security: 644 or RW-R–R–.

Adding MIME Types

IF you are using a file extension that is not set on the servers, which can be a common occurrence with MP3 or even SWF files, you can specify what type of file it is by adding this line of code to your .htaccess file;

AddType application/x-shockwave-flash swf

AddType is specifying that you are adding a MIME type. The application string is the actual parameter of the MIME you are adding, and the final little bit is the default extension for the MIME type you just added, in our example this is swf for ShockWave File.

If you need to find the application string of the file you are adding most of them are located at filext.com. Also, if you want to have a file who’s extension is specified on the server to open with something and you would rather have that downloaded (for instance .xml) you can specify the application string as;

application/octet-stream

Preventing Hot Linking

Hot linking refers to someone outside of your website using the path to one of the images on your website. This is considered very rude for two major reasons; the first is that you may have spent many hours working on a particular image and do not want it used by someone else, and the second is that everytime someone accesses that other person’s page it uses your bandwidth. If the site were to have many visitors it could end up that your website actually goes down to bandwidth over usage.

Using .htaccess, you can disallow hot linking on your server, so those attempting to link to an image or CSS file on your site, for example, is either blocked (failed request, such as a broken image) or served a different content (for example a different picture) .

Here’s how to disable hot linking of certain file types on your site, the case below takes into account images, JavaScript (js) and CSS (css) files on your site. Simply add the below code to your .htaccess file, and upload the file either to your root directory, or a particular subdirectory to localize the effect to just one section of your site;

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/.*$ [NC]

RewriteRule \.(gif|jpg|js|css)$ - [F]

Be sure to replace “domain.com” with your own. The above code creates a failed request when hot linking of the specified file types occurs. In the case of images, a broken image is shown instead.

You can set up your .htaccess file to actually serve up different content when hot linking occurs. This is more commonly done with images, such as serving up an alternate image in place of the hot linked one. The code for this is;

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/.*$ [NC]

RewriteRule \.(gif|jpg)$ http://www.domain.com/alternatepicture.gif [R,L]