Useless Traffic? Is there such a thing? GEO Redirecting your Foreign Traffic
If you've read some of my other tutorials, you already know that your .htaccess file can do a heck of a lot more than just keep someone from hot linking your pictures. When you are hosted with some of the larger companies out there, it might be your only viable method of communicating with the server directly.
Because that's what .htaccess does. It is a file that gives exact commands to the server. Commands that tell the server how to respond in a certain situation or environment.
Now to keep this simple, we won't go into the different modules that you can utilize in .htaccess like mod rewrite, or all the other mod's out there. Because there are many. All mod stands for is 'module', an additional piece of software to be used by the server.
Now if you are on a windows server, you can stop reading this now. .htaccess is only an option if you are on a Unix, Linux, Apache type server.
Down to today's topic. Redirecting foreign traffic using htaccess.
Before I write a single detail though let me say this.
All traffic is valuable, just in different ways. Do NOT just copy and paste any of the code that follows, blindly into your htaccess file. Please research your options fully. Read several sources and find the best solution for you. Each server and it's environment is different.
Be sure to ask lots of questions before you start wildly adding commands. It could result in a costly crash, or serious bandwidth overages that would also cost you a pretty penny. Do not simply take my word for it and copy my examples without knowing what the results can be.
In a nutshell, there are a few different ways to redirect traffic using your .htaccess file.
Originally the whole concept was centered around BLOCKING a certain IP block rather than redirecting. The basic function for this was either to ALLOW or DENY a user that originates from a certain IP block. Very useful in having a secure area or folder. You can block ALL IP's except your's if you happen to have a static IP, or you could allow your general IP block that your ISP owns to have access. Still in effect cutting down your security risks substantially.
If you wanted to just block an IP, you would add something like this to your htaccess:
Code:
order deny,allow
deny from 1.2.3.4
deny from 5.6.7.
In the above example, you are blocking two separate IP's. 1.2.3.4 and 5.6.7.
As I said before, you could also use wildcards to block all users from those blocks. 1.*.*.* would not only block 1.2.3.4 , but it would block every user coming from the IP block starting with the number 1. Millions of users in most cases.
So how can we use this process to redirect foreign traffic?
Instead of using a flat htaccess command like order, allow, or deny, we could use a rewrite rule or condition instead. This does require that you have mod rewrite for your server or it won't work. To test it, use one of my earlier tutorials and do a simple 'www' or no 'www' url redirect and see if your server has the capability.
Now, I don't want to go thru all the different ways you can redirect IP's or domains or certain hosts in this tutorial. It is easily done and there are a jillion tutorials out there on this topic. So for the sake of brevity, I'm going to focus on one particular method. But we do need to cover one thing. There is a big difference between a flat rule and a conditional rule.
If your syntax is wrong and you only put in the rule and not the condition, it will be a catch all, changing your site's access to all users. Syntax for your rules and conditions are VERY important.
One character in the wrong place can mean the difference between a really great new setup, or your entire site's access blocked and 500 internal errors for all your users.
Once again, proceed with caution when altering these files.
So now we want to figure out how to push all that foreign traffic to something a little more useful or profitable. We could make a list of all the foreign / undesirable IP blocks and list them out, line by line. This is how it was done for a long time.
But think of the hundreds and possibly thousands of lines of directives you would have to include in your htaccess. A giant headache to say the least. Time consuming and leaves a good chance for error along the way.
But that issue has been solved by many different IP location modules, primarily Geo mods.
In this instance, we are going to look at the Geo IP module. All Geo IP mod contains is a simplified 'country code' system that streamlines your code using it's database for reference. What I mean by this is simple. Instead of listing possibly hundreds of different IP blocks for a given country, you will only use ONE country code.
For example, if you wanted to redirect users originating from Mexico, then you would use something like this:
Code:
RewriteEngine On
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MX$ [NC]
RewriteRule ^(.*)$ http://myredirection.url [R,L]
This would send them to 'myredirection.url' . So the first thing you want to do before you start adding a single line to your htaccess, is to decide where you want to send these users.
There are many companies that will buy your unwanted traffic and pay for each user you send. However, unless you are running a million hit's a day, they are probably not going to give you much for it. Pennies.
So it's much wiser to find a good way to use the traffic yourself. One way is to find a good affiliate that caters to a specific demographic and location. So this is going to take a little research. You will not only want to find the affiliate, but if at all possible, you want to tie it into your sites general focus / topic, so that you have a better chance of converting that traffic into cash.
It may not always be possible, so just do what you should always be doing when considering a new program. Put yourself in your users shoes and try to imagine what they are looking for. What their interests might be, etc.
You're probably going to want to break down different types of foreign traffic into separate blocks, sending each block to different pages you have setup for that demographic. For example:
Code:
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CN$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^HK$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MO$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CN$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^HK$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MO$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MY$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SG$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TW$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/chineseusers.html [R,L]
Using the country codes for primarily Chinese users and sending them all to a single page setup for a Chinese affiliate program. In this case, 'mydomain.com/chineseusers.html ' .
You'll want to follow this pattern throughout, unless you've decided to move it all to one place, or have sold it all to a foreign traffic buyer. You can break it down as much as you want too, sending each country to it's own page if you prefer.
If you need assistance in building a solid GEO redirect plan for your traffic, please feel free to contact me by using the contact form on my site: http://www.chuckcrawford.com/
I realize that this is a very brief overview, so once again, please do your homework before putting a lot of time into building separate pages, lining up affiliates, etc. Make sure that your host offers a Geo module in the first place, not all do.
If you have a Dedicated, VPS, UNIX / Linux / Apache server environment and have root access, you may be able to install one yourself. Make double sure you know what you're doing in this instance before you start installing modules at server level. Not all server software plays well with others and a bad mix can result in catastrophe. Do not contact me AFTER you've destroyed your build. Call me BEFORE if you're unsure. :) You are welcome to call my office and schedule a consultation, the number is (866) 75-chuck . My team can help you with not only Geo redirection, but all facets of development. We are YOUR development team. Just a phone call away. To summarize, .htaccess can do some seriously amazing things. It can change how files are used and accessed, redirect users, require user information, be used as a simple password program, rewrite url's, restrict access, and much, much more. Take the time to research it's power and you'll be very surprised at some of the tricks you can do.
Until next time,
Questions and Answers
Beauty is in the eyes of the beholder and web visitors maybe willing to overlook the fact that the a web site was not designed by Picasso. What they will not overlook is a web site page that just flat out annoys them.
Certainly one of the most potent elements of your web site is how you present your contents for your guests - and doing that's by obtaining a superb high quality of internet page layout. Making a good quality internet layout creates an excellent impression of how you illustrate your ideas about your goods and company.
India Internet is an established company providing web design in Delhi, providing a range of cheap web design services. Our website design in Delhi provides high quality, affordable and professional website.
India Internet is a Indian based premium web design company provide all web related services included website design India, website design in India, seo packages, website development services and all featured web related services.
India Internet is a Noida India based professionally managed web designing company and web development company. Our Corporate office is in Noida. Providing Web Solutions for over 10 years now India Internet has a strong team, experienced IT experts & strong presence in market.
Guide for you of the development of a website design service provider in the internet for getting the best service.
In USA, one of the leading brands that offer diverse and high quality products promoting proper hygiene is Difresh USA. If you are looking for the best opportunity to grow and have the opportunity for a new business Difresh USA can help you for they are looking for Exclusive Local Distributors
Getting clean and refresh doesn't sacrifice the place where you are for it should be a habit. Having a healthy body will allow you to do things right and good. And no matter where you are you should practice a healthy and proper hygiene even in little things you do.
Maintaining a healthy and proper hygiene badly needs products that are truly effective and could truly answer our need for this. No matter where we are and at anytime we want to get clean we basically need these products right away and only Difresh USA can supply these in a very easy way
The key reason why some firms thrive while some implode during an financial recession is still a puzzle to many people business-owning business owners. Some wrongly assume that all businesses should suffer via recessionary cycles. But the truth is that some companies are usually essentially recession-proof, and it is not necessarily because they are much larger, better known, or a lot more generously capitalized.
Companies like Arch Coal (ACI) and Massey Energy (MEE) watched his or her stock climbed.
With the global recession happening now, people around the world are looking for better chances to generate additional income. Work from home is growing more popular because it does not require your daily presence at work and it does not require a specific time to dedicate in order to make the business succeed
Com, .net, .org, .biz, .edu, .info, .int, .GOV, .mobi, .aero. For many unsuspecting Internet surfers, these dot whatever mean no greater than being an extension name of the websites they are visiting.
When you apply makeup foundation it is imperative to consider that more is not automatically better. In truth, more is commonly a less natural look.
Oftentimes leaders say they are eager for opinions about their performance. In many cases, they honestly do want it. Some say they are open to feedback, but their behavior says otherwise.

