educational

Real World Redirection

In a recent board discussion about 2257 compliance issues for overseas producers, I posted a sample of geo-redirect code that has appeared in various forms during discussions here at XBiz. The purpose of the code, implemented as part of a website's .htaccess file, is to redirect incoming website traffic to an alternate destination based upon its country of origin.

The context of 2257 in this discussion is that overseas producers and website owners who do not wish to comply with the enhanced 2257 regulations can easily block their website's availability to the US market by using a few lines of server-side coding. This is one example of the power of geo-redirects – a power which I'd like to take a closer look at today:

Separating Wheat from Chaff
Consider the flow of traffic from the Internet into your website: Depending upon your traffic sources, the percentages of the different types and origins of surfers will vary; such as US surfers coming from search engines or Bulgarians from a TGP. Inevitably, varying amounts of, to be blunt, "undesirable" surfers – and entities such as hitbots and other digital nasties – will hit your homepage.

These "undesirables" include surfers coming from countries where your products or services are illegal and surfers coming from countries with historically excessive levels of fraud, including chargebacks. As such, it behooves the website operator to immediately strip off this traffic arriving at his or her website before it even enters. Why waste bandwidth on traffic that is unprofitable and potentially dangerous?

There's no such thing as useless website traffic, however, so this undesirable traffic is not merely blocked but re-routed at the server level using the aforementioned .htaccess file. The volume of this traffic will vary from website to website, with some operators selling it directly, while others send it to sponsors or trade it for fresh surfers.

It's the latter option that I prefer. If I can trade an "undesirable" for a new surfer, then I'm happy. If I can trade one for several new surfers, then I am even happier. As such, the fate of my "undesirables" is often a "whirlwind" page where they will find top lists and trades behind every click. I'm not trying to make a buck on this visitor, I just want a shot at a better one in exchange for him.

Sometimes, filtering off foreign traffic is desirable, not because the traffic is "undesirable" – but because someone else could make better use of it than you could. For example, I can isolate, say, my Portuguese traffic and look at how well my website converts that traffic. I might also want to send that traffic to a sponsor with a Portuguese site targeting a similar niche, to measure which was the most profitable use of that particular traffic to me.

If both my own website as well as the sponsor's website were profitable to promote, then making both offers to my Portuguese surfers would be in order. I could, for example, use a full-page ad for the Portuguese website with a pass-through link to my own website – the surfer's intended destination – and send my less profitable traffic straight-through to the "whirlwind" page. Let your stats guide your actions.

You can find a list of the country codes that you'll need to build your own geo-redirect list here.

The following is an example of the geo-redirect code which you can copy and paste. It allows for separate targeting of Asian traffic with redirects to Chinese, Japanese and Korean websites, as well as a block of "high fraud" countries which redirect to a "garbage" URL – the perfect place for a "whirlwind" page:

• Asian:
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 ^(.*)$ https://chinese.url [R,L]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^JP$ [NC]
RewriteRule ^(.*)$ https://japanese.url [R,L]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^KP$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^KR$ [NC]
RewriteRule ^(.*)$ https://korean.url [R,L]

• Illegal and/or High Fraud:
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^AE$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^AF$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^AL$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^AM$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^AZ$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^BG$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^BH$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^BR$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^BY$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CR$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CU$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CZ$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^EE$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^EG$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^GE$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^HR$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^HU$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^ID$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^IL$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^IN$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^IQ$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^IR$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^JO$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^KG$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^KH$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^KW$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^KZ$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^LA$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^LB$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^LT$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^LV$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^LY$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MD$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^OM$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^PH$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^PK$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^QA$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^RO$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^RU$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SA$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SD$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SI$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SK$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SY$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TH$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TJ$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TM$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TN$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TR$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^UA$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^UZ$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^VN$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^YE$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^YU$ [NC]
RewriteRule ^(.*)$ https://garbage.url [R,L]

Next week, I'll add some additional coding and put it all together for you, in "Real World .htaccess Files."

Copyright © 2025 Adnet Media. All Rights Reserved. XBIZ is a trademark of Adnet Media.
Reproduction in whole or in part in any form or medium without express written permission is prohibited.

More Articles

profile

WIA: Sara Edwards on Evolving Clip Culture and Creator Empowerment

Though she works behind the scenes, Sara Edwards has had a front-row seat to the evolution of adult content creation. Having been immersed in the sector since 1995, she has a unique perspective on the industry.

Jackie Backman ·
profile

Segpay Marks 20 Years of High-Risk Triumphs

Payment processors are behind-the-scenes players in the world of ecommerce, yet their role is critical. Ensuring secure, seamless transactions while navigating a rapidly changing regulatory landscape requires both technological expertise and business acumen.

Jackie Backman ·
opinion

The SCREEN Test: How to Prepare for Federal Age Verification

For those who are counting, there are now 20 enacted state laws in the United States requiring age verification for viewing online adult content, plus numerous proposed laws in the works. This ongoing barrage has been exhausting for many in the adult industry — and it may be about to escalate in the form of a potential new AV law, this time at the federal level.

Corey D. Silverstein ·
opinion

How to Master Team Dynamics for Business Success

Having the right team in place is everything. Whether getting a startup off the ground and thriving, or safeguarding an established company, the right — or wrong — people can mean the difference between a successful venture and a failed dream.

Juicy Jay ·
opinion

Eight Steps to Fast-Track AI Site Approval for Processing

Artificial intelligence is a hot topic these days. AI technology is speeding up the way we do business across all industries and offers numerous benefits, from automating processes to increasing efficiency and scalability.

Cathy Beardsley ·
opinion

How to Secure High-Risk Transactions With Network Tokenization

Ensuring the security of data as it moves through digital channels is the foundation of safe transactions, and crucial for your success. If your business can’t secure transactions, you’re exposed to myriad processing traumas.

Jonathan Corona ·
profile

WIA Profile: Reba Rocket

As chief operating officer and chief marketing officer of Takedown Piracy, long at the forefront of intellectual property protection in adult entertainment, Rocket is dedicated to safeguarding the livelihoods of content creators and producers while fostering a more ethical and sustainable industry.

Women In Adult ·
opinion

Protecting Content Ownership Rights When Using AI

In today’s digital age, content producers have more tools at their disposal than ever before. Among these tools, artificial intelligence (AI) content generation has emerged as a game changer, enabling creators to produce high-quality content quickly and efficiently.

Corey D. Silverstein ·
opinion

How Payment Orchestration Can Help Your Business

An emerging payment solution is making waves in the merchant world: the payment orchestration platform (POP). It’s quickly gaining traction as a powerful tool for managing online payments — but questions abound.

Cathy Beardsley ·
opinion

Fine-Tuning Refund and Cancellation Policies

For adult websites, managing refunds and cancellations isn’t just about customer service. It’s a crucial factor in maintaining compliance with the regulations of payment processors and payment networks such as Visa and Mastercard.

Jonathan Corona ·
Show More