Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Sep 2011
    Posts
    50
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question How can i secure my website from hackers.

    I am very much worried about my website's security. Can i secure my website from hackers through coding? Or, is there any other method of security in which i needn't to pay for security. Please tell me the important points about website security too.

  • #2
    New Coder
    Join Date
    Sep 2011
    Posts
    12
    Thanks
    0
    Thanked 1 Time in 1 Post
    For one,
    Do not have writable file permissions. The correct permissions are normally 755 or 644.
    That's assuming if you're using a web host.

  • #3
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Yes, how well your website is coded plays a big role in how secure your website is.
    OracleGuy

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Secure what? your code? or sensitive information that may be on your site?

    Code, no you cant secure it....read the sticky here about protecting source code.

    As for sensitive information, as oracle said, a great deal of thought should go into how you plan to code your site. Server side coding cannont be seen by end users, therefore is always best when validating forms, protecting data, encrypting data, email addresses, and such, and general site security.

    If there's data you're really worried about, pages can be "blocked" or secured from view for anyone other than "trusted" members of your site.
    Teed

  • #5
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    As said above, your server-side script is where the real security takes place. That is the one part of the system that a hacker can't touch unless you let them touch it. Any HTML or javascript can be manipulated (making any and all input received from users unreliable and potentially dangerous), but your source code for server-side scripts can neither be seen nor be edited. You have to rely on input validation and obfuscating critical folder names and database names/columns/etc. It's a layered approach.

    The number one most basic rule in my opinion is to treat everything your server receives from a user as a hacking attempt until proven otherwise. Any data provided by a user is absolutely NOT TO BE TRUSTED. You validate all inputs and check very carefully before running any database commands to make sure that nobody is running commands you had not intended (see "SQL injection" in a google search for some background).

    If you are on a shared hosting environment then you kind of have to trust that your host has the proper security set up for the rest (ports, DDOS attacks, and such). If you run your own server then you have to make sure that you have those things taken care of yourself.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,620
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    You can also improve security with htacces: http://perishablepress.com/press/200...icks/#security

  • #7
    Banned
    Join Date
    Sep 2011
    Posts
    20
    Thanks
    1
    Thanked 3 Times in 2 Posts

    Thumbs up

    Quote Originally Posted by oracleguy View Post
    Yes, how well your website is coded plays a big role in how secure your website is.
    Please tell me secure what ?

    I want to know how to secure our website from hacker ?

  • #8
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Rowsdower already pretty much covered it as well as can be in only three paragraphs. Always sanitize and validate all user input even hidden input fields.
    OracleGuy


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •