No results found.
    Navigation

    Robot Portal

    Easily manage all aspects of your account | Knowledgebase |

    Knowledgebase

    How to Block certain IP address?

    Web servers can host many different domains on one hosting account under Linux/Apache, and public access to each domain and its folders and files can be controlled through the use of a .htaccess file to block a specific IP address, range of IP addresses, or multipleseparate IP addresses. The .htaccess file is typically found in the root folder of your domain (where you would also find the starting page for your web site) and is used for other purposes other than just controlling access to folders and files.

    Installing a .htaccess file is not limited to the web site root folder, however. You can install the .htaccess file in any of your sub-folders and the server will apply the rules only to site visitors that attempt to access a file in that folder or any sub-folders below

    Allow from All but Deny from a Specific IP Address(es)

    The format of the instructions to place into the .htaccess file for blocking access to a protected area is as follows:

    order deny,allow
    deny from 99.999.999.991
    deny from 99.999.999.992
    deny from 99.999.999.993
    allow from all

    These instructions tell the web server to deny all requests to the web site protected area from IP addresses 99.999.999.991, 99.999.999.992, and 99.999.999.993, but allow requests from all other IP addresses.

    Deny from All but Allow from a Specific IP Address(es)

    You may also want to limit access to a folder only to a specific IP address or range of IP addresses. The format is the same but the contents of the .htaccess is slightly different.

    order deny,allow
    deny from all
    allow from 99.999.999.991
    allow from 99.999.999.992
    allow from 99.999.999.993

    In this case you are denying access from everyone but allowing access to only specific IP addresses or domain names.

    • 60 Users Found This Useful

    Was this answer helpful?

    Related Articles

    500 Internal Server Error

    Internal Server Error help, 500 error Internal server errors can be caused by a few different...

    Do you provide AwStats?

    Yes, we provide AWSTATS most of the servers of CentrioHost Networks and it is updated...

    Register_Global ON?

    Since register_globals is disabled on the servers for security purposes, some of your scripts and...

    Unable to Access my site?

    We receive lots of queries from our client saying that why i'm not being able to access my site....

    How to change a php.ini value?

    We use suPHP in all of our servers. So you can modify your php.ini value very easily! All you...

    Over 20000 Satisfied Customers!

    • vps web hosting reviewer
      Porfirio Santos
      Technician, Diageo PLC

      Centrio support team have been amazingly responsive and helpful to any of my queries, thank you so much to the Centriohost have been amazingly responsive and helpful to any of my queries 👍👍👍 ~ . . . Read more

    • wordpress hosting plans reviewer
      Catherine Auer
      Doctor, SmartClinics

      Anytime I've had a problem I can't solve, I've found Centriohost to be diligent and persistent. They simply won't let an issue go until the client is happy. ~ . . . Read more

    • reseller hosting reviewer
      Effectivo Social
      Freelancer, Fiverr

      Recommend their shared hosting for all my SME web design clients. Their cloud or VME offerings are too great to deal with. Pricing is perfect and suitable for all users (͠≖ ͜ʖ͠≖) 👌 ~ . . . Read more

    • web hosting reviewer
      Valerie Quinn
      CTO, Acteon Group

      Centriohost staff were fantastic, I had a concern with a domain and they got back to me very quickly and they helped me to resolve the issue! ~ . . . Read more

    • Joomla hosting reviewer
      Collin Bryan
      Photographer, Allister Freeman

      I'm using centrio for my portfolio since 2006. The transition was seamless, the support was immediate, and everything works perfectly. ~ . . . Read more

    • dedicated server reviewer
      Harry Collett
      Actor, A&J Artists

      Very easy to understand & use even though I am not very technologically minded. No complications whatsoever & I wouldn't hesitate to recommend it to all. ~ . . . Read more

    • vps web hosting reviewer
      Porfirio Santos
      Technician, Diageo PLC

      Centrio support team have been amazingly responsive and helpful to any of my queries, thank you so much to the Centriohost have been amazingly responsive and helpful to any of my queries 👍👍👍 ~ . . . Read more

    • wordpress hosting plans reviewer
      Catherine Auer
      Doctor, SmartClinics

      Anytime I've had a problem I can't solve, I've found Centriohost to be diligent and persistent. They simply won't let an issue go until the client is happy. ~ . . . Read more

    • reseller hosting reviewer
      Effectivo Social
      Freelancer, Fiverr

      Recommend their shared hosting for all my SME web design clients. Their cloud or VME offerings are too great to deal with. Pricing is perfect and suitable for all users (͠≖ ͜ʖ͠≖) 👌 ~ . . . Read more

    • web hosting reviewer
      Valerie Quinn
      CTO, Acteon Group

      Centriohost staff were fantastic, I had a concern with a domain and they got back to me very quickly and they helped me to resolve the issue! ~ . . . Read more

    • Joomla hosting reviewer
      Collin Bryan
      Photographer, Allister Freeman

      I'm using centrio for my portfolio since 2006. The transition was seamless, the support was immediate, and everything works perfectly. ~ . . . Read more

    • dedicated server reviewer
      Harry Collett
      Actor, A&J Artists

      Very easy to understand & use even though I am not very technologically minded. No complications whatsoever & I wouldn't hesitate to recommend it to all. ~ . . . Read more