Jeffrey T. Kastner
  • Home
  • About
  • Website Design
  • Weebly Themes
  • Facebook Tabs
  • Blog
  • Contact
  • Guestbook
Find me here:

Block User By IP Address

5/20/2015

14 Comments

 
I had a client, who recently was having an issue with receiving contact form spam on their website and they asked me what they could do, to stop that from occurring. Unfortunately, there isn't a tool built into the Weebly editor that would allow you to block the person submitting that spam.

However, Weebly does display the IP Address of the user who submitted the Form entry AND the Blog Post comments.
Weebly Contact Form IP Address
In most cases, no-one really wants to restrict access to their website. If you want your website visible to the general public, and you want people to be able to contact you via your website, you certainly can't restrict access to your contact page. This idea dramatically changes when somebody repeatedly spams your contact forms or blog posts. If you have been a victim of receiving spam messages on your website, you are probably thinking; "I know exactly what you mean!"
IP Address Blocker

In my search to see what I could do to help my client stop the hundreds of spam contact form submissions they were receiving, I learned that blocking an IP Address can only really be done if you are using a "server-side language", such as PHP, something that can't be used on a lot of web builders such as Weebly.

The good news is, there are services out there that can provide you with an embeddable code that will work, by simply copying the code that they provide and pasting it into the <Head> code section of the site, or page.
Well, I found a solution. One that not only worked, but it also provides a few other features that can be helpful. Like the ability to direct blocked users away from your website, to somewhere like Google.com 

The IP Address Approval system will work with a number of website builders such as Blogger, Wordpress, Squarespace, Wix and Weebly, to name a few. 

And what more, you can block IP Addresses, for free. (Read More)


If you're using Weebly, like I am, while editing your Weebly site simply visit the Weebly App Center by clicking on the "App" link at the top of the Weebly editor, in the navigation menu, or in the Settings > My Apps > and click on the "Go to App Center" link in the upper right corner. *If you are a student or a teacher using the education platform you may not have access to the App Center. 

In the App Center the search feature to search for "IP" or "IP Approval", and click on the card for that app and on the app page click the Add the button and then continue, and then sign up to connect your account. Make sure to publish your site when you are done. (see step one below)


If you're not using Weebly, here are a few simple instructions to set this up on your own site. Keep in mind these are basic instructions, but should be enough to get you started!

1. Sign Up

Create an account on the Sign Up page.
http://www.ip-approval.com/sign-up

Simply enter your First & Last Name, a Username and your Email and they will send you a temporary password. 

Or, you can also use the Google or Facebook Sign-Up options.


Note: That a temporary password will be emailed to you.
Sign Up

2. Access the IP Address Editor


Once you have successfully created your account, log in and click the 'Manage IP Addresses' link, or the IP Editor navigation link.
IP Address Editor
IP Address Editor

3. Add the Banned IP Addresses

On the IP Editor page, locate the Banned IP's section and simply enter one IP address per line and then click the Save Changes button.

Use a single IP Address or an IP Range:
1. Wildcard:   1.2.3.*
2. CIDR:         1.2.3/255 OR 1.2.3.4/255.255.255.0
3. Start-End:  1.2.3.0-1.2.3.255

Banned IP Address

4. Set the Site/Page to redirect the Banned Users


On the IP Editor page, next to the Banned IP's box, set the page or website that you wish to redirect the unwanted visitors to. You can set this to be whatever you would like. Then Save your changes.

Note: by default this is set to take unwanted visitors to a page of your website /banned.html
Banned IP Address Page
Keep in mind that changing this setting, so the unwanted visitor is redirected to http://www.google.com or a different website, would require that you upgrade to the paid version of this service.

5. Copy Embeddable Code

If you are using Weebly, and are not able to host this yourself, you can use the JavaScript Embeddable Code found at the bottom of the IP Editor page.

Embeddable Code

6. Add Code to your Site

Once you have copied your unique embeddable code link, from the IP Editor, go to the Pages tab of the Weebly editor and select the page you wish to restrict access to, then click Advanced Settings.

Advanced Settings
Scroll down in the Advanced Settings, and paste the embeddable code into the Header Code section.
Advanced Settings Header Code
Then, be sure to click the Save & Edit button to save your changes.

Save & Edit

7. Create a 'Banned' page

If you are using the IP Address Approval systems default page settings you'll need to create a page on your site titled Banned.
Banned Page
Default Banned Page
Click the Save & Edit button, and add a message to the content area of your Banned page.
Then, make sure to Publish the changes to your site.

For this example, I've created a "IP Address Test Page" and I am using the IP Address Approval systems 'other' feature that allows you to Close your website but Remain Open for specific IP addresses. 

Note: Because your IP address is NOT on the list of allowed IP addresses, you are not going to have access to the "IP Address Test Page". But give it a try, by clicking the link below...

https://www.jeffreytkastner.com/ip-address-test-page
IP Address Test Page
Create your IP Approval account here:
http://www.ip-approval.com/sign-up
14 Comments
Zinga link
10/6/2016 08:47:15 pm

*My website is still in development* This is really cool... I keep getting spams on my post comments, and all i could do until now were delete them. Thanks!

Reply
Maurice
10/31/2016 10:26:00 pm

I just wanted to say thank you for this post. You deserve a gold medal! It saved me a lot of headaches

Reply
devid
12/8/2016 09:31:24 am

Can I use it on blogger site?

Reply
Jeffrey
12/9/2016 01:41:27 am

I do believe that you can! While I'm not familiar with Blogger, as long as they provide a place to add code to the 'head' of the page or site (where you would place meta tags), you can add it there. Or, worse case, you could add it to the content area by embedding the code if they only offer that. Note: its best to add it to the top of the page (preferably in the head section).

Reply
T link
4/10/2017 08:29:30 am

Can you tell me if there is a way to pull an IP address from an Order for the IP block? I have an over abuser of free content not following rules and wish to block them. Thanks!

Reply
Jeffrey
4/10/2017 05:03:16 pm

Hi T,
IF the product is a Digital Good, Weebly logs the Downloads, and I believe they provide the IP Address then, however, they do not currently provide the IP Address for each person making the purchase. If money is being exchanged, you may be able to get that info from the Payment Processor. If you would like to see this added to each order, I would recommend submitting a "feature request", to see if it is something they can add in the future... https://community.weebly.com/t5/Vote-on-Features

Reply
T link
4/10/2017 07:25:55 pm

Thanks so much for getting back to me, appreciate the help!

T link
7/24/2017 02:51:40 pm

Thanks so much!

K
7/24/2017 01:02:13 pm

Hi there ,
Does this work with Wix??
Thank you so much !

Reply
Jeffrey
7/24/2017 01:34:03 pm

Yes, this will work with any hosting platform that allows you to add JavaScript to the 'Head' code section of the website.

Reply
Craig link
6/21/2018 06:42:42 am

Hi Jeffrey , I’ve added an ip number that I want banned but is that all there is to it? I’ve left the other fields in default - Access Denied Page and - Banned IP Page. But it says I should make a page that says banned on my website, I don’t understand, because this page shows up when on my website and doesn’t look good.
I am hoping just the ip number under the Banned List is good enough?
But where do they directed to?
Thanks

Reply
Jeffrey Kastner
6/21/2018 06:48:42 pm

Hey Craig, I've sent you an email with answers to your questions. If you don't see that in your email inbox, please be sure to check your spam or junk folder.

Reply
Fai
7/10/2018 07:11:50 am

Hi, thank you so much for sharing this post with us. Have you experienced slow loading after adding the code? It seems to slow down my website.

Reply
Jeffrey Kastner
7/10/2018 04:06:14 pm

Hi Fai, I have not experienced that. It's possible there is an issue with your settings, some broken code, or maybe something temporary with IP Approval site or your account? I didn't get your website URL, to test, but if you are still experiencing problems it would probably be best to reach out to their support for assistance.

Reply

Your comment will be posted after it is approved.


Leave a Reply.

    By: Jeffrey T. Kastner
    Web Log

    Blatherings

    All
    Music Review
    Random
    Recipes
    Weebly


    By Date

    October 2020
    September 2020
    May 2019
    January 2019
    October 2018
    March 2018
    February 2018
    September 2017
    July 2017
    May 2017
    August 2016
    June 2016
    January 2016
    July 2015
    June 2015
    May 2015
    April 2015
    January 2015
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    January 2014
    December 2013
    October 2013
    August 2013
    June 2013
    May 2013
    March 2013
    January 2013
    November 2012
    August 2012
    June 2012
    May 2012
    April 2012
    February 2012
    August 2011

    Jeffrey T. Kastner


    Enter your email to receive updates:





    RSS Feed


    Web hosting

    US - Avast!

    The Easiest Way to Create a Website. Weebly.com



© 2013 Copyright  All Rights Reserved. By: Jeffrey T. Kastner
Top [Terms Of Service] [Privacy] Contact

Search...