How To Ban Unlimited IP Address alongside JavaScript inwards Blogger

At this fourth dimension as well as age, tons of hackers are revolving around inwards the blogosphere amongst exclusively 1 motive to hack equally many websites equally they can. Therefore, to protect our weblog from creature forcefulness attacks or hijacking it’s essential to accept a rigid safety system. There is no dubiety that Blogger Platform has the indestructible safety whenever nosotros compare it amongst 1 of the leading Blogging Platform WordPress. Since, Blogger enabled websites industrial plant on Google’s Server, so it is extremely tough to hack or hijacked them. However, sometimes content cloning, click bombing, as well as spam commenting becomes the biggest pain. In this situation, a somebody tries to honour the culprit as well as throttle it from access his website. In other words, nosotros tin forcefulness out state that banning his IP Address.  

How The IP Address Banning Works?

Fundamentally, no 1 wants to throttle his users from visiting his website but repeated violation inwards terms or services annoys a website as well as thence the terminate results aren’t amusing for the spammers. There are no appropriate ways of banning a Certain IP, but at that topographic point are few alternatives that create the chore quite effortlessly.  To Ban sure IP Address nosotros volition utilize a JavaScript coding which volition automatically redirect unwanted IPs to a novel destination. The Script is extremely flexible because nosotros tin forcefulness out add together unlimited IPs as well as tin forcefulness out equally good customize the redirecting goal URL.

Whenever, a Visitor who’s IP is inwards the Blacklist would view your website he volition instruct a Message that, “Your IP address XYZ is Banned” as well as then, inside seconds it volition redirect the banned visitor to a prescribed goal URL. We accept attached a screenshot below so everyone tin forcefulness out easily empathise its meaning.

How To Redirect Unwanted IP Addresses via JavaScript In Blogger? 

The JavaScript file volition trim your website’s charge fourth dimension because inwards this Jquery coding, nosotros accept used minor JavaScript, no complexity involved at all. Consider the next instruction. (Remember: The same technique tin forcefulness out last applied on whatever platform i.e. WordPress, Joomla as well as etc.).
  • Go To >> Your Site >> Template.
  • Now simply Select Edit HTML >> Proceed
  • Then inside the template search for </head> as well as higher upwards it glue the Following JavaScript coding. Remember: Don’t glue this Coding inwards the gadget AREA i.e. HTML/JavaScript otherwise it could destroy your site maliciously. This is the reason, why it’s essential that you lot exclusively add together it inwards your Template component rather so adding it into your Add a gadget area.

var ip = ‘Your-IP-Here‘;
function banned(){
alert(“!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Attention!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nYour ip address has been banned!”);
function ban(){
if (ip == “Banned-IP-1” || ip == “Banned-IP-2” || ip == “Banned-IP-3”   )  {

  • Replace Your-IP-Here amongst your IP Address so, the script could fetch your LocalHost. Without adding your personal IP Address, this script would halt working. 
  • Last but sure non the to the lowest degree Replace Banned-IP-1 the IP Address that you lot desire to ban. There is no bound for IP Banning. Therefore, nosotros tin forcefulness out ban unlimited IPs without whatever work whatsoever.
All Done: After Add your as well as the victims IP Address relieve the Template past times pressing “Save Template” Button. Now your site is rubber from unwanted users.

From The Editor’s Desk:

Though, nosotros accept preciously shared a detailed tutorial on how to Block IP Address inwards Blogger weblog but that tutorial allows to throttle exclusively iii IP Address. Therefore, nosotros decided to educate a script that could assistance users to ban unlimited IP Addresses. Since, nosotros can’t usage PHP inwards Blogger Platform. Thus, nosotros tried to play amongst JavaScript, as well as it industrial plant similar a charm. The script is põrnikas gratuitous as well as would non render whatever laggy experience. What are your thoughts nearly this technique? Take a lot aid till then, Peace, Blessings as well as Happy Blocking.