Build static sites with Kontent.ai
With static site generators, you can launch static, secure, and speedy websites.Combined with the JAMstack approach and a headless CMS to store your content, you’re on your way to success.
Benefits of static site generators
Static site generators (SSG) take the prepared content, typically stored in flat files, apply it against templates, and generate a structure of static HTML files, ready to be delivered to your visitors. When compared to dynamic websites, they come with several advantages:- Speed – An absence of the database makes the static site much more speedy and easier to load. All the server needs to do is return a file back to the user. There is no need for database queries, no client-server requests to process. Static site generators store a pre-built version of the site that can be delivered nearly instantly.
- Less complexity – To build a dynamic site, you would need HTML, CSS, and JavaScript on the front end, a server-side scripting language, such as PHP or Perl, on the back end, and SQL to run a database. To build a static site, all you need are front-end languages and a templating language on top of that.
- Security – Every request for a web page made to a dynamic site causes an application to run and fetch content from a database. This creates a high risk of the site being attacked and the data being stolen. With a static site, security is the job of the web server. A static site using a CDN is practically immune to attacks because even if one web server on the CDN network goes down from an attack, other servers are still available. And since static sites don't process user data, there is no data to be stolen.
- Scalability – Unexpected traffic surges might crash a dynamic site. A static site is much better prepared as delivering static pages consumes very little server resources. Basic static sites with HTML files can be easily scaled up by just increasing the bandwidth.
- SEO – Load time speed is crucial to get ranked higher by search engines. And your static site will always be faster than dynamically generated websites. Also, static content is easier to parse by the web crawlers.
- Hosting and cost – HTML files for your static site can be served anywhere, scaled, and migrated as needed. Plus, the files require less space making the hosting of static websites cheaper than that of dynamic sites.
Combining the best of both worlds
Sign in with your Kontent.ai credentials or sign up for free to unlock the full lesson, track your progress, and access exclusive expert insights and tips!