A static website contains Web pages with fixed content the data is fixed and doesn’t change unless it has been added in the html code (sometimes called a flat page or a stationary page) is a web page that is delivered to the user’s web browser exactly as stored
As there’s no intermediary, i.e., the database involved, the threat of code injection is minimal for a static website. No plugins and dynamic software to host the website.
You must have occasionally come across an error message saying that, “The connection could not be established.’ This primarily occurs because of the database errors. Serving just basic HTML files makes it easier to host them anywhere with ease like on a CDN.
Hence, whenever there’d be an attack on the server, the static website is just redirected to other closest node, unlike its dynamic alternative where the website might go down for few hours.
The absence of middleman/database makes the static site much more speedy and easy to load.