Security

Web security is the practice of protecting websites and their users from damage caused by malicious third parties, who are generally called attackers.

The kind of damage done can be reputational, financial, or even physical. It can target data that should be kept private to users, or actions that should be only made available to particular users. The motivations of attackers might be financial, political, or personal.

In this part of MDN we've written guides to help web developers understand how to protect their websites, and their users, against these attacks.

The documentation is organized into four main sections:

In this page we'll introduce each of these sections and list the guides they contain. First though, we'll list the core security practices that web developers should follow.

Core security practices

Web security can be overwhelming: there are a lot of potential threats, defenses are often complex and multilayered, and the set of threats you need to consider are highly dependent on what exactly your website is doing. In this section we'll summarize what we think are the most important things you can do, that will offer protection against most of the threats you will encounter.