Welcome to YLOAN.COM
yloan.com » access » How To Prepare A .htaccess File Properly
Online Business Site Promotion Web misc Affiliate-Revenue Auctions Audio-Streaming Autoresponders Blogging-Rss Email-Marketing Ezine-Publishing Forums Internet-Marketing List-Building PPC-Advertising Podcasting SEO Spam-Blocker Traffic-Building Video-Streaming Web-Design Web-Development Web-Hosting Domain Name soreness web analysis vinyl mlm searching media info spyware access microsoft outlook farmville

How To Prepare A .htaccess File Properly

Right now youre probably thinking what the .htaccess file has to do with the topic of SEO

. This is an SEO blog right?

In fact, it plays quite an important role in the way your website is ranked by the search engines. The problem is that few people are aware of its importance and it could be affecting the ranking of your website right at this moment.

What Is A .htaccess File?

According to Wikipedia, a .htaccess file is the default name of a directory-level configuration file that allows for decentralized management of web server configuration. If youre not a computer whiz (and Im not), such a definition is simply impossible to understand. So putting aside all the computer programming terminology, a .htaccess file is a small file which is placed within a website to perform a number of functions.


This article will only cover 2 of these functions (there are many others) because they are only ones related to the topic of SEO. I will also show you how to write the .htaccess file so that you use your .htaccess file for maximum SEO effect.

Blocking Users

A .htaccess file can be used to allow and block users by domain or IP address. The reason why you would want to do such a thing is because there are many online tools which people use to grab their competitors keywords. This will then allow them to target your keywords and potentially push you down the search rankings. For example, one such tool is SpyFu. They literally allow you to spy on your competitors. If you want stop such tools from being used on your website by your competitors, then simply structure your .htaccess file like the example at the bottom of this article.

Redirecting URLs

If you did a search on Google and looked through the search results, you will find that some websites are indexed with www. in front of them and others without it. If you were to search even deeper, you may even find some websites indexed twice, once with the www. in front of them and others without it. Why is this the case?

This is because backlinks have been built to both the www. and the non-www. but the search engine treats them as separate websites. This means that you are creating links to 2 separate websites instead of just one. As a result, any SEO benefit is getting divided up between 2 websites when they could helping just one and getting much better results. If you want to avoid such a problem, all you need to do is redirect one URL to the other. It is best to redirect the URL with the least amount of backlinks to the one with the most amount of backlinks.

.htaccess File Example

Below is the .htaccess file I use for most of my websites. It blocks access to the biggest and well-known spying tools on the Web as well as redirects a non-www. URL to a www. URL. Modify the code slightly by replacing yourdomain with your URL.

Simply copy the code, paste it in a notepad file and then save it as .htaccess. Then upload it using ftp or other means to your website.

Options +FollowSymLinks

RewriteEngine on

order allow,deny

deny from all

order allow,deny

deny from 74.53.36.242

deny from 65.39.72.142

deny from 66.34.204.26

deny from 66.34.0.

deny from 66.34.255.

deny from keycompete.com

deny from keywordspy.com

deny from keywordspypro.com

deny from spyfu.com

deny from spyfoo.com

deny from foospy.com

deny from fuspy.com

allow from all

RewriteCond %{HTTP_REFERER} keycompete.com [NC,OR]

RewriteCond %{HTTP_REFERER} keywordspy.com [NC,OR]

RewriteCond %{HTTP_REFERER} keywordspypro.com

RewriteCond %{HTTP_REFERER} spyfu.com [NC,OR]

RewriteCond %{HTTP_REFERER} foospy.com [NC,OR]

RewriteCond %{HTTP_REFERER} fuspy.com [NC,OR]

RewriteCond %{HTTP_REFERER} spyfoo.com [NC,OR]

RewriteRule .* [F]

RewriteEngine on

RewriteCond %{HTTP_HOST} ^([a-z.]+)?yourdomain.com$ [NC]

RewriteCond %{HTTP_HOST} !^www. [NC]


RewriteRule .? http://www.yourdomain.com%{REQUEST_URI} [R=301,L]

Its amazing how a little bit of code can make a big difference to your SEO efforts.

Just in case youre wondering, this is the only time that I will make reference to programming code when talking about SEO. The role of the .htaccess file was too important to overlook and not share with my readers.

by: Martin Sejas
Access Number: A Different Way To Stay Connected Free Access Number To Bring World Closer. Free Access Number The Easy Way To Make Calls At Cheap Rates Sean Sherk's Ufc All Access Workout If Height Is The Problem, Rope Access Is The Solution Free Access Number Liberty To Make Free International Calls. Why Can't Access 192.168.0.1 Free Access Number Know About It Properly Free Access Number - Make Easy And Cheap Calling Access Number For Free Call, The Best Solution Feel Free To Make International Calls Via Free Access Number Buy A 4x4 And Get Endless Opportunities For Accessorising Free Access Number: Make Calls Without Paying A Single Penny
print
www.yloan.com guest:  register | login | search IP(216.73.216.181) California / Anaheim Processed in 0.024455 second(s), 7 queries , Gzip enabled , discuz 5.5 through PHP 8.3.9 , debug code: 90 , 4581, 536,
How To Prepare A .htaccess File Properly Anaheim