"Unit Testing a Spring Application" was retired on January 8, 2022.

Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

How do i secure my website? HTML/Javascript/PHP

Hi, i want to upload my first portfolio website soon and i was wondering how to i add security features to it?? Files are in PHP with HTML, CSS and Javascript.

Like what sorts of codes will i need to secure my site.

Any help or links is really appreciated! Thanks

What do you mean by "Add security features"? It is very vague. Do you mean security on your web hosting, security as in escaping your code, security as in SSL, etc.

1 Answer

This really depends on your website. If the site contains only content then your primary security concern is that you use strong passwords for all the accounts related to your website. Your website will utilize at least some of the following services/tools: registrar, hosting, control panel, database, content management system and using good password practices will help reduce the chance of a security breach.

Another concern arises if your website has a contact or input form of any kind that submits data to your server. It is important that if you include a feature like this on your website that you look into sanitizing and validating input data to prevent sneaky people form hijacking your form or even injecting code into your server or database.

There is a lot more out there, but for a relatively simple website, like a blog or portfolio, I think this is a good start :D

Thanks Erik, yep my website is relatively simple but i'll definitely have a look at the things you mentioned! Thanks a lot :) Really appreciate it.