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

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 ·
profile

WIA Profile: Laurel Bencomo

Born in Cambridge, England but raised in Spain, Laurel Bencomo initially chose to study business at the University of Barcelona simply because it felt familiar — both of her parents are entrepreneurs. She went on to earn a master’s degree in sales and marketing management at the EADA Business School, while working in events for a group of restaurants in Barcelona.

Women In Adult ·
profile

Gregory Dorcel on Building Upon His Brand's Signature Legacy

“Whether reflected in the storyline or the cast or even the locations, the entertainment we deliver is based on fantasy,” he elaborates. “Our business is not, and never has been, reality. People who are buying our content aren’t expecting reality, or direct contact with stars like you can have with OnlyFans,” he says.

Jeff Dana ·
opinion

How to Turn Card Brand Compliance Into Effective Marketing

In the adult sector, compliance is often treated as a gauntlet of mandatory checkboxes. While it’s true that those boxes need to be ticked and regulations must be followed, sites that view compliance strictly as a chore risk missing out on a bigger opportunity.

Jonathan Corona ·
opinion

A Look at the Latest AI Tools for Online Safety

One of the defining challenges for adult businesses is helping to combat the proliferation of illegal or nonconsensual content, as well as preventing minors from accessing inappropriate or harmful material — all the more so because companies or sites unable or unwilling to do so may expose themselves to significant penalties and put their users at risk.

Gavin Worrall ·
opinion

Know When to Drop Domains You Don't Need

Do you own too many domains? If so, you’re not alone. Like other things we accumulate, every registered domain means something to us. Sometimes a domain represents a dream project we have always wanted to do but have never quite gotten around to.

Juicy Jay ·
Show More