> Documentation index: https://web.dev/explore/llms.txt

![](http://web.dev/static/explore/secure/cover.png)

### Safe and secure

Ensure your site and your users' data is secure.

## Overview

Every website is vulnerable to attack, not just those handling sensitive data. Learn the security basics to keep your sites safe.

### Understand security basics

-

  #### [Security should not be so scary!](http://web.dev/articles/security-not-scary.md.txt)

-

  #### [What are security attacks?](http://web.dev/articles/security-attacks.md.txt)

-

  #### [Understanding "same-site" and "same-origin"](http://web.dev/articles/same-site-same-origin.md.txt)

-

  #### [Security headers quick reference](http://web.dev/articles/security-headers.md.txt)

### Secure connections with HTTPS

-

  #### [Why HTTPS matters](http://web.dev/articles/why-https-matters.md.txt)

-

  #### [Enabling HTTPS on your servers](http://web.dev/articles/enable-https.md.txt)

-

  #### [What is mixed content?](http://web.dev/articles/what-is-mixed-content.md.txt)

-

  #### [Fixing mixed content](http://web.dev/articles/fixing-mixed-content.md.txt)

-

  #### [When to use HTTPS for local development](http://web.dev/articles/when-to-use-local-https.md.txt)

-

  #### [How to use HTTPS for local development](http://web.dev/articles/how-to-use-local-https.md.txt)

### Prevent info leaks

-

  #### [Browser sandbox](http://web.dev/articles/browser-sandbox.md.txt)

-

  #### [Same-origin policy](http://web.dev/articles/same-origin-policy.md.txt)

-

  #### [Cross-Origin Resource Sharing (CORS)](http://web.dev/articles/cross-origin-resource-sharing.md.txt)

-

  #### [Making your website "cross-origin isolated" using COOP and COEP](http://web.dev/articles/coop-coep.md.txt)

-

  #### [Why you need "cross-origin isolated" for powerful features](http://web.dev/articles/why-coop-coep.md.txt)

-

  #### [Protect your resources from web attacks with Fetch Metadata](http://web.dev/articles/fetch-metadata.md.txt)

## Protect your sites, web apps, and users

Learn techniques to keep your users, your content, and your business secure.

### Protect websites from XSS

-

  #### [Prevent DOM-based cross-site scripting vulnerabilities with Trusted Types](http://web.dev/articles/trusted-types.md.txt)

-

  #### [Mitigate cross-site scripting (XSS) with a strict Content Security Policy (CSP)](http://web.dev/articles/strict-csp.md.txt)

-

  #### [Securely hosting user data in modern web applications](http://web.dev/articles/securely-hosting-user-data.md.txt)

### Monitor security violations and deprecations

-

  #### [Reporting API](https://developer.chrome.com/docs/capabilities/web-apis/reporting-api)

-

  #### [Migrate to Reporting API v1](https://developer.chrome.com/blog/reporting-api-migration)

-

  #### [Network Error Logging (NEL)](http://web.dev/articles/network-error-logging.md.txt)

### Cookies

-

  #### [Understanding cookies](http://web.dev/articles/understanding-cookies.md.txt)

-

  #### [Prepare for third-party cookie deprecation on Chrome](https://developers.google.com/privacy-sandbox/3pcd)

-

  #### [SameSite cookies explained](http://web.dev/articles/samesite-cookies-explained.md.txt)

-

  #### [SameSite cookie recipes](http://web.dev/articles/samesite-cookie-recipes.md.txt)

-

  #### [First-party cookie recipes](http://web.dev/articles/first-party-cookie-recipes.md.txt)

-

  #### [Referer and Referrer-Policy best practices](http://web.dev/articles/referrer-best-practices.md.txt)

-

  #### [Schemeful Same-Site](http://web.dev/articles/schemeful-samesite.md.txt)

### The Privacy Sandbox

-

  #### [Discover Privacy Sandbox](https://developers.google.com/privacy-sandbox/overview)

-

  #### [Private State Tokens](https://developers.google.com/privacy-sandbox/protections/private-state-tokens)

-

  #### [User-Agent reduction](https://developers.google.com/privacy-sandbox/protections/user-agent)

## Help, I've been hacked!

Understand how and why sites are hacked, then learn how to fix it.

### Get started

-

  #### [Help, I think I've been hacked](http://web.dev/articles/hacked.md.txt)

-

  #### [How do I know if my site was hacked?](http://web.dev/articles/how-do-i-know-if-my-site-was-hacked.md.txt)

-

  #### [Build a support team](http://web.dev/articles/build-a-support-team.md.txt)

-

  #### [Quarantine your site](http://web.dev/articles/quarantine-your-site.md.txt)

-

  #### [Use Search Console](http://web.dev/articles/use-search-console.md.txt)

-

  #### [Assess spam damage](http://web.dev/articles/assess-spam-damage.md.txt)

### Common hacks

-

  #### [Top ways sites get hacked by spammers](http://web.dev/articles/top-ways-sites-get-hacked-by-spammers.md.txt)

-

  #### [Fixing the Japanese Keyword hack](http://web.dev/articles/fixing-the-japanese-keyword-hack)

-

  #### [Fixing the gibberish hack](http://web.dev/articles/fixing-the-gibberish-hack)

-

  #### [Fixing the cloaked keywords and links hack](http://web.dev/articles/fixing-the-cloaked-keywords-hack)

-

  #### [Hacked with malware](http://web.dev/articles/hacked-with-malware.md.txt)

### Fix the problem

-

  #### [Identify the vulnerability](http://web.dev/articles/identify-the-vulnerability.md.txt)

-

  #### [Clean and maintain your site](http://web.dev/articles/clean-and-maintain-your-site.md.txt)

-

  #### [Request a review](http://web.dev/articles/request-a-review.md.txt)

-

  #### [Glossary for hacked sites](http://web.dev/articles/glossary-for-hacked-sites.md.txt)

-

  #### [FAQ for hacked sites](http://web.dev/articles/faq-for-hacked-sites.md.txt)