Hi friends, can you suggest any tips for keeping the site secure? As many security issues occur just wanna be on the safe side.

Dani AI

Generated

Short primer building on the thread: the first step is a simple threat map — who are your likely attackers, which parts of the site hold value (data, accounts, admin functions) and which user flows are high-risk. That prioritization focuses effort and avoids chasing every checkbox. Use the OWASP Top Ten as a compact threat checklist when you map those risks. (owasp.org)

On the implementation side, focus on controls that stop whole classes of bugs rather than one-off fixes. Make all data-layer access use parameterized queries or safe APIs so SQL/command injection is eliminated at the source. Store credentials with a modern, memory-hard hash (Argon2 / scrypt / PBKDF2 where appropriate) and a per-password salt — avoid fast hashes. Treat session tokens and cookies as sensitive data: give them appropriate attributes (HttpOnly, SameSite, Secure) and follow session-management guidance. These are developer-level changes that pay off immediately. (cheatsheetseries.owasp.org)

Operational controls cut the remaining risk: make security part of the pipeline (SAST, DAST, SCA/Supply‑Chain checks), run automated dependency scanning and patching, and keep a small set of prioritized alerts so you notice attacks early. Have central logging, alerting and a short incident playbook (who does what if something is detected), and test backups/restores regularly. Automating these checks keeps security sustainable as the site grows. (devguide.owasp.org)

Quick checklist to act on this week (low effort, high benefit): 1) add parameterized queries to any raw SQL, 2) replace fast password hashes with Argon2/PBKDF2, 3) enable strict security response headers and cookie attributes, 4) add dependency scanning to CI, and 5) turn on centralized logs + alerts. These complement what others have suggested in the thread (thanks , and for starting the discussion) and reduce the most common failures seen in production. For deeper implementation patterns, see the linked OWASP guidance above. (cheatsheetseries.owasp.org)

Recommended Answers

All 8 Replies

There is a good article "10 security tips to protect your website from hackers" at here: creativebloq.com/web-design/website-security-tips-protect-your-site-7122853

I hope, it will be useful for you.

Thank you Suraj!was very helpful...

The first question you should ask yourself when you are securing a website is:

How I am going to build my website?
Do I use a platform or do I make it from scratch?

There are 2 ways both have advantages and desadvantages.

Method 1

Platform

Wordpress,joomla,concrete5

Description:Fast deployment(ready fast),Easy editing of content,backend with a user interface easy to manage,plugins,but security vulnerabilities.

Method 2

Framework or do it by yourself idea
Description:Medium deployment(longer to create),Need to create the UI(user interface), posibility to add extra security,like

-salt+md5+salt

-csrf token(a input field that is hidden and contains a secret set of characters that need to match with the backend set)

-I always like to stripslashess,trim,html entities, much safer

-https the most secure way encryption on the fly(big cost)

-captcha is a good way of dealing with spam

-never use only jQuery or any other javascript to verify info.

-oh one more thing generate a new sesion id every time a user logins this will attacks a lot harder

-one thing you cannot protect against is the user gets a keylogger or trojan horse,then all your efforts are in vain are almost, the only thing you can do is to create a onscreen keyboard for loggin,but if the attackers program is smart enough it will also print the screen of a user.

Hope this helps

Member Avatar for Member #120589

Before we can answer this, we need to know what platform / webserver and language technologies and RDBMS that you're using. Are you using frameworks on top of these?

BTW, I don't like to rubbish other peoples' suggestions, but there are a few decidedly dodgy ones on this thread.

If say that are some opinion you don't agree with please give some examples so that we may understand what are you reffering to.

Because i can't guess what are thinking.

Thank you

Member Avatar for Member #120589

These caught my eye:

md5 even with salts can no longer be considered secure. SHA variants (or a variety of other "secure" hash algorithms) should be used.

"verifying" is probably the wrong term - I assume you meant "validating" - but I may be wrong and may stand corrected.

while captchas may deal with automated posts, they will do nothing about the determined manual poster, but I concede that their use is a sensible measure

I do apologise for my comment dany12, as in hindsight it seems rather harsh. I will endeavour to think more lucidly before I start typing in future.

I still think that the OP needs to expand on her requirements and provide a description of her system before we start second guessing how to proceed. Certain issues, as you've pointed out, are pretty universal and could be implemented across all platforms. However some of the examples seem geared towards PHP, which may or may not be relevant to the OP.

No problem.
Thank you for the details about what was outdated.
For me verification menas validatind the data you recieve before sending it via ajax.

You are wright that the OP should provide more details about the project, but I assumed he/she wanted to know a generic about security and most likely would work with php that is the most common way to create a website.

Using some basic database work, you can have your website have a secure connection by running it through an encryption. You can also make sure that all of the computers hosting your website have a firewall to keep out connections that aren't to the webpage. (Use both of these for full security)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.