Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Incubator Q&A

Welcome to the staging ground for new communities! Each proposal has a description in the "Descriptions" category and a body of questions and answers in "Incubator Q&A". You can ask questions (and get answers, we hope!) right away, and start new proposals.

Are you here to participate in a specific proposal? Click on the proposal tag (with the dark outline) to see only posts about that proposal and not all of the others that are in progress. Tags are at the bottom of each post.

Post History

66%
+2 −0
Incubator Q&A What security best practices are applicable to any public website?

Let's say I want to host a public website, for use by anyone on the internet. I am deliberately leaving the exact nature of the website vague, because I want to ask for general things that are appl...

0 answers  ·  posted 1y ago by matthewsnyder‭

#1: Initial revision by user avatar matthewsnyder‭ · 2023-06-25T20:07:31Z (over 1 year ago)
What security best practices are applicable to any public website?
Let's say I want to host a public website, for use by anyone on the internet. I am deliberately leaving the exact nature of the website vague, because I want to ask for general things that are applicable to any person serving HTML over the public internet.

What security best practices should be followed *by anyone* hosting such a website? Note that I'm asking for general things. So, for example, "hash the passwords of your users in the DB" should not be part of the answer because not all sites have user accounts. But "disable obsolete HTTPS cyphers" can be part of an answer; even though not all sites are HTTP, the majority these days are, and there is rarely a reason to support known-vulnerable cyphers.

To make things more specific:
* The website serves HTML. The HTML is likely contain JS and CSS. Some files may be served, such as JPG, PNG, GIF, TXT, PDF, video or audio - but always as direct links and never with a file browser.
* You can assume no REST API, websocket or other non-web technology is used. You can also disregard any databases.
* The HTML may be static, or it may be generated dynamically server-side with eg. WSGI.
* The site is accessible by the public internet.
* Anyone can browse the site. There can be no restriction on users (such as requiring visitors to be on a VPN).
* The host machine is fully dedicated to the website, there are no other services that share it, and no data on the server that is unrelated to host the website.
* You can assume that https://caddyserver.com/ acts as a reverse proxy in front of the server, and introduces TLS.
* You can assume the website uses HTTPS.
* The web admin is individual who is maintaining it in his free time, not a full-time team of professional sysadmins at a large company.