Tuesday, 9 December 2014

Blocking Traffic From a specific Websites “JavaScript / Php” (Including Reason)

You would possibly be thinking that why to prevent receiving traffic from specific sites. you may be thinking that receiving vast traffic from different sites is sweet because it can increase earnings on Google Adsense or the other ad networks, this can be in keeping with newbies thought. But, The execs and Google itself tell that traffic returning from dangerous sites, illegal  sites and conjointly gaining an excessive amount of referral traffic isn’t sensible. Actually, it’s the low quality traffic that damage your web log. So, during this post, we’ll discuss that why we must always stop receiving traffic from specific sites, detective work the traffic returning from specific sites and block it to be safe. Lets begin with the rationale why to prevent this kind of traffic.

Why you must Stop Incoming Traffic From specific Sites?

blocking Traffic From a specific Websites  JavaScript
This is the primary question you would
possibly need to raise and let ME answer this. within the eyes of Google and web traffic laws, this is often the low quality traffic that we must always avoid obtaining. the rationale of stopping this traffic is that, your Google Adsense account would possibly get disabled attributable to low traffic and increase of referral traffic. Google Adsense needs the five hundred of organic traffic coming back from any search engines. If you are using any reasonably advertising network on your journal or website then it may also have an effect on on it network as a result of mostly each ad network prohibits this sort of low quality traffic and this may have an effect on on the search rankings. Secondly, obtaining an excessive amount of traffic from specific sites indicates of obtaining fined by Google penguin and everybody simply need to beat Google penguin. So, you must stop this traffic to be safe from Google penguin and Adsense.

Detecting The Traffic returning From specific Sites:

I think you are using Google Analytics as your traffic counter. the explanation it’s the foremost standard tool which provides and correct and big information regarding our visitors. And by the employment of this tool, we are able to discover this type of traffic. 1st of all, you may see increase in traffic and you may be happy to check the traffic as a result of everyone would like it. My recommendation, whenever you may see the traffic increase than you must check the traffic sources that informs you from wherever the traffic is returning from. If you see quite five hundredth increase in referral traffic then any specific website is causing traffic to you and if the direct traffic is increased  over five hundredth than you would possibly be receiving traffic from bots. Well, let’s come back to our purpose. Our purpose is all regarding referral traffic here therefore if that referral share is increased  then you must check from which websites the traffic is returning. to see that website is sending referral traffic then head to Google Analytics >> Traffic Sources >> Referrals.
There you may see those all sites from wherever you are obtaining referral traffic. So, check that website is sending the foremost high traffic to you. you’ve got to see solely those sites that ar causing high traffic to you as you’ll be able to see within the main image that sites ar sending over 40k visits. once obtaining the domain of these sites, visit every website and check them manually. Below, I’ve listed some points that you've got to check in those sites. If they\’re having these sites then check that they’re specific sites.
  • Pornographic / nudeness Content
  • Copied content
  • Pirated Material
  • Hacking Content
  • Based On Black Hate SEO
  • And all different illegal  things

How To Stop Receiving Traffic From specific Sites:

Now once the long story let\’s come back to our main purpose that\’s regarding block the traffic returning from any specific domain or specific sites. Recently, I got JavaScript and PHP script from StackOverFlow that i am progressing to share below. Before I offer you the scripts with tutorial, 1st of all let ME tell you that however this works.

How These Scripts Works to block & Banned  Referral Traffic?

There is not any history behind these scripts however only for information and clearing the subject i\’d to tell you that however they work. 1st of all, we\’ll add this script to our website below  section. they\’re 2 needed fields within the script that we\’ve to edit or fill. the primary one is that the name of any specific website from wherever the traffic are blocked and other is that the URL of any testing webpage wherever all the traffic are redirected. Now, once you can receive the traffic that script can find that domain and send or send that traffic to the testing webpage or the other URL that you provide.

Read Tutorial:

  1. Copy The JavaScript or PHP Script that is Being Supported By Your Platform
  2. Paste It Below  [ in order that browser scan this initial and script do the fast action ]
  3. Fill URLs From wherever To Traffic ought to Be Blocked or specific Site’s URL.
  4. Fill URL wherever All The Traffic ought to Be Redirected!
Save It!

JavaScript Code:

<script type=’text/javascript’>
var block = [‘url One’, ‘url Two’];
for (var b = block.length; b–;) {
if (document.referrer.match(block[b]))
window.location = “http://google.com/”;
Php Code:
$block = [‘url One’, ‘url Two’];
foreach ($block as $value) {
if ($_SERVER[‘HTTP_REFERRER’] == $value)
header(‘Location: http://google.com/’);

No comments:

Post a Comment